From 5ff9d6ff22d23964d5273d2ea1e052ba6cc53710 Mon Sep 17 00:00:00 2001 From: ferricles Date: Sun, 22 May 2022 00:50:53 -0700 Subject: [PATCH] spell detail clickable indicator added --- builder/index.html | 36 +++++++++++++++---------------- js/sq2display.js | 37 ++++++++++++++++++++++++++++++++ media/icons/new/toggle_down.png | Bin 0 -> 834 bytes media/icons/new/toggle_up.png | Bin 0 -> 809 bytes media/icons/old/toggle_down.png | Bin 0 -> 834 bytes media/icons/old/toggle_up.png | Bin 0 -> 809 bytes 6 files changed, 55 insertions(+), 18 deletions(-) create mode 100644 media/icons/new/toggle_down.png create mode 100644 media/icons/new/toggle_up.png create mode 100644 media/icons/old/toggle_down.png create mode 100644 media/icons/old/toggle_up.png diff --git a/builder/index.html b/builder/index.html index c49ccb4..03bdedd 100644 --- a/builder/index.html +++ b/builder/index.html @@ -1240,31 +1240,31 @@
-
-
melee
+
+
melee
-
-
poison
+
+
poison
-
-
spell1
- +
+
spell1
+
-
-
spell2
- +
+
spell2
+
-
-
spell3
- +
+
spell3
+
-
-
spell4
- +
+
spell4
+
-
-
+
+
diff --git a/js/sq2display.js b/js/sq2display.js index b6b588b..7043e8e 100644 --- a/js/sq2display.js +++ b/js/sq2display.js @@ -1411,6 +1411,43 @@ function displaysq2SpellDamage(parent_elem, overallparent_elem, build, spell, sp part_divavg.append(overallaverageLabel); } } + + //up and down arrow - done ugly + + + + let down_arrow = document.createElement("img"); + down_arrow.id = "down_arrow_" + overallparent_elem.id; + down_arrow.style.maxWidth = document.body.clientWidth > 900 ? "3rem" : "10rem"; + down_arrow.src = "../media/icons/" + (newIcons ? "new" : "old") + "/toggle_down.png"; + overallparent_elem.appendChild(down_arrow); + + let up_arrow = document.createElement("img"); + up_arrow.id = "up_arrow_" + overallparent_elem.id; + up_arrow.style.maxWidth = document.body.clientWidth > 900 ? "3rem" : "10rem"; + up_arrow.src = "../media/icons/" + (newIcons ? "new" : "old") + "/toggle_up.png"; + up_arrow.style.display = "none"; + overallparent_elem.appendChild(up_arrow); + + overallparent_elem.setAttribute("onclick", overallparent_elem.getAttribute("onclick") + `;toggleUpDownArrow("${overallparent_elem.id}")`); +} + +function toggleUpDownArrow(parent_id) { + parent_elem = document.getElementById(parent_id); + if (parent_elem) { + let down_arrow = document.getElementById("down_arrow_" + parent_id); + if (down_arrow.style.display === "none") { + down_arrow.style.display = ""; + } else { + down_arrow.style.display = "none"; + } + let up_arrow = document.getElementById("up_arrow_" + parent_id); + if (up_arrow.style.display === "none") { + up_arrow.style.display = ""; + } else { + up_arrow.style.display = "none"; + } + } } function displaysq2EquipOrder(parent_elem, buildOrder){ diff --git a/media/icons/new/toggle_down.png b/media/icons/new/toggle_down.png new file mode 100644 index 0000000000000000000000000000000000000000..4154d3dfdd23fbaf463e792dd232f9bf05b761b7 GIT binary patch literal 834 zcmV-I1HJr-P)Px%{7FPXRCt{2)JvA*FbqRcWPw?27T7(glPfK1l9?qdPAC_?}dZS~u(0&G!+0Gu7^w8I71q6`7dcBR8E6<~`p z1aOyLz16J%Ta+Py-bQrQkOFK`h5*hQ-A}^{utgaH*m7ql-CBSx$`HWYtR9+HfGx@p zsK=puEDEqi83K8^_07Msar-feG6XVk>=x;#Usemo`G;r!1AuK&I%Km@qC5n^T#j9_ z)f0zG#PNX=WeCjT*a=7a;B;{~K3t*-efEb4H*j|jJ6|AR}e%a&p+967k&L9`nP^|NaT0xEFLxfDC= zVSjv$Ye*so1oOD&S;~{?6pvWr8lEh{!5FT&m2ze`-GkP+hALyAaGYyCrTiI9{kS!* zVapyg{LeLqQmrhOdFUF~5LOCcCFIRd*@rI?PK-dVyfK6ogcetjpEwxE2EvRz$Vp5L z=K$A`O9Xue*F2Dg{TS3quHlzBfRSAH&d$$aXdSp7g~Va>;JROSdmRJp%=K6#4rVWQ zSO>!#h(n5lUDd>3Z^D83VJBe76L5I*FnhEZ_+%X9c+41|Fnlwv#~STWUFRspn`LG! z!kFt3yB@IXyd>Y5RmW0-a6RtXhwVBSY5r`mjRghddh~Z4yzBcVN-r9g6CLBT0*Wk~7a3_^p;W|bkO zhpPw>x*A=ElpcB_OcPx%<4Ht8RCt{2)InC;KoA7b=75}*115_A$s?9!TN+Kx%>TPUu%+(mdMoJQUv1pkS%ToqE`*^Qy|7 z+3GAMOzIJjcEG7~tQv2YGqZ@!9BO-J%ofA%z(Mw7_WaAhFXHg>*a?Q*kOLcsU9HJr zPv(%uXNT)B%o8}6xux#cZjUp-7o{FWmBVN$b?+)V^VWlHD`9GdZEdizwl;y#B+|$194`NBs zo;$m(%a>aQ^yB{iy6g)L9rCPxmrcK9_2I%uR=n5KKX}CUkD?6!q0V+M< zRjvD}NdYQ7;A}0r>a+q>dcalA>a9ZssPur|j&#`51*r6ZWY2WkLj|bxfD!HW+hzeO nJzyrcy6(FG6&|pPuipC&A#A~L#C|)I00000NkvXXu0mjfx^j(4 literal 0 HcmV?d00001 diff --git a/media/icons/old/toggle_down.png b/media/icons/old/toggle_down.png new file mode 100644 index 0000000000000000000000000000000000000000..4154d3dfdd23fbaf463e792dd232f9bf05b761b7 GIT binary patch literal 834 zcmV-I1HJr-P)Px%{7FPXRCt{2)JvA*FbqRcWPw?27T7(glPfK1l9?qdPAC_?}dZS~u(0&G!+0Gu7^w8I71q6`7dcBR8E6<~`p z1aOyLz16J%Ta+Py-bQrQkOFK`h5*hQ-A}^{utgaH*m7ql-CBSx$`HWYtR9+HfGx@p zsK=puEDEqi83K8^_07Msar-feG6XVk>=x;#Usemo`G;r!1AuK&I%Km@qC5n^T#j9_ z)f0zG#PNX=WeCjT*a=7a;B;{~K3t*-efEb4H*j|jJ6|AR}e%a&p+967k&L9`nP^|NaT0xEFLxfDC= zVSjv$Ye*so1oOD&S;~{?6pvWr8lEh{!5FT&m2ze`-GkP+hALyAaGYyCrTiI9{kS!* zVapyg{LeLqQmrhOdFUF~5LOCcCFIRd*@rI?PK-dVyfK6ogcetjpEwxE2EvRz$Vp5L z=K$A`O9Xue*F2Dg{TS3quHlzBfRSAH&d$$aXdS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