Improve design of dice stake box.

This commit is contained in:
John Preston
2025-12-23 14:55:34 +04:00
parent 77f31ca4b5
commit 13453351bf
21 changed files with 197 additions and 78 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" fill="none"><path fill="#F9F8FE" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#C1C2D3" d="M66.2 69c0-5.9 4.2-12.7 9.4-15.3l35.2-17.5c4-2 7.2 0 7.2 4.4v46c0 6.2-4.4 13.3-9.8 16l-33 16.4c-5 2.5-9 0-9-5.5V68.9Z"/><path fill="#D8DDEB" d="M10.8 40.3c0-4.2 3-6 6.7-4.2L53 53.9c5.2 2.6 9.4 9.4 9.4 15.2v44.3c0 5.7-4 8.2-9.1 5.7l-32.8-16.4a19.4 19.4 0 0 1-9.9-15.9V40.3Z"/><path fill="#F2F1F8" d="m73.5 7.2 36 18c5.3 2.6 5.3 7 0 9.6l-35.9 18a24.1 24.1 0 0 1-19.1 0l-36-18c-5.3-2.7-5.3-7 0-9.6l35.9-18a24.1 24.1 0 0 1 19.1 0Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.7" d="m81 47.1-3.9 2m-4 2h-.3c-.5.4-1.2.6-1.9.9"/><path stroke="#939BAC" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.5" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#191919" d="M85 65.3c0 4.1-2.6 8.7-6 10.4-3.2 1.7-5.9-.3-5.9-4.4 0-4 2.7-8.6 6-10.3 3.3-1.6 6 .3 6 4.3ZM111.3 84.4c0 4-2.6 8.7-6 10.3-3.3 1.7-6-.2-6-4.3 0-4 2.8-8.7 6-10.3 3.4-1.7 6 .3 6 4.3ZM105.4 62.5c-3.4 1.7-6-.3-6-4.3s2.6-8.7 6-10.3c3.3-1.7 6 .3 6 4.3s-2.7 8.7-6 10.3ZM79 107.9c-3.2 1.6-5.9-.3-5.9-4.3 0-4.1 2.7-8.7 6-10.4 3.3-1.6 6 .3 6 4.4 0 4-2.7 8.6-6 10.3ZM43.6 65.4c0 4 2.7 8.7 6 10.3 3.3 1.7 6-.3 6-4.3 0-4.1-2.7-8.7-6-10.4-3.3-1.6-6 .3-6 4.4ZM17.3 84.4c0 4 2.7 8.7 6 10.4 3.3 1.6 6-.3 6-4.4 0-4-2.7-8.7-6-10.3-3.3-1.7-6 .3-6 4.3ZM23.3 62.6c3.3 1.6 6-.3 6-4.4 0-4-2.7-8.6-6-10.3-3.3-1.7-6 .3-6 4.3s2.7 8.7 6 10.4ZM49.6 107.9c3.3 1.6 6-.3 6-4.3s-2.7-8.7-6-10.4c-3.3-1.6-6 .3-6 4.4 0 4 2.7 8.6 6 10.3ZM30.5 74.9c0 4 2.7 8.6 6 10.3 3.3 1.6 6-.3 6-4.4 0-4-2.7-8.7-6-10.3-3.3-1.7-6 .3-6 4.4Z"/><path fill="#E72525" d="M56 30.1c-.3-2.3 3.2-4.3 8-4.4 4.6-.2 8.6 1.6 8.9 4 .3 2.3-3.3 4.3-8 4.4-4.6.2-8.6-1.6-9-4Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".3" stroke-width="3.1" d="M61.8 28.8s2.8-.6 5.1.2m15.3 37.6s0 1.5-1 2.9m27-15.3s0 1.5-1 2.9m-25 41.8s0 1.5-1 2.8m27-15.2s0 1.4-1 2.8m-60.5 9.4s0 1.4.9 2.8M20.3 86.2s.2 1.5 1 2.9m25.4-22.5s0 1.5.9 2.9M20.3 54.2s.2 1.5 1 2.9M34 76.9s0 1.5 1 2.9"/></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" fill="none"><path fill="#F9F8FE" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#C1C2D3" d="M66.2 69c0-5.9 4.2-12.7 9.4-15.3l35.2-17.5c4-2 7.2 0 7.2 4.4v46c0 6.2-4.4 13.3-9.8 16l-33 16.4c-5 2.5-9 0-9-5.5V68.9Z"/><path fill="#D8DDEB" d="M10.8 40.3c0-4.2 3-6 6.7-4.2L53 53.9c5.2 2.6 9.4 9.4 9.4 15.2v44.3c0 5.7-4 8.2-9.1 5.7l-32.8-16.4a19.4 19.4 0 0 1-9.9-15.9V40.3Z"/><path fill="#F2F1F8" d="m73.5 7.2 36 18c5.3 2.6 5.3 7 0 9.6l-35.9 18a24.1 24.1 0 0 1-19.1 0l-36-18c-5.3-2.7-5.3-7 0-9.6l35.9-18a24.1 24.1 0 0 1 19.1 0Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.7" d="m81 47.1-3.9 2m-4 2h-.3c-.5.4-1.2.6-1.9.9"/><path stroke="#939BAC" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.5" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#E72525" d="M86.3 81c0-4 2.7-8.7 6-10.3 3.3-1.7 6 .2 6 4.3 0 4-2.7 8.7-6 10.3-3.3 1.7-6-.3-6-4.3Z"/><path fill="#191919" d="M43.6 97.6c0-4 2.7-6 6-4.4 3.3 1.7 6 6.3 6 10.4 0 4-2.7 6-6 4.3-3.3-1.6-6-6.3-6-10.3ZM17.3 52.2c0-4 2.7-6 6-4.3 3.3 1.7 6 6.3 6 10.3 0 4-2.7 6-6 4.4-3.3-1.7-6-6.3-6-10.4ZM36.5 85.2c-3.3-1.7-6-6.3-6-10.3 0-4 2.7-6 6-4.4 3.3 1.7 6 6.3 6 10.4 0 4-2.7 6-6 4.3ZM97.1 27.7c3 1.9 2.5 4.5-1.1 6a15 15 0 0 1-12-.5c-3-1.9-2.4-4.5 1.2-6a15 15 0 0 1 12 .5ZM45.2 26.4c3 1.8 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".3" stroke-width="3.1" d="M90.2 28.6s1.5 0 3 .4m-55-1.8s1.6 0 3 .5m54 48.8s0 1.5-1 2.8M46.8 98.7s0 1.4.9 2.8M20.3 54.2s.2 1.5 1 2.9M34 76.9s0 1.5 1 2.9"/></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" fill="none"><path fill="#F9F8FE" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#C1C2D3" d="M66.2 69c0-5.9 4.2-12.7 9.4-15.3l35.2-17.5c4-2 7.2 0 7.2 4.4v46c0 6.2-4.4 13.3-9.8 16l-33 16.4c-5 2.5-9 0-9-5.5V68.9Z"/><path fill="#D8DDEB" d="M10.8 40.3c0-4.2 3-6 6.7-4.2L53 53.9c5.2 2.6 9.4 9.4 9.4 15.2v44.3c0 5.7-4 8.2-9.1 5.7l-32.8-16.4a19.4 19.4 0 0 1-9.9-15.9V40.3Z"/><path fill="#191919" d="M79 93.2c3.3-1.6 6 .3 6 4.4 0 4-2.7 8.7-6 10.3-3.3 1.7-6-.3-6-4.3s2.7-8.7 6-10.4ZM105.3 48c3.3-1.7 6 .2 6 4.2 0 4.1-2.7 8.7-6 10.4-3.3 1.6-6-.3-6-4.4 0-4 2.7-8.6 6-10.3Z"/><path fill="#E72525" d="M36.3 70.6c3.3 1.7 6 6.3 6 10.3 0 4-2.7 6-6 4.4-3.3-1.7-6-6.3-6-10.4 0-4 2.7-6 6-4.3Z"/><path fill="#F2F1F8" d="m73.5 7.2 36 18c5.3 2.6 5.3 7 0 9.6l-35.9 18a24.1 24.1 0 0 1-19.1 0l-36-18c-5.3-2.7-5.3-7 0-9.6l35.9-18a24.1 24.1 0 0 1 19.1 0Z"/><path fill="#191919" d="M97.1 27.7c3 1.8 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.4-4.4 1.2-6a15 15 0 0 1 12 .6ZM70.8 27.3c3 1.8 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6ZM45.2 26.4c3 1.8 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.5-4.5 1.2-6a15 15 0 0 1 12 .6Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".3" stroke-width="3.1" d="M90.2 28.6s1.5 0 3 .4m-29.3-.8s1.5 0 3 .4m-28.6-1.4s1.5 0 3 .5m67 26.5s-.2 1.5-1 2.9M82.2 98.9s0 1.5-1 2.8M34 77s0 1.5 1 2.9"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.7" d="m81 47.1-3.9 2m-4 2h-.3c-.5.4-1.2.6-1.9.9"/><path stroke="#939BAC" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.5" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/></svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" fill="none"><path fill="#F9F8FE" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#C1C2D3" d="M66.2 69c0-5.9 4.2-12.7 9.4-15.3l35.2-17.5c4-2 7.2 0 7.2 4.4v46c0 6.2-4.4 13.3-9.8 16l-33 16.4c-5 2.5-9 0-9-5.5V68.9Z"/><path fill="#D8DDEB" d="M10.8 40.3c0-4.2 3-6 6.7-4.2L53 53.9c5.2 2.6 9.4 9.4 9.4 15.2v44.3c0 5.7-4 8.2-9.1 5.7l-32.8-16.4a19.4 19.4 0 0 1-9.9-15.9V40.3Z"/><path fill="#F2F1F8" d="m73.5 7.2 36 18c5.3 2.6 5.3 7 0 9.6l-35.9 18a24.1 24.1 0 0 1-19.1 0l-36-18c-5.3-2.7-5.3-7 0-9.6l35.9-18a24.1 24.1 0 0 1 19.1 0Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.7" d="m81 47.1-3.9 2m-4 2h-.3c-.5.4-1.2.6-1.9.9"/><path stroke="#939BAC" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.5" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#E72525" d="M36.5 85.2c-3.3-1.7-6-6.3-6-10.3 0-4 2.7-6 6-4.4 3.3 1.7 6 6.3 6 10.4 0 4-2.7 6-6 4.3Z"/><path fill="#191919" d="M79 75.7c3.3-1.6 6-6.3 6-10.3 0-4-2.7-6-6-4.3-3.3 1.6-6 6.2-6 10.3 0 4 2.7 6 6 4.3ZM105.3 94.8c3.3-1.7 6-6.3 6-10.3 0-4-2.7-6-6-4.4-3.3 1.6-6 6.3-6 10.3 0 4 2.7 6 6 4.4ZM85 97.6c0-4-2.7-6-6-4.4-3.3 1.7-6 6.3-6 10.4 0 4 2.7 6 6 4.3 3.3-1.6 6-6.3 6-10.3ZM111.3 52.3c0-4.1-2.7-6-6-4.4-3.3 1.7-6 6.3-6 10.3 0 4 2.7 6 6 4.4 3.3-1.7 6-6.3 6-10.3ZM92 85.2c3.4-1.7 6-6.3 6-10.3 0-4-2.6-6-6-4.4-3.2 1.7-6 6.3-6 10.4 0 4 2.8 6 6 4.3ZM97.1 27.7c3 1.9 2.5 4.5-1.1 6a15 15 0 0 1-12-.5c-3-1.9-2.4-4.5 1.2-6a15 15 0 0 1 12 .5ZM70.5 40.3c3 1.8 2.4 4.5-1.2 6a15 15 0 0 1-12-.6c-2.9-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6ZM71.6 16c3 1.9 2.5 4.6-1.1 6a15 15 0 0 1-12-.5c-3-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6ZM45.2 26.4c3 1.8 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.5-4.5 1.1-6a15 15 0 0 1 12 .6Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".3" stroke-width="3.1" d="M90.2 28.6s1.5 0 3 .4M63.6 41.1s1.5 0 3 .5m-1.9-24.7s1.5 0 3 .5m-29.4 9.8s1.5 0 3 .5m40.9 39s0 1.4-1 2.8m27-15.3s0 1.5-1 2.9m-25 41.8s0 1.5-1 2.9m27-15.3s0 1.4-1 2.8m-12-12.8s0 1.5-1 2.9M34 76.9s0 1.5 1 2.9"/></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" fill="none"><path fill="#F9F8FE" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#C1C2D3" d="M66.2 69c0-5.9 4.2-12.7 9.4-15.3l35.2-17.5c4-2 7.2 0 7.2 4.4v46c0 6.2-4.4 13.3-9.8 16l-33 16.4c-5 2.5-9 0-9-5.5V68.9Z"/><path fill="#D8DDEB" d="M10.8 40.3c0-4.2 3-6 6.7-4.2L53 53.9c5.2 2.6 9.4 9.4 9.4 15.2v44.3c0 5.7-4 8.2-9.1 5.7l-32.8-16.4a19.4 19.4 0 0 1-9.9-15.9V40.3Z"/><path fill="#F2F1F8" d="m73.5 7.2 36 18c5.3 2.6 5.3 7 0 9.6l-35.9 18a24.1 24.1 0 0 1-19.1 0l-36-18c-5.3-2.7-5.3-7 0-9.6l35.9-18a24.1 24.1 0 0 1 19.1 0Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.7" d="m81 47.1-3.9 2m-4 2h-.3c-.5.4-1.2.6-1.9.9"/><path stroke="#939BAC" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.5" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#E72525" d="M42.3 80.7c0 4-2.6 6-6 4.4-3.3-1.7-6-6.3-6-10.4 0-4 2.8-6 6-4.3 3.4 1.7 6 6.3 6 10.3Z"/><path fill="#191919" d="M85 65.4c0 4-2.7 8.7-6 10.4-3.3 1.6-6-.3-6-4.4 0-4 2.7-8.6 6-10.3 3.3-1.7 6 .3 6 4.3ZM111.3 84.5c0 4-2.7 8.6-6 10.3-3.3 1.6-6-.3-6-4.3s2.7-8.7 6-10.4c3.3-1.6 6 .3 6 4.4ZM92.1 70.7c3.3-1.6 6 .3 6 4.4 0 4-2.7 8.7-6 10.3-3.3 1.7-6-.3-6-4.3s2.7-8.7 6-10.4ZM45.2 26.4c3 1.8 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.5-4.5 1.1-6a15 15 0 0 1 12 .6ZM71.6 14c3 1.9 2.5 4.6-1 6a15 15 0 0 1-12-.5c-3-1.8-2.5-4.5 1.1-6a15 15 0 0 1 12 .6ZM70.9 27.2c3 1.8 2.5 4.4-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.5-4.5 1.1-6a15 15 0 0 1 12 .6ZM70.5 40.3c3 1.8 2.4 4.5-1.2 6a15 15 0 0 1-12-.6c-2.9-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6ZM97.1 27.7c3 1.9 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.4-4.4 1.2-6a15 15 0 0 1 12 .6Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".3" stroke-width="3.1" d="M38.3 27.2s1.5 0 3 .5m23.4-12.8s1.5 0 3 .5M64 28s1.5 0 3 .5M63.4 41s1.6 0 3 .5m23.7-13s1.5 0 3 .4m-11 37.6s0 1.5-1 2.9m27 17s0 1.4-1 2.8m-12-12.8s0 1.5-1 2.9M34 76.9s0 1.5 1 2.9"/></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="128" height="128" fill="none"><path fill="#F9F8FE" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#C1C2D3" d="M66.2 69c0-5.9 4.2-12.7 9.4-15.3l35.2-17.5c4-2 7.2 0 7.2 4.4v46c0 6.2-4.4 13.3-9.8 16l-33 16.4c-5 2.5-9 0-9-5.5V68.9Z"/><path fill="#D8DDEB" d="M10.8 40.3c0-4.2 3-6 6.7-4.2L53 53.9c5.2 2.6 9.4 9.4 9.4 15.2v44.3c0 5.7-4 8.2-9.1 5.7l-32.8-16.4a19.4 19.4 0 0 1-9.9-15.9V40.3Z"/><path fill="#F2F1F8" d="m73.5 7.2 36 18c5.3 2.6 5.3 7 0 9.6l-35.9 18a24.1 24.1 0 0 1-19.1 0l-36-18c-5.3-2.7-5.3-7 0-9.6l35.9-18a24.1 24.1 0 0 1 19.1 0Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-width="2.7" d="m81 47.1-3.9 2m-4 2h-.3c-.5.4-1.2.6-1.9.9"/><path stroke="#939BAC" stroke-linecap="round" stroke-linejoin="round" stroke-width="4.5" d="M63.8 5c-2.1.2-4.4.8-6.6 1.5C55 7.3 53 8.2 51.4 9a557 557 0 0 0-17 8.4c-7.7 4-15.9 8.3-19.2 10.7-4 2.9-5.4 7.1-6 11.5-.5 4.4 0 8.9 0 12.2-.1 2.4-.6 11-.7 19.7-.1 8.8 0 17.8 1.4 21.1a19 19 0 0 0 6.2 8.2 51 51 0 0 0 9.1 5.4c3.1 1.5 10.8 5.7 18.8 9.5 8 3.7 16.4 7 20.9 6.8 4-.1 8.9-1.7 12-3.2 9.7-4.5 19-9.4 28.4-14.1 6.5-3.3 11.5-7.3 13.4-15 1.8-7.6 1.8-45.6.6-53.3-1-6.3-9.3-11.5-16-14.8C97.2 19 73.3 4.6 63.9 5Z"/><path fill="#191919" d="M79 93.3c3.4-1.7 6 .2 6 4.3 0 4-2.6 8.7-6 10.3-3.2 1.7-5.9-.3-5.9-4.3s2.7-8.7 6-10.3ZM105.4 48c3.3-1.7 6 .2 6 4.2s-2.7 8.7-6 10.4c-3.3 1.6-6-.3-6-4.4 0-4 2.7-8.6 6-10.3ZM86.3 81c0-4 2.7-8.7 6-10.4 3.3-1.6 6 .3 6 4.4 0 4-2.7 8.7-6 10.3-3.3 1.7-6-.3-6-4.3ZM43.6 65.4c0 4 2.7 8.7 6 10.3 3.3 1.7 6-.3 6-4.4 0-4-2.7-8.6-6-10.3-3.3-1.6-6 .3-6 4.4ZM17.3 84.4c0 4 2.7 8.7 6 10.4 3.3 1.6 6-.3 6-4.4 0-4-2.7-8.7-6-10.3-3.3-1.7-6 .3-6 4.3ZM23.3 62.6c3.3 1.6 6-.3 6-4.4 0-4-2.7-8.7-6-10.3-3.3-1.7-6 .3-6 4.3s2.7 8.7 6 10.4ZM49.6 107.9c3.3 1.6 6-.3 6-4.3 0-4.1-2.7-8.7-6-10.4-3.3-1.6-6 .3-6 4.4 0 4 2.7 8.6 6 10.3ZM30.6 74.8c0 4.1 2.6 8.7 6 10.4 3.2 1.6 6-.3 6-4.4 0-4-2.8-8.7-6-10.3-3.4-1.7-6 .3-6 4.3ZM45.2 26.4c3 1.8 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.5-4.5 1.2-6a15 15 0 0 1 12 .6ZM71.7 14c3 1.9 2.4 4.6-1.2 6a15 15 0 0 1-12-.5c-3-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6ZM57.4 34c3 1.8 2.5 4.5-1.2 6a15 15 0 0 1-12-.6c-2.9-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6ZM84.5 20.8c3 1.8 2.5 4.5-1.1 6a15 15 0 0 1-12-.6c-3-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6ZM70.5 40.3c3 1.8 2.5 4.5-1.2 6a15 15 0 0 1-12-.6c-2.9-1.8-2.4-4.5 1.2-6a15 15 0 0 1 12 .6ZM97.1 28.2c3 1.8 2.5 4.5-1 6a15 15 0 0 1-12-.6c-3-1.8-2.5-4.5 1.1-6a15 15 0 0 1 12 .6Z"/><path stroke="#fff" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".3" stroke-width="3.1" d="M38.3 27.2s1.5 0 3 .5m23.4-12.8s1.5 0 3 .5M50.4 34.8s1.6 0 3 .5m24.2-13.6s1.5 0 3 .4m-17 19s1.5 0 3 .5M90.1 29s1.5 0 3 .5m15 24.7s0 1.5-1 2.9m-25 41.8s0 1.5-1 2.8m14-25.2s0 1.5-1 2.8M46.8 98.7s0 1.4.9 2.8M20.3 86.2s.2 1.5 1 2.9m25.4-22.5s0 1.5.9 2.9M20.3 54.2s.2 1.5 1 2.9M34 76.9s0 1.5 1 2.9"/></svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="48px" height="48px" viewBox="0 0 48 48" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Mini / mini_roll</title>
<g id="Mini-/-mini_roll" stroke="none" fill="none" fill-rule="evenodd">
<path d="M39,2 C43.418278,2 47,5.581722 47,10 L47,31.1887793 C47,33.760437 45.763725,36.1753059 43.6774292,37.6788992 L34.2435723,44.4778795 C32.80623,45.5137721 31.0656753,46.0432193 29.2949637,45.9831622 L9.09321639,45.2979811 C4.83370452,45.1535116 1.4353133,41.695068 1.3654701,37.4336792 L1.01104954,15.8091855 C0.964546919,12.9718908 2.42455232,10.3222835 4.84796505,8.84597906 L14.1687682,3.1678941 C15.4226494,2.40404961 16.8625562,2 18.3307784,2 L39,2 Z M24.3182849,33.7895214 C22.1896369,33.7895214 20.4640268,35.5323942 20.4640268,37.6823369 C20.4640268,39.8322795 22.1896369,41.5751524 24.3182849,41.5751524 C26.4469329,41.5751524 28.1725431,39.8322795 28.1725431,37.6823369 C28.1725431,35.5323942 26.4469329,33.7895214 24.3182849,33.7895214 Z M43.5028298,5.95486664 C43.1084204,5.43724087 42.382444,5.3096145 41.8351419,5.66168777 L31.2535872,12.4687141 L31.2037023,12.4638297 L6.92120008,11.3103335 L6.84373037,11.3084945 C5.94203119,11.3084945 5.21105957,12.0394661 5.21105957,12.9411653 C5.21105957,13.8980472 5.96558985,14.6847215 6.92163968,14.7246185 L30.6738798,15.7148123 L31.0006238,39.5729782 C31.0133849,40.5057402 31.773163,41.2551949 32.7060123,41.2551949 L32.733167,41.2551949 C33.6470713,41.239975 34.3757796,40.4869516 34.3607825,39.5730473 L33.9468798,14.3838123 L43.2886761,7.54001021 C43.7855383,7.16142182 43.8814182,6.45172886 43.5028298,5.95486664 Z M39.599298,27.9369227 C37.937203,27.9369227 36.5898088,29.6797956 36.5898088,31.8297382 C36.5898088,33.9796808 37.937203,35.7225537 39.599298,35.7225537 C41.261393,35.7225537 42.6087873,33.9796808 42.6087873,31.8297382 C42.6087873,29.6797956 41.261393,27.9369227 39.599298,27.9369227 Z M14.6034425,25.1506705 C12.3581563,25.1506705 10.5379922,26.9890433 10.5379922,29.256791 C10.5379922,31.5245387 12.3581563,33.3629114 14.6034425,33.3629114 C16.8487288,33.3629114 18.6688929,31.5245387 18.6688929,29.256791 C18.6688929,26.9890433 16.8487288,25.1506705 14.6034425,25.1506705 Z M6.57813796,16.8317771 C4.44948998,16.8317771 2.72387984,18.5746499 2.72387984,20.7245926 C2.72387984,22.8745352 4.44948998,24.6174081 6.57813796,24.6174081 C8.70678594,24.6174081 10.4323961,22.8745352 10.4323961,20.7245926 C10.4323961,18.5746499 8.70678594,16.8317771 6.57813796,16.8317771 Z M42.1944513,12.7656951 C40.5323563,12.7656951 39.1849621,14.508568 39.1849621,16.6585107 C39.1849621,18.8084533 40.5323563,20.5513262 42.1944513,20.5513262 C43.8565463,20.5513262 45.2039405,18.8084533 45.2039405,16.6585107 C45.2039405,14.508568 43.8565463,12.7656951 42.1944513,12.7656951 Z M24.5822752,3.97181227 C22.5411059,3.97181227 20.8864113,5.2700629 20.8864113,6.8715362 C20.8864113,8.4730095 22.5411059,9.77126013 24.5822752,9.77126013 C26.6234445,9.77126013 28.2781392,8.4730095 28.2781392,6.8715362 C28.2781392,5.2700629 26.6234445,3.97181227 24.5822752,3.97181227 Z" id="Shape" fill="#FFFFFF"></path>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.1 KiB

@@ -66,12 +66,6 @@
<file alias="slot_back.tgs">../../animations/dice/slot_back.tgs</file>
<file alias="slot_pull.tgs">../../animations/dice/slot_pull.tgs</file>
<file alias="winners.tgs">../../animations/dice/winners.tgs</file>
<file alias="dice_1.tgs">../../animations/dice/dice_1.tgs</file>
<file alias="dice_2.tgs">../../animations/dice/dice_2.tgs</file>
<file alias="dice_3.tgs">../../animations/dice/dice_3.tgs</file>
<file alias="dice_4.tgs">../../animations/dice/dice_4.tgs</file>
<file alias="dice_5.tgs">../../animations/dice/dice_5.tgs</file>
<file alias="dice_6.tgs">../../animations/dice/dice_6.tgs</file>
<file alias="star_reaction_appear.tgs">../../animations/star_reaction/appear.tgs</file>
@@ -36,6 +36,12 @@
<file alias="topic_icons/general.svg">../../art/topic_icons/general.svg</file>
<file alias="links_subscription.svg">../../icons/info/edit/links_subscription.svg</file>
<file alias="plane_white.svg">../../icons/plane_white.svg</file>
<file alias="dice/dice1.svg">../../art/dice/dice1.svg</file>
<file alias="dice/dice2.svg">../../art/dice/dice2.svg</file>
<file alias="dice/dice3.svg">../../art/dice/dice3.svg</file>
<file alias="dice/dice4.svg">../../art/dice/dice4.svg</file>
<file alias="dice/dice5.svg">../../art/dice/dice5.svg</file>
<file alias="dice/dice6.svg">../../art/dice/dice6.svg</file>
</qresource>
<qresource prefix="/icons">
<file alias="calls/hands.lottie">../../icons/calls/hands.lottie</file>
@@ -7,7 +7,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "history/view/controls/history_view_suggest_options.h"
#include "base/event_filter.h"
#include "base/unixtime.h"
#include "boxes/star_gift_box.h"
#include "chat_helpers/compose/compose_show.h"
@@ -21,7 +20,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "history/history_item.h"
#include "history/history_item_components.h"
#include "history/history_item_helpers.h"
#include "info/channel_statistics/earn/earn_format.h"
#include "info/channel_statistics/earn/earn_icons.h"
#include "lang/lang_keys.h"
#include "lottie/lottie_icon.h"
@@ -111,36 +109,6 @@ void ChooseSuggestTimeBox(
});
}
void AddApproximateUsd(
not_null<QWidget*> field,
not_null<Main::Session*> session,
rpl::producer<CreditsAmount> price) {
auto value = std::move(price) | rpl::map([=](CreditsAmount amount) {
if (!amount) {
return QString();
}
const auto appConfig = &session->appConfig();
const auto rate = amount.ton()
? appConfig->currencySellRate()
: (appConfig->starsSellRate() / 100.);
return Info::ChannelEarn::ToUsd(amount, rate, 2);
});
const auto usd = Ui::CreateChild<Ui::FlatLabel>(
field,
std::move(value),
st::suggestPriceEstimate);
const auto move = [=] {
usd->moveToRight(0, st::suggestPriceEstimateTop);
};
base::install_event_filter(field, [=](not_null<QEvent*> e) {
if (e->type() == QEvent::Resize) {
move();
}
return base::EventFilterResult::Continue;
});
usd->widthValue() | rpl::on_next(move, usd->lifetime());
}
StarsTonPriceInput AddStarsTonPriceInput(
not_null<Ui::VerticalLayout*> container,
StarsTonPriceArgs &&args) {
@@ -10,6 +10,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "ui/chat/message_bubble.h"
#include "ui/chat/chat_style.h"
#include "ui/effects/reaction_fly_animation.h"
#include "ui/text/custom_emoji_helper.h"
#include "ui/text/format_values.h"
#include "ui/text/text_options.h"
#include "ui/text/text_utilities.h"
@@ -473,6 +474,8 @@ void BottomInfo::layoutDateText() {
: name.isEmpty()
? date
: (name + afterAuthor);
auto helper = Ui::Text::CustomEmojiHelper(
Core::TextContext({ .session = &_reactionsOwner->session() }));
auto marked = TextWithEntities();
if (const auto count = _data.stars) {
marked.append(
@@ -480,16 +483,24 @@ void BottomInfo::layoutDateText() {
).append(Lang::FormatCountToShort(count).string).append(u", "_q);
}
if (const auto stake = _data.tonStake) {
marked.append(QString::number(stake / 1e9)
+ QString::fromUtf8("\xf0\x9f\x92\x8e")
+ " ");
marked.append(
QString::number(stake / 1e9)
).append(helper.image({
.image = Ui::Emoji::SinglePixmap(
Ui::Emoji::Find(QString::fromUtf8("\xf0\x9f\x92\x8e")),
Ui::Emoji::GetSizeNormal()).toImage().scaledToHeight(
st::stakeIconEmojiSize * style::DevicePixelRatio(),
Qt::SmoothTransformation),
.margin = QMargins(0, st::stakeIconEmojiTop, 0, 0),
.textColor = false,
})).append(" ");
}
marked.append(full);
_authorEditedDate.setMarkedText(
st::msgDateTextStyle,
marked,
Ui::NameTextOptions(),
Core::TextContext({ .session = &_reactionsOwner->session() }));
helper.context());
}
void BottomInfo::layoutViewsText() {
@@ -280,6 +280,27 @@ bool AppConfig::settingsDisplayPasskeys() const {
return get<bool>(u"settings_display_passkeys"_q, false);
}
int64 AppConfig::stakeDiceNanoTonMin() const {
return get<int64>(u"ton_stakedice_stake_amount_min"_q, 100'000'000LL);
}
int64 AppConfig::stakeDiceNanoTonMax() const {
return get<int64>(u"ton_stakedice_stake_amount_max"_q, 50'000'000'000LL);
}
std::vector<int64> AppConfig::stakeDiceNanoTonSuggested() const {
return get<std::vector<int64>>(
u"ton_stakedice_stake_suggested_amounts"_q,
std::vector<int64>{
100'000'000LL,
1'000'000'000LL,
2'000'000'000LL,
5'000'000'000LL,
10'000'000'000LL,
20'000'000'000LL,
});
}
void AppConfig::refresh(bool force) {
if (_requestId || !_api) {
if (force) {
@@ -464,6 +485,27 @@ std::vector<int> AppConfig::getIntArray(
});
}
std::vector<int64> AppConfig::getInt64Array(
const QString &key,
std::vector<int64> &&fallback) const {
return getValue(key, [&](const MTPJSONValue &value) {
return value.match([&](const MTPDjsonArray &data) {
auto result = std::vector<int64>();
result.reserve(data.vvalue().v.size());
for (const auto &entry : data.vvalue().v) {
if (entry.type() != mtpc_jsonNumber) {
return std::move(fallback);
}
result.push_back(
int64(base::SafeRound(entry.c_jsonNumber().vvalue().v)));
}
return result;
}, [&](const auto &data) {
return std::move(fallback);
});
});
}
bool AppConfig::newRequirePremiumFree() const {
return get<bool>(
u"new_noncontact_peers_require_premium_without_ownpremium"_q,
@@ -47,6 +47,8 @@ public:
return getStringMap(key, std::move(fallback));
} else if constexpr (std::is_same_v<Type, std::vector<int>>) {
return getIntArray(key, std::move(fallback));
} else if constexpr (std::is_same_v<Type, std::vector<int64>>) {
return getInt64Array(key, std::move(fallback));
} else if constexpr (std::is_same_v<Type, bool>) {
return getBool(key, fallback);
}
@@ -128,6 +130,10 @@ public:
[[nodiscard]] int passkeysAccountPasskeysMax() const;
[[nodiscard]] bool settingsDisplayPasskeys() const;
[[nodiscard]] int64 stakeDiceNanoTonMin() const;
[[nodiscard]] int64 stakeDiceNanoTonMax() const;
[[nodiscard]] std::vector<int64> stakeDiceNanoTonSuggested() const;
using StarsColoring = Calls::Group::Ui::StarsColoring;
[[nodiscard]] std::vector<StarsColoring> groupCallColorings() const;
@@ -159,6 +165,9 @@ private:
[[nodiscard]] std::vector<int> getIntArray(
const QString &key,
std::vector<int> &&fallback) const;
[[nodiscard]] std::vector<int64> getInt64Array(
const QString &key,
std::vector<int64> &&fallback) const;
void updateIgnoredRestrictionReasons(std::vector<QString> was);
@@ -7,15 +7,18 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#include "ui/boxes/emoji_stake_box.h"
#include "base/event_filter.h"
#include "base/object_ptr.h"
#include "chat_helpers/stickers_lottie.h"
#include "data/components/credits.h"
#include "data/stickers/data_custom_emoji.h"
#include "data/data_document.h"
#include "data/data_session.h"
#include "info/channel_statistics/earn/earn_format.h"
#include "info/channel_statistics/earn/earn_icons.h"
#include "lang/lang_keys.h"
#include "lottie/lottie_icon.h"
#include "main/main_app_config.h"
#include "main/main_session.h"
#include "settings/settings_common.h" // CreateLottieIcon
#include "settings/settings_credits_graphics.h" // AddBalanceWidget
@@ -39,6 +42,8 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "styles/style_settings.h" // settingsCloudPasswordIconSize
#include "styles/style_widgets.h"
#include <QtSvg/QSvgRenderer>
namespace Ui {
namespace {
@@ -55,12 +60,30 @@ namespace {
helper.context());
}
[[nodiscard]] QImage MakeEmojiFrame(int index, int size) {
const auto path = u":/gui/dice/dice%1.svg"_q.arg(index);
const auto ratio = style::DevicePixelRatio();
auto svg = QSvgRenderer(path);
auto result = QImage(
QSize(size, size) * ratio,
QImage::Format_ARGB32_Premultiplied);
result.setDevicePixelRatio(ratio);
result.fill(Qt::transparent);
auto p = QPainter(&result);
svg.render(&p, QRect(0, 0, size, size));
p.end();
return result;
}
[[nodiscard]] object_ptr<RpWidget> MakeLogo(not_null<GenericBox*> box) {
const auto &size = st::settingsCloudPasswordIconSize;
auto icon = Settings::CreateLottieIcon(
box->verticalLayout(),
{ .name = u"dice_6"_q, .sizeOverride = { size, size } },
st::settingLocalPasscodeIconPadding);
QMargins());
const auto animate = std::move(icon.animate);
box->showFinishes() | rpl::take(1) | rpl::on_next([=] {
animate(anim::repeat::once);
@@ -75,19 +98,17 @@ namespace {
const auto raw = result.data();
struct State {
std::array<std::unique_ptr<Text::CustomEmoji>, 6> dices;
std::array<QImage, 6> dices;
std::array<Text::String, 7> multiplicators;
};
const auto state = raw->lifetime().make_state<State>();
const auto serialize = [&](int milliReward) {
return QString(QChar(0xD7)) + QString::number(milliReward / 1000.);
};
const auto esize = st::largeEmojiSize;
const auto esize = st::stakeEmojiSize;
for (auto i = 0; i != 6; ++i) {
state->dices[i] = Lottie::MakeEmoji({
.name = u"dice_%1"_q.arg(i + 1),
.sizeOverride = QSize(esize, esize),
}, [=] { raw->update(); });
state->dices[i] = MakeEmojiFrame(i + 1, esize);
const auto value = (i < args.milliRewards.size())
? args.milliRewards[i]
: 0;
@@ -137,13 +158,12 @@ namespace {
auto hq = PainterHighQualityEnabler(p);
p.drawPath(path);
const auto etop = -style::ConvertScale(10);
const auto etop = st::stakeEmojiTop;
const auto ttop = etop + esize;
{
auto left = border + half;
const auto width = (inner.width() - 3 * border) / 4.;
auto top = border + half;
const auto now = crl::now();
for (auto i = 0; i != 7; ++i, left += width + border) {
if (i == 4) {
left -= 4 * (width + border);
@@ -157,25 +177,17 @@ namespace {
const auto w = (right - x);
if (i < 6) {
state->dices[i]->paint(p, {
.textColor = st::windowBoldFg->c,
.now = now,
.position = QPoint(x + (w - esize) / 2, y + etop),
.paused = true,
.internal = { .forceLastFrame = true }
});
p.drawImage(
x + (w - esize) / 2,
y + etop,
state->dices[i]);
} else {
const auto e = state->dices.back().get();
const auto &last = state->dices.back();
for (auto j = 0; j != 3; ++j) {
e->paint(p, {
.textColor = st::windowBoldFg->c,
.now = now,
.position = QPoint(
x + (w - 3 * esize) / 2 + (esize * j),
y + etop),
.paused = true,
.internal = { .forceLastFrame = true }
});
p.drawImage(
x + (w - 3 * esize) / 2 + (esize * j),
y + etop,
last);
}
}
@@ -249,6 +261,36 @@ not_null<InputField*> AddTonInputField(
return result;
}
void AddApproximateUsd(
not_null<QWidget*> field,
not_null<Main::Session*> session,
rpl::producer<CreditsAmount> price) {
auto value = std::move(price) | rpl::map([=](CreditsAmount amount) {
if (!amount) {
return QString();
}
const auto appConfig = &session->appConfig();
const auto rate = amount.ton()
? appConfig->currencySellRate()
: (appConfig->starsSellRate() / 100.);
return Info::ChannelEarn::ToUsd(amount, rate, 2);
});
const auto usd = Ui::CreateChild<Ui::FlatLabel>(
field,
std::move(value),
st::suggestPriceEstimate);
const auto move = [=] {
usd->moveToRight(0, st::suggestPriceEstimateTop);
};
base::install_event_filter(field, [=](not_null<QEvent*> e) {
if (e->type() == QEvent::Resize) {
move();
}
return base::EventFilterResult::Continue;
});
usd->widthValue() | rpl::on_next(move, usd->lifetime());
}
void EmojiGameStakeBox(
not_null<GenericBox*> box,
EmojiGameStakeArgs &&args) {
@@ -268,6 +310,10 @@ void EmojiGameStakeBox(
Text::CustomEmojiTextBadge(
tr::lng_stake_game_beta(tr::now),
st::customEmojiTextBadge));
const auto sixText = helper.image({
.image = MakeEmojiFrame(6, st::emojiSize),
.textColor = false,
});
auto title = tr::lng_stake_game_title(
tr::marked
) | rpl::map([=](TextWithEntities &&text) {
@@ -304,12 +350,7 @@ void EmojiGameStakeBox(
st::boxRowPadding + QMargins(-half, 0, -half, skip / 2),
style::al_top);
const auto six = Lottie::IconDescriptor{
.name = u"dice_6"_q,
.sizeOverride = { st::emojiSize, st::emojiSize },
};
const auto sixText = Text::LottieEmoji(six);
const auto sixContext = Text::LottieEmojiContext(six);
const auto sixContext = helper.context();
const auto factory = [=](
QStringView data,
const Text::MarkedContext &context) {
@@ -352,15 +393,35 @@ void EmojiGameStakeBox(
field->setFocusFast();
});
const auto price = field->lifetime().make_state<rpl::variable<int64>>(
args.currentStake);
auto priceValue = price->value() | rpl::map([=](int64 amount) {
return CreditsAmount(
amount / Ui::kNanosInOne,
amount % Ui::kNanosInOne,
CreditsType::Ton);
});
AddApproximateUsd(
field,
args.session,
std::move(priceValue));
field->changes() | rpl::on_next([=] {
*price = Ui::ParseTonAmountString(field->getLastText()).value_or(0);
}, field->lifetime());
const auto submit = args.submit;
const auto callback = [=] {
const auto text = field->getLastText();
const auto now = Ui::ParseTonAmountString(text);
if (!now) {
const auto now = Ui::ParseTonAmountString(text).value_or(0);
const auto appConfig = &args.session->appConfig();
const auto min = appConfig->stakeDiceNanoTonMin();
const auto max = appConfig->stakeDiceNanoTonMax();
if (!now || now < min || now > max) {
field->showError();
} else {
box->closeBox();
submit(*now);
submit(now);
}
};
field->submits() | rpl::on_next(callback, field->lifetime());
@@ -368,7 +429,8 @@ void EmojiGameStakeBox(
button->setText(tr::lng_stake_game_save_and_roll(
) | rpl::map([=](QString text) {
return tr::marked(
return Text::IconEmoji(
&st::stakeEmojiIcon,
QString::fromUtf8("\xf0\x9f\x8e\xb2")
).append(' ').append(text);
}));
@@ -34,6 +34,11 @@ struct TonInputFieldArgs {
not_null<VerticalLayout*> container,
TonInputFieldArgs &&args);
void AddApproximateUsd(
not_null<QWidget*> field,
not_null<Main::Session*> session,
rpl::producer<CreditsAmount> price);
struct EmojiGameStakeArgs {
not_null<Main::Session*> session;
int64 currentStake = 0;
+9
View File
@@ -1459,3 +1459,12 @@ messageGiftIconSkip: 30px;
newChatIcon: icon{{ "chat/new_topic", windowFgActive }};
newChatIconPadding: margins(2px, 2px, 2px, 2px);
stakeEmojiSize: 20px;
stakeEmojiTop: 8px;
stakeEmojiIcon: IconEmoji {
icon: icon{{ "chat/mini_roll-18x18", activeButtonFg }};
padding: margins(1px, 2px, 1px, 0px);
}
stakeIconEmojiSize: 12px;
stakeIconEmojiTop: 3px;