diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-28 00:32:36 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-28 00:32:36 +0100 |
commit | 0da45c31bfab31ea98d00e88f2536850653680f4 (patch) | |
tree | 19eb05b33bb4926575d958585498eb379e842cac /play.js | |
parent | 7b288ce5da3fcf4d76299d9f0e43c2147a71ad3f (diff) | |
download | maria-0da45c31bfab31ea98d00e88f2536850653680f4.tar.gz |
Use icons for power action buttons
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -613,6 +613,15 @@ function make_badge(power) { return e } +const power_image = [ + '<img style="border-radius:50%" height="24" src="images/role_france.2x.png" alt="France">', + '<img style="border-radius:50%" height="24" src="images/role_prussia.2x.png" alt="Prussia">', + '<img style="border-radius:50%" height="24" src="images/role_pragmatic.2x.png" alt="Pragmatic Army">', + '<img style="border-radius:50%" height="24" src="images/role_austria.2x.png" alt="Austria">', + '<img style="border-radius:50%" height="24" src="images/role_bavaria.2x.png" alt="Bavaria">', + '<img style="border-radius:50%" height="24" src="images/role_saxony.2x.png" alt="Saxony">', +] + const power_badge = [ make_badge("france"), make_badge("prussia"), @@ -1401,10 +1410,10 @@ function on_update() { action_button_with_argument("value", v, v) for (let p = 0; p < 20; ++p) - action_button_with_argument("supreme", p, power_name[piece_power[p]]) + action_button_with_argument("supreme", p, power_image[piece_power[p]]) for (let pow of all_powers) - action_button_with_argument("power", pow, power_name[pow]) + action_button_with_argument("power", pow, power_image[pow]) action_button("subsidy", "Subsidy") action_button("cancel", "Cancel") |