feat: reworked app resources system

Added all the icons in case somebody will miss some;
Added "kill game process" button when launcher's behavior
is set to "Nothing" and the game is running
This commit is contained in:
Observer KRypt0n_ 2023-07-31 23:58:02 +02:00
parent 06db94de58
commit 0f932b8619
No known key found for this signature in database
GPG key ID: 844DA47BA25FE1E2
24 changed files with 201 additions and 16 deletions

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 0 11 v 2.5 c 0 1.378906 1.121094 2.5 2.5 2.5 h 0.5 c 1.105469 0 2 -0.894531 2 -2 s 0.894531 -2 2 -2 s 2 0.894531 2 2 c 0.136719 1.242188 1.257812 2.136719 2.5 2 c 1.378906 0 2.5 -1.117188 2.5 -2.5 v -2.5 c 0 -2.210938 -1.789062 -4 -4 -4 h -6 c -2.210938 0 -4 1.789062 -4 4 z m 3.25 -2 h 0.5 c 0.136719 0 0.25 0.113281 0.25 0.25 v 0.75 h 0.75 c 0.136719 0 0.25 0.113281 0.25 0.25 v 0.5 c 0 0.140625 -0.113281 0.25 -0.25 0.25 h -0.75 v 0.75 c 0 0.140625 -0.113281 0.25 -0.25 0.25 h -0.5 c -0.140625 0 -0.25 -0.109375 -0.25 -0.25 v -0.75 h -0.75 c -0.140625 0 -0.25 -0.109375 -0.25 -0.25 v -0.5 c 0 -0.136719 0.109375 -0.25 0.25 -0.25 h 0.75 v -0.75 c 0 -0.136719 0.109375 -0.25 0.25 -0.25 z m 6.25 0.75 c 0.414062 0 0.75 0.335938 0.75 0.75 s -0.335938 0.75 -0.75 0.75 s -0.75 -0.335938 -0.75 -0.75 s 0.335938 -0.75 0.75 -0.75 z m 2 1 c 0.414062 0 0.75 0.335938 0.75 0.75 s -0.335938 0.75 -0.75 0.75 s -0.75 -0.335938 -0.75 -0.75 s 0.335938 -0.75 0.75 -0.75 z m 0 0"/>
<path d="m 2 3.015625 c 0.007812 1.65625 1.359375 2.992187 3.015625 2.984375 h 7.96875 c 1.664063 0 3.015625 -1.351562 3.015625 -3.015625 c -0.007812 -1.65625 -1.359375 -2.9921875 -3.015625 -2.984375 h -7.96875 c -1.664063 0 -3.015625 1.351562 -3.015625 3.015625 z m 3.21875 -2.015625 h 0.5 c 0.136719 0 0.25 0.113281 0.25 0.25 v 0.75 h 0.75 c 0.136719 0 0.25 0.113281 0.25 0.25 v 0.5 c 0 0.140625 -0.113281 0.25 -0.25 0.25 h -0.75 v 0.75 c 0 0.140625 -0.113281 0.25 -0.25 0.25 h -0.5 c -0.140625 0 -0.25 -0.109375 -0.25 -0.25 v -0.75 h -0.75 c -0.140625 0 -0.25 -0.109375 -0.25 -0.25 v -0.5 c 0 -0.136719 0.109375 -0.25 0.25 -0.25 h 0.75 v -0.75 c 0 -0.136719 0.109375 -0.25 0.25 -0.25 z m 6.25 0.75 c 0.414062 0 0.75 0.335938 0.75 0.75 s -0.335938 0.75 -0.75 0.75 s -0.75 -0.335938 -0.75 -0.75 s 0.335938 -0.75 0.75 -0.75 z m 2 0.03125 c 0.414062 0 0.75 0.335938 0.75 0.75 s -0.335938 0.75 -0.75 0.75 s -0.75 -0.335938 -0.75 -0.75 s 0.335938 -0.75 0.75 -0.75 z m 0 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 7.886719 0.00390625 c -2.109375 0.03124995 -4.945313 0.80078175 -4.898438 3.27734375 c 0.050781 2.589844 2.921875 1.664062 3.15625 2.71875 c 0.035157 -0.042969 0.085938 -0.082031 0.121094 -0.125 c 0.199219 -0.210938 0.394531 -0.386719 0.59375 -0.59375 c 0.3125 -0.351562 0.636719 -0.675781 0.964844 -1.03125 c 1.109375 -1.175781 1.15625 -1.25 3.800781 -3.25 c -1.035156 -0.617188 -2.261719 -0.9609375 -3.300781 -0.99609375 c -0.132813 -0.00390625 -0.292969 -0.00390625 -0.4375 0 z m 6.144531 0 c -1.796875 1.29687475 -4.203125 3.30078175 -6.113281 5.33203175 c -0.171875 0.183593 -0.339844 0.363281 -0.503907 0.546874 c -0.101562 0.109376 -0.210937 0.195313 -0.3125 0.308594 c -0.066406 0.078125 -0.128906 0.160156 -0.191406 0.238282 c -1.300781 1.4375 -2.582031 3.128906 -3.648437 4.683593 c -0.308594 -0.15625 -0.699219 -0.171875 -1.117188 0.101563 c -0.753906 0.496094 -0.597656 2.285156 -2.14843725 2.285156 c 0.14843725 0.601562 1.73437525 0.59375 2.80859425 0.324219 c 1.011718 -0.253907 1.324218 -1.140625 1.132812 -1.886719 c -0.03125 -0.105469 -0.078125 -0.210938 -0.144531 -0.320312 c 1.984375 -1.640626 3.386719 -3.003907 4.34375 -4.023438 c 0.242187 -0.246094 0.53125 -0.566406 0.851562 -0.925781 c 1.207031 -1.332031 2.925781 -3.433594 5.042969 -6.66406275 z m -8.042969 1.52734375 c 0.824219 0 1.492188 0.671875 1.492188 1.5 c 0 0.832031 -0.667969 1.5 -1.492188 1.5 c -0.828125 0 -1.5 -0.667969 -1.5 -1.5 c 0 -0.828125 0.671875 -1.5 1.5 -1.5 z m 7.265625 0.664062 c -1.417968 2.234376 -2.367187 3.554688 -3.367187 4.585938 c -0.640625 0.660156 -1.164063 1.3125 -1.625 1.78125 c -0.835938 0.890625 -1.9375 1.941406 -3.148438 3.09375 c 0.0625 1.46875 0.808594 2.746094 3.242188 3.21875 c 3.898437 0.757812 8.027343 -1.824219 7.613281 -7.0625 c -0.179688 -2.246094 -1.40625 -4.28125 -2.714844 -5.617188 z m 0.34375 3.804688 c 0.546875 0 0.996094 0.449219 0.996094 1 c 0 0.554688 -0.449219 1 -0.996094 1 s -0.996094 -0.445312 -0.996094 -1 c 0 -0.550781 0.449219 -1 0.996094 -1 z m -0.625 3 c 0.546875 0 0.996094 0.449219 0.996094 1 c 0 0.554688 -0.449219 1 -0.996094 1 s -0.996094 -0.445312 -0.996094 -1 c 0 -0.550781 0.449219 -1 0.996094 -1 z m -4.992187 2 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 c -0.546875 0 -0.996094 -0.449219 -0.996094 -1 s 0.449219 -1 0.996094 -1 z m 2.996093 0 c 0.546876 0 1 0.449219 1 1 s -0.453124 1 -1 1 c -0.546874 0 -0.996093 -0.449219 -0.996093 -1 s 0.449219 -1 0.996093 -1 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 2.5 KiB

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 7.996094 0 c -2.835938 0 -5.292969 2 -5.871094 4.777344 c -0.527344 2.535156 0.6875 5.035156 2.875 6.328125 v 0.894531 c 0 0.554688 0.449219 1 1 1 h 4 c 0.550781 0 1 -0.445312 1 -1 l 0.003906 -0.898438 c 2.179688 -1.292968 3.398438 -3.796874 2.867188 -6.332031 c -0.582032 -2.773437 -3.039063 -4.769531 -5.875 -4.769531 z m 0 2 c 1.898437 0 3.527344 1.320312 3.917968 3.179688 c 0.390626 1.863281 -0.570312 3.726562 -2.3125 4.488281 c -0.363281 0.15625 -0.597656 0.515625 -0.601562 0.914062 v 0.417969 h -2 v -0.417969 c -0.003906 -0.398437 -0.238281 -0.753906 -0.601562 -0.914062 c -1.742188 -0.761719 -2.703126 -2.625 -2.316407 -4.484375 s 2.015625 -3.183594 3.914063 -3.183594 z m -1.996094 12 v 1 c 0 0.554688 0.445312 1 1 1 h 2 c 0.554688 0 1 -0.445312 1 -1 v -1 z m 0 0"/>
<path d="m 6.644531 6.144531 c -0.195312 0.195313 -0.195312 0.515625 0 0.707031 l 1 1 c 0.195313 0.195313 0.511719 0.195313 0.707031 0 l 1 -1 c 0.195313 -0.191406 0.195313 -0.511718 0 -0.707031 c -0.195312 -0.191406 -0.511718 -0.191406 -0.707031 0 l -0.648437 0.648438 l -0.644532 -0.648438 c -0.195312 -0.191406 -0.511718 -0.191406 -0.707031 0 z m 0 0" fill-opacity="0.34902"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 4 0 c -1.644531 0 -3 1.355469 -3 3 v 10 c 0 1.644531 1.355469 3 3 3 h 3 c 0.550781 0 1 -0.449219 1 -1 s -0.449219 -1 -1 -1 h -3 c -0.570312 0 -1 -0.429688 -1 -1 v -10 c 0 -0.570312 0.429688 -1 1 -1 h 5.585938 l 3.414062 3.414062 v 6.585938 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -7 c 0 -0.265625 -0.105469 -0.519531 -0.292969 -0.707031 l -4 -4 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 4.640625 6.167969 c -0.199219 0.003906 -0.402344 0.019531 -0.597656 0.046875 l 1.171875 2.074218 c 0.242187 0.425782 -0.027344 0.914063 -0.539063 1.210938 l -0.925781 0.53125 c -0.515625 0.289062 -1.089844 0.25 -1.332031 -0.175781 l -1.171875 -2.074219 c -0.25 0.308594 -0.476563 0.648438 -0.617188 1.019531 c -0.679687 1.761719 0.285156 3.46875 2.152344 3.804688 c 0.386719 0.074219 0.800781 0.054687 1.191406 0.007812 c 0.03125 -0.007812 1.859375 3.386719 1.859375 3.386719 l 4.167969 0.003906 l -3.199219 -4.957031 c 0.246094 -0.308594 0.445313 -0.652344 0.585938 -1.019531 c 0.679687 -1.765625 -0.285157 -3.472656 -2.148438 -3.808594 c -0.195312 -0.039062 -0.398437 -0.050781 -0.597656 -0.046875 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 8 0 c -0.550781 0 -1 0.449219 -1 1 v 8.585938 l -1.292969 -1.292969 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 s -0.519531 0.105469 -0.707031 0.292969 c -0.390625 0.390625 -0.390625 1.023437 0 1.414062 l 3 3 c 0.390625 0.390625 1.023437 0.390625 1.414062 0 l 3 -3 c 0.390625 -0.390625 0.390625 -1.023437 0 -1.414062 s -1.023437 -0.390625 -1.414062 0 l -1.292969 1.292969 v -8.585938 c 0 -0.550781 -0.449219 -1 -1 -1 z m -7 14 v 2 h 14 v -2 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 630 B

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 13.753906 4.660156 c 0.175782 -0.199218 0.261719 -0.460937 0.246094 -0.726562 c -0.019531 -0.265625 -0.140625 -0.511719 -0.339844 -0.6875 c -0.199218 -0.175782 -0.460937 -0.261719 -0.726562 -0.246094 c -0.265625 0.019531 -0.511719 0.140625 -0.6875 0.339844 l -6.296875 7.195312 l -2.242188 -2.242187 c -0.390625 -0.390625 -1.023437 -0.390625 -1.414062 0 c -0.1875 0.1875 -0.292969 0.441406 -0.292969 0.707031 s 0.105469 0.519531 0.292969 0.707031 l 3 3 c 0.195312 0.195313 0.464843 0.304688 0.738281 0.292969 c 0.277344 -0.007812 0.539062 -0.132812 0.722656 -0.339844 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 743 B

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 8 0 c -0.550781 0 -1 0.449219 -1 1 v 0.238281 c 0 0.464844 -0.378906 0.902344 -0.820312 1.046875 c -0.023438 0.007813 -0.042969 0.011719 -0.0625 0.019532 c -0.445313 0.148437 -1.007813 0.015624 -1.28125 -0.359376 l -0.140626 -0.195312 c -0.15625 -0.214844 -0.390624 -0.359375 -0.652343 -0.398438 c -0.261719 -0.042968 -0.53125 0.019532 -0.742188 0.175782 c -0.449219 0.324218 -0.550781 0.949218 -0.222656 1.398437 l 0.140625 0.199219 c 0.277344 0.375 0.226562 0.953125 -0.050781 1.328125 c -0.011719 0.015625 -0.023438 0.035156 -0.035157 0.050781 c -0.273437 0.378906 -0.804687 0.601563 -1.25 0.457032 l -0.230468 -0.074219 c -0.523438 -0.171875 -1.089844 0.117187 -1.257813 0.640625 c -0.171875 0.527344 0.113281 1.089844 0.640625 1.261718 l 0.222656 0.074219 c 0.445313 0.144531 0.738282 0.636719 0.75 1.101563 v 0.070312 c 0.015626 0.464844 -0.304687 0.960938 -0.746093 1.105469 l -0.226563 0.070313 c -0.527344 0.171874 -0.8125 0.738281 -0.640625 1.261718 c 0.167969 0.523438 0.734375 0.8125 1.257813 0.640625 l 0.230468 -0.074219 c 0.445313 -0.144531 0.976563 0.078126 1.25 0.457032 c 0.011719 0.015625 0.027344 0.035156 0.039063 0.050781 c 0.277344 0.375 0.324219 0.953125 0.050781 1.328125 l -0.144531 0.203125 c -0.324219 0.445313 -0.226563 1.070313 0.222656 1.394531 c 0.445313 0.324219 1.070313 0.226563 1.394531 -0.21875 l 0.144532 -0.199218 c 0.273437 -0.378907 0.835937 -0.507813 1.277344 -0.359376 c 0.019531 0.007813 0.042968 0.011719 0.0625 0.019532 c 0.445312 0.140625 0.820312 0.578125 0.820312 1.046875 v 0.238281 c 0 0.550781 0.449219 1 1 1 s 1 -0.449219 1 -1 v -0.238281 c 0 -0.46875 0.378906 -0.90625 0.820312 -1.046875 c 0.023438 -0.007813 0.042969 -0.015625 0.066407 -0.023438 c 0.441406 -0.144531 1.003906 -0.015625 1.277343 0.363282 l 0.144532 0.199218 c 0.324218 0.445313 0.949218 0.542969 1.394531 0.21875 c 0.445313 -0.324218 0.546875 -0.949218 0.222656 -1.394531 l -0.148437 -0.203125 c -0.273438 -0.375 -0.226563 -0.953125 0.050781 -1.328125 c 0.015625 -0.015625 0.027344 -0.035156 0.039063 -0.050781 c 0.273437 -0.378906 0.804687 -0.601563 1.25 -0.457032 l 0.234374 0.078126 c 0.523438 0.167968 1.085938 -0.121094 1.257813 -0.644532 c 0.171875 -0.523437 -0.117187 -1.089844 -0.640625 -1.257812 l -0.230469 -0.074219 c -0.445312 -0.144531 -0.734375 -0.640625 -0.746093 -1.105469 c 0 -0.023437 0 -0.046875 0 -0.070312 c -0.015626 -0.464844 0.300781 -0.957032 0.746093 -1.101563 l 0.230469 -0.074219 c 0.523438 -0.171874 0.8125 -0.734374 0.640625 -1.261718 c -0.171875 -0.523438 -0.734375 -0.8125 -1.257813 -0.640625 l -0.230468 0.074219 c -0.445313 0.144531 -0.980469 -0.078126 -1.253906 -0.457032 c -0.011719 -0.015625 -0.023438 -0.035156 -0.035157 -0.050781 c -0.277343 -0.375 -0.324219 -0.953125 -0.050781 -1.328125 l 0.144531 -0.199219 c 0.324219 -0.445312 0.226563 -1.074219 -0.222656 -1.398437 c -0.214844 -0.15625 -0.480469 -0.21875 -0.742187 -0.179688 c -0.265626 0.042969 -0.5 0.1875 -0.652344 0.402344 l -0.144532 0.195312 c -0.273437 0.378907 -0.835937 0.507813 -1.28125 0.363282 c -0.019531 -0.007813 -0.039062 -0.015625 -0.0625 -0.023438 c -0.441406 -0.140625 -0.820312 -0.578125 -0.820312 -1.046875 v -0.238281 c 0 -0.550781 -0.449219 -1 -1 -1 z m 0 4 c 0.871094 0 1.675781 0.273438 2.332031 0.742188 c 0.003907 0.007812 0.011719 0.015624 0.019531 0.023437 c 0.011719 0.003906 0.019532 0.007813 0.03125 0.015625 c 0.660157 0.484375 1.160157 1.171875 1.421876 1.976562 v 0.007813 s 0.003906 0.003906 0.003906 0.007813 c 0.292968 0.851562 0.15625 1.65625 0 2.457031 c 0 0 -0.003906 0.003906 -0.003906 0.007812 v 0.003907 c -0.261719 0.800781 -0.757813 1.488281 -1.414063 1.976562 c -0.015625 0.003906 -0.027344 0.011719 -0.039063 0.019531 c -0.007812 0.003907 -0.015624 0.011719 -0.019531 0.019531 c -0.65625 0.46875 -1.460937 0.742188 -2.332031 0.742188 c -0.855469 0 -1.644531 -0.265625 -2.289062 -0.714844 c -0.019532 -0.015625 -0.042969 -0.035156 -0.0625 -0.046875 c -0.011719 -0.007812 -0.023438 -0.015625 -0.035157 -0.019531 c -0.652343 -0.484375 -1.148437 -1.160156 -1.40625 -1.945312 c -0.003906 -0.015626 -0.007812 -0.023438 -0.011719 -0.035157 c -0.003906 -0.007812 -0.007812 -0.015625 -0.011718 -0.019531 c -0.285156 -0.847656 -0.148438 -1.644531 0 -2.4375 c 0.003906 -0.007812 0.007812 -0.011719 0.011718 -0.019531 c 0.003907 -0.011719 0.007813 -0.023438 0.011719 -0.039063 c 0.261719 -0.785156 0.757813 -1.460937 1.414063 -1.945312 c 0.007812 -0.003906 0.019531 -0.007813 0.027344 -0.015625 c 0.019531 -0.011719 0.042968 -0.03125 0.058593 -0.046875 c 0.648438 -0.449219 1.4375 -0.714844 2.292969 -0.714844 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 4.6 KiB

View file

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 1 4 v 1 h 8 v -1 z m 0 0"/>
<path d="m 3 1 c -1.644531 0 -3 1.355469 -3 3 v 8 c 0 1.644531 1.355469 3 3 3 h 10 c 1.644531 0 3 -1.355469 3 -3 v -6 c 0 -1.644531 -1.355469 -3 -3 -3 h -3.585938 l -1.707031 -1.707031 c -0.1875 -0.1875 -0.441406 -0.292969 -0.707031 -0.292969 z m 0 2 h 3.585938 l 1.707031 1.707031 c 0.1875 0.1875 0.441406 0.292969 0.707031 0.292969 h 4 c 0.5625 0 1 0.4375 1 1 v 6 c 0 0.566406 -0.4375 1 -1 1 h -10 c -0.5625 0 -1 -0.433594 -1 -1 v -8 c 0 -0.5625 0.4375 -1 1 -1 z m 0 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 695 B

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 4 2 c 0 -0.265625 0.105469 -0.519531 0.292969 -0.707031 c 0.390625 -0.390625 1.023437 -0.390625 1.414062 0 l 6 6 c 0.1875 0.1875 0.292969 0.441406 0.292969 0.707031 s -0.105469 0.519531 -0.292969 0.707031 l -6 6 c -0.390625 0.390625 -1.023437 0.390625 -1.414062 0 c -0.1875 -0.1875 -0.292969 -0.441406 -0.292969 -0.707031 s 0.105469 -0.519531 0.292969 -0.707031 l 5.292969 -5.292969 l -5.292969 -5.292969 c -0.1875 -0.1875 -0.292969 -0.441406 -0.292969 -0.707031 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 638 B

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 12 2 c 0 -0.265625 -0.105469 -0.519531 -0.292969 -0.707031 c -0.390625 -0.390625 -1.023437 -0.390625 -1.414062 0 l -6 6 c -0.1875 0.1875 -0.292969 0.441406 -0.292969 0.707031 s 0.105469 0.519531 0.292969 0.707031 l 6 6 c 0.390625 0.390625 1.023437 0.390625 1.414062 0 c 0.1875 -0.1875 0.292969 -0.441406 0.292969 -0.707031 s -0.105469 -0.519531 -0.292969 -0.707031 l -5.292969 -5.292969 l 5.292969 -5.292969 c 0.1875 -0.1875 0.292969 -0.441406 0.292969 -0.707031 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 638 B

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 7 1 v 6 h -6 v 2 h 6 v 6 h 2 v -6 h 6 v -2 h -6 v -6 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 228 B

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 2 2.5 v 11 c 0 1.5 1.269531 1.492188 1.269531 1.492188 h 0.128907 c 0.246093 0.003906 0.488281 -0.050782 0.699218 -0.171876 l 9.796875 -5.597656 c 0.433594 -0.242187 0.65625 -0.734375 0.65625 -1.226562 c 0 -0.492188 -0.222656 -0.984375 -0.65625 -1.222656 l -9.796875 -5.597657 c -0.210937 -0.121093 -0.453125 -0.175781 -0.699218 -0.175781 h -0.128907 s -1.269531 0 -1.269531 1.5 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 554 B

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 1 2 h 14 v 2 h -14 z m 0 0"/>
<path d="m 1 7 h 14 v 2 h -14 z m 0 0"/>
<path d="m 1 12 h 14 v 2 h -14 z m 0 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 314 B

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 2 0 c -0.550781 0 -1 0.449219 -1 1 v 8 c 0 2.5 1.816406 4.246094 3.445312 5.332031 c 1.628907 1.085938 3.238282 1.617188 3.238282 1.617188 c 0.207031 0.070312 0.425781 0.070312 0.632812 0 c 0 0 1.609375 -0.53125 3.238282 -1.617188 c 1.628906 -1.085937 3.445312 -2.832031 3.445312 -5.332031 v -8 c 0 -0.550781 -0.449219 -1 -1 -1 z m 1 2 h 10 v 7 c 0 1.5 -1.183594 2.753906 -2.554688 3.667969 c -1.214843 0.808593 -2.179687 1.128906 -2.445312 1.226562 c -0.265625 -0.097656 -1.230469 -0.417969 -2.445312 -1.226562 c -1.371094 -0.914063 -2.554688 -2.167969 -2.554688 -3.667969 z m 1 1 v 6 c 0 1 0.867188 2.007812 2.109375 2.835938 c 0.933594 0.621093 1.472656 0.785156 1.890625 0.949218 c 0.417969 -0.164062 0.957031 -0.328125 1.890625 -0.949218 c 1.242187 -0.828126 2.109375 -1.835938 2.109375 -2.835938 v -6 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 982 B

View file

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<g fill="#2e3436">
<path d="m 1 3 h 14 c 0.550781 0 1 0.449219 1 1 s -0.449219 1 -1 1 h -14 c -0.550781 0 -1 -0.449219 -1 -1 s 0.449219 -1 1 -1 z m 0 0"/>
<path d="m 4 4 v -1.5 c 0 -1.386719 1.113281 -2.5 2.5 -2.5 h 2.980469 c 1.382812 0 2.5 1.113281 2.5 2.5 v 1.5 h -2 v -1.5 c 0 -0.269531 -0.230469 -0.5 -0.5 -0.5 h -2.980469 c -0.269531 0 -0.5 0.230469 -0.5 0.5 v 1.5 z m 0 0"/>
<path d="m 4 4 v 9 c 0 0.546875 0.453125 1 1 1 h 6 c 0.546875 0 1 -0.453125 1 -1 v -9 h 2 v 9 c 0 1.660156 -1.339844 3 -3 3 h -6 c -1.660156 0 -3 -1.339844 -3 -3 v -9 z m 0 0"/>
<path d="m 7 7 v 5 c 0 0.277344 -0.222656 0.5 -0.5 0.5 s -0.5 -0.222656 -0.5 -0.5 v -5 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 s 0.5 0.222656 0.5 0.5 z m 0 0"/>
<path d="m 10 7 v 5 c 0 0.277344 -0.222656 0.5 -0.5 0.5 s -0.5 -0.222656 -0.5 -0.5 v -5 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 s 0.5 0.222656 0.5 0.5 z m 0 0"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 7.40625 1 c -0.613281 0.007812 -1.234375 0.089844 -1.847656 0.253906 c -3.273438 0.878906 -5.558594 3.855469 -5.558594 7.246094 s 2.285156 6.367188 5.558594 7.242188 c 3.273437 0.878906 6.742187 -0.558594 8.4375 -3.492188 c 0.277344 -0.480469 0.109375 -1.089844 -0.367188 -1.367188 c -0.476562 -0.273437 -1.089844 -0.109374 -1.367187 0.367188 c -1.246094 2.160156 -3.777344 3.207031 -6.1875 2.5625 c -2.40625 -0.644531 -4.074219 -2.820312 -4.074219 -5.3125 c 0 -2.496094 1.667969 -4.667969 4.074219 -5.3125 c 2.410156 -0.644531 4.941406 0.402344 6.1875 2.5625 c 0.058593 0.085938 0.125 0.164062 0.203125 0.226562 l -0.019532 0.015626 l -0.007812 0.007812 h -1.4375 c -0.550781 0 -1 0.449219 -1 1 c 0 0 0 1 1 1 h 5 v -5 s 0.003906 -1 -1 -1 c -0.550781 0 -1 0.449219 -1 1 v 1.6875 l -0.015625 0.011719 l -0.011719 0.011719 c -1.277344 -2.179688 -3.53125 -3.519532 -5.953125 -3.691407 c -0.203125 -0.015625 -0.40625 -0.019531 -0.613281 -0.019531 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View file

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" height="16px" viewBox="0 0 16 16" width="16px"><path d="m 14.285156 0.59375 c -0.382812 0.011719 -0.746094 0.171875 -1.015625 0.441406 l -3.535156 3.535156 l 1.414063 1.414063 l 2.535156 -2.535156 c 0.574218 0.273437 1.257812 0.15625 1.707031 -0.292969 c 0.585937 -0.585938 0.585937 -1.535156 0 -2.121094 c -0.292969 -0.292968 -0.691406 -0.453125 -1.105469 -0.441406 z m -5.257812 4.683594 l -8.484375 8.488281 c 0.707031 0.703125 5.65625 1.410156 12.019531 -4.953125 z m 0 0"/></svg>

After

Width:  |  Height:  |  Size: 564 B

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg">
<path d="m 4 4 h 1 h 0.03125 c 0.253906 0.011719 0.511719 0.128906 0.6875 0.3125 l 2.28125 2.28125 l 2.3125 -2.28125 c 0.265625 -0.230469 0.445312 -0.304688 0.6875 -0.3125 h 1 v 1 c 0 0.285156 -0.035156 0.550781 -0.25 0.75 l -2.28125 2.28125 l 2.25 2.25 c 0.1875 0.1875 0.28125 0.453125 0.28125 0.71875 v 1 h -1 c -0.265625 0 -0.53125 -0.09375 -0.71875 -0.28125 l -2.28125 -2.28125 l -2.28125 2.28125 c -0.1875 0.1875 -0.453125 0.28125 -0.71875 0.28125 h -1 v -1 c 0 -0.265625 0.09375 -0.53125 0.28125 -0.71875 l 2.28125 -2.25 l -2.28125 -2.28125 c -0.210938 -0.195312 -0.304688 -0.46875 -0.28125 -0.75 z m 0 0" fill="#2e3436"/>
</svg>

After

Width:  |  Height:  |  Size: 767 B

View file

@ -1,12 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<gresources> <gresources>
<gresource prefix="/org/app"> <gresource prefix="/moe/launcher/an-anime-game-launcher">
<file compressed="true">images/icon.png</file> <file preprocess="xml-stripblanks">images/modern.svg</file>
<file preprocess="xml-stripblanks">images/classic.svg</file>
</gresource> </gresource>
<gresource prefix="/org/app">
<file compressed="true">images/modern.svg</file> <gresource prefix="/moe/launcher/an-anime-game-launcher/icons/hicolor/scalable/apps">
<file alias="moe.launcher.an-anime-game-launcher.png">images/icon.png</file>
</gresource> </gresource>
<gresource prefix="/org/app">
<file compressed="true">images/classic.svg</file> <gresource prefix="/moe/launcher/an-anime-game-launcher/icons/scalable/actions">
<!-- Standard icons -->
<file preprocess="xml-stripblanks" alias="document-save-symbolic.svg">images/icons/document-save-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="folder-symbolic.svg">images/icons/folder-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="emblem-ok-symbolic.svg">images/icons/emblem-ok-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="open-menu-symbolic.svg">images/icons/open-menu-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="media-playback-start-symbolic.svg">images/icons/media-playback-start-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="window-close-symbolic.svg">images/icons/window-close-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="security-high-symbolic.svg">images/icons/security-high-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="emblem-system-symbolic.svg">images/icons/emblem-system-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="user-trash-symbolic.svg">images/icons/user-trash-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="go-previous-symbolic.svg">images/icons/go-previous-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="document-properties-symbolic.svg">images/icons/document-properties-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="list-add-symbolic.svg">images/icons/list-add-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="view-refresh-symbolic.svg">images/icons/view-refresh-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="applications-games-symbolic.svg">images/icons/applications-games-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="applications-graphics-symbolic.svg">images/icons/applications-graphics-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="go-next-symbolic.svg">images/icons/go-next-symbolic.svg</file>
<file preprocess="xml-stripblanks" alias="dialog-information-symbolic.svg">images/icons/dialog-information-symbolic.svg</file>
<!-- Additional icons icons -->
<file preprocess="xml-stripblanks" alias="violence-symbolic.svg">images/icons/violence-symbolic.svg</file>
</gresource> </gresource>
</gresources> </gresources>

View file

@ -24,6 +24,8 @@ use ui::main::*;
use ui::first_run::main::*; use ui::first_run::main::*;
pub const APP_ID: &str = "moe.launcher.an-anime-game-launcher"; pub const APP_ID: &str = "moe.launcher.an-anime-game-launcher";
pub const APP_RESOURCE_PATH: &str = "/moe/launcher/an-anime-game-launcher";
pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION"); pub const APP_VERSION: &str = env!("CARGO_PKG_VERSION");
pub const APP_DEBUG: bool = cfg!(debug_assertions); pub const APP_DEBUG: bool = cfg!(debug_assertions);
@ -134,6 +136,10 @@ fn main() {
gtk::gio::resources_register_include!("resources.gresource") gtk::gio::resources_register_include!("resources.gresource")
.expect("Failed to register resources"); .expect("Failed to register resources");
// Set icons search path
gtk::IconTheme::for_display(&gtk::gdk::Display::default().unwrap())
.add_resource_path(&format!("{APP_RESOURCE_PATH}/icons"));
// Set application's title // Set application's title
gtk::glib::set_application_name("An Anime Game Launcher"); gtk::glib::set_application_name("An Anime Game Launcher");
gtk::glib::set_program_name(Some("An Anime Game Launcher")); gtk::glib::set_program_name(Some("An Anime Game Launcher"));

View file

@ -29,7 +29,7 @@ impl SimpleAsyncComponent for WelcomeApp {
set_vexpand: true, set_vexpand: true,
gtk::Image { gtk::Image {
set_resource: Some("/org/app/images/icon.png"), set_icon_name: Some(APP_ID),
set_height_request: 128 set_height_request: 128
}, },

View file

@ -11,8 +11,11 @@ pub fn launch(sender: ComponentSender<App>) {
let config = Config::get().unwrap(); let config = Config::get().unwrap();
match config.launcher.behavior { match config.launcher.behavior {
// Disable launch button if behavior set to "Nothing" to prevent sussy actions // Disable launch button and show kill game button if behavior set to "Nothing" to prevent sussy actions
LauncherBehavior::Nothing => sender.input(AppMsg::DisableButtons(true)), LauncherBehavior::Nothing => {
sender.input(AppMsg::DisableButtons(true));
sender.input(AppMsg::SetKillGameButton(true));
}
// Hide launcher window if behavior set to "Hide" or "Close" // Hide launcher window if behavior set to "Hide" or "Close"
LauncherBehavior::Hide | LauncherBehavior::Close => sender.input(AppMsg::HideWindow) LauncherBehavior::Hide | LauncherBehavior::Close => sender.input(AppMsg::HideWindow)
@ -29,8 +32,11 @@ pub fn launch(sender: ComponentSender<App>) {
} }
match config.launcher.behavior { match config.launcher.behavior {
// Enable launch button if behavior set to "Nothing" after the game has closed // Enable launch button and hide kill game button if behavior set to "Nothing" after the game has closed
LauncherBehavior::Nothing => sender.input(AppMsg::DisableButtons(false)), LauncherBehavior::Nothing => {
sender.input(AppMsg::DisableButtons(false));
sender.input(AppMsg::SetKillGameButton(false));
}
// Show back launcher window if behavior set to "Hide" and the game has closed // Show back launcher window if behavior set to "Hide" and the game has closed
LauncherBehavior::Hide => sender.input(AppMsg::ShowWindow), LauncherBehavior::Hide => sender.input(AppMsg::ShowWindow),

View file

@ -59,7 +59,9 @@ pub struct App {
state: Option<LauncherState>, state: Option<LauncherState>,
downloading: bool, downloading: bool,
disabled_buttons: bool disabled_buttons: bool,
kill_game_button: bool,
disabled_kill_game_button: bool
} }
#[derive(Debug)] #[derive(Debug)]
@ -89,6 +91,8 @@ pub enum AppMsg {
SetDownloading(bool), SetDownloading(bool),
DisableButtons(bool), DisableButtons(bool),
SetKillGameButton(bool),
DisableKillGameButton(bool),
OpenPreferences, OpenPreferences,
RepairGame, RepairGame,
@ -219,7 +223,7 @@ impl SimpleComponent for App {
set_visible: model.style == LauncherStyle::Modern, set_visible: model.style == LauncherStyle::Modern,
gtk::Picture { gtk::Picture {
set_resource: Some("/org/app/images/icon.png"), set_resource: Some(&format!("{APP_RESOURCE_PATH}/icons/hicolor/scalable/apps/{APP_ID}.png")),
set_vexpand: true, set_vexpand: true,
set_content_fit: gtk::ContentFit::ScaleDown set_content_fit: gtk::ContentFit::ScaleDown
}, },
@ -395,6 +399,9 @@ impl SimpleComponent for App {
adw::Bin { adw::Bin {
set_css_classes: &["background", "round-bin"], set_css_classes: &["background", "round-bin"],
#[watch]
set_visible: !model.kill_game_button,
gtk::Button { gtk::Button {
adw::ButtonContent { adw::ButtonContent {
#[watch] #[watch]
@ -532,6 +539,48 @@ impl SimpleComponent for App {
} }
}, },
adw::Bin {
set_css_classes: &["background", "round-bin"],
#[watch]
set_visible: model.kill_game_button,
gtk::Button {
adw::ButtonContent {
set_icon_name: "violence-symbolic", // window-close-symbolic
set_label: "Kill game process"
},
#[watch]
set_visible: model.kill_game_button,
#[watch]
set_sensitive: !model.disabled_kill_game_button,
set_css_classes: &["error", "pill"],
set_hexpand: false,
set_width_request: 200,
connect_clicked[sender] => move |_| {
sender.input(AppMsg::DisableKillGameButton(true));
std::thread::spawn(clone!(@strong sender => move || {
std::thread::sleep(std::time::Duration::from_secs(3));
sender.input(AppMsg::DisableKillGameButton(false));
}));
if let Err(err) = std::process::Command::new("pkill").arg("GenshinImpact.e").spawn() {
sender.input(AppMsg::Toast {
title: String::from("Failed to kill the game's process"),
description: Some(err.to_string())
});
}
}
}
},
adw::Bin { adw::Bin {
set_css_classes: &["background", "round-bin"], set_css_classes: &["background", "round-bin"],
@ -590,7 +639,9 @@ impl SimpleComponent for App {
state: None, state: None,
downloading: false, downloading: false,
disabled_buttons: false disabled_buttons: false,
kill_game_button: false,
disabled_kill_game_button: false
}; };
model.progress_bar.widget().set_halign(gtk::Align::Center); model.progress_bar.widget().set_halign(gtk::Align::Center);
@ -1019,6 +1070,14 @@ impl SimpleComponent for App {
self.disabled_buttons = state; self.disabled_buttons = state;
} }
AppMsg::SetKillGameButton(state) => {
self.kill_game_button = state;
}
AppMsg::DisableKillGameButton(state) => {
self.disabled_kill_game_button = state;
}
AppMsg::OpenPreferences => unsafe { AppMsg::OpenPreferences => unsafe {
PREFERENCES_WINDOW.as_ref().unwrap_unchecked().widget().present(); PREFERENCES_WINDOW.as_ref().unwrap_unchecked().widget().present();
} }

View file

@ -188,7 +188,7 @@ impl SimpleAsyncComponent for GeneralApp {
set_active: model.style == LauncherStyle::Modern, set_active: model.style == LauncherStyle::Modern,
gtk::Image { gtk::Image {
set_from_resource: Some("/org/app/images/modern.svg") set_resource: Some(&format!("{APP_RESOURCE_PATH}/images/modern.svg"))
}, },
connect_clicked => GeneralAppMsg::UpdateLauncherStyle(LauncherStyle::Modern) connect_clicked => GeneralAppMsg::UpdateLauncherStyle(LauncherStyle::Modern)
@ -214,7 +214,7 @@ impl SimpleAsyncComponent for GeneralApp {
set_active: model.style == LauncherStyle::Classic, set_active: model.style == LauncherStyle::Classic,
gtk::Image { gtk::Image {
set_from_resource: Some("/org/app/images/classic.svg") set_resource: Some(&format!("{APP_RESOURCE_PATH}/images/classic.svg"))
}, },
connect_clicked => GeneralAppMsg::UpdateLauncherStyle(LauncherStyle::Classic) connect_clicked => GeneralAppMsg::UpdateLauncherStyle(LauncherStyle::Classic)