From e5db278efbf5f22204526b9f8fafb853d1718e9e Mon Sep 17 00:00:00 2001 From: Joël Simoneau Date: Mon, 31 Mar 2025 17:12:00 -0400 Subject: Localized battle box --- images/gui_box_maximize.svg | 3 +++ images/gui_box_minimize.svg | 3 +++ play.css | 24 ++++++++++++++++++++---- play.html | 45 +++++++++++++++++++++++---------------------- play.js | 29 ++++++++++++++++++++++++----- 5 files changed, 73 insertions(+), 31 deletions(-) create mode 100644 images/gui_box_maximize.svg create mode 100644 images/gui_box_minimize.svg diff --git a/images/gui_box_maximize.svg b/images/gui_box_maximize.svg new file mode 100644 index 0000000..038c71a --- /dev/null +++ b/images/gui_box_maximize.svg @@ -0,0 +1,3 @@ + + + diff --git a/images/gui_box_minimize.svg b/images/gui_box_minimize.svg new file mode 100644 index 0000000..add3008 --- /dev/null +++ b/images/gui_box_minimize.svg @@ -0,0 +1,3 @@ + + + diff --git a/play.css b/play.css index feb06e5..b65830f 100644 --- a/play.css +++ b/play.css @@ -216,18 +216,16 @@ img.f { z-index: 200; box-shadow: 0px 5px 10px 0px rgba(0,0,0,0.5); border: 1px solid black; - min-width: 425px; - background-color: #d6c4a9; + min-width: 494px; } -@media (max-width: 400px) { +@media (max-width: 494px) { #attack_table { min-width: 90vw; min-width: 90dvw; } } -#attack_header { background-color: brown; color: gold } #attack_header { list-style: none; cursor: move; @@ -237,8 +235,26 @@ img.f { text-align: center; font-weight: bold; font-size: 18px; + + background-repeat: no-repeat; + background-position: 100% 50%; + background-image: url(images/gui_box_maximize.svg); + background-color: rgba(165, 42, 42, 0.637); + color: gold; } +#attack_table[open] { + background-color: #d6c4a9; +} + +#attack_table[open] #attack_header { + cursor: n-resize; + border-bottom: 1px solid black; + background-image: url(images/gui_box_minimize.svg); + background-color: brown; +} + + /* SPACES */ path { fill: none; stroke-width: 4; } diff --git a/play.html b/play.html index f5ea375..e91e13a 100644 --- a/play.html +++ b/play.html @@ -58,35 +58,36 @@
-
- Attack in $NAME -
-
- -
-
Attacker
-
+ +
+ +
+ Attack in $NAME +
+
+ +
+
Attacker
+
+
+
-
-
-
-
- -
-
-
Defender
+
+
+ +
+
+
Defender
+
+
-
-
- -
+ -
- +