diff --git a/sq2bs.css b/sq2bs.css
index 946c209..8fad12d 100644
--- a/sq2bs.css
+++ b/sq2bs.css
@@ -128,6 +128,46 @@
.aDam:before, .Air:before, .Air_powder:before { content: "\274b" ' '; }
+.e_slider, .t_slider, .w_slider, .f_slider, .a_slider {
+ -webkit-appearance: none;
+ background: #AAAAAA;
+ border-radius: 30px;
+ height: 0.5rem;
+}
+
+/***** Chrome, Safari, Opera, and Edge Chromium *****/
+.e_slider::-webkit-slider-runnable-track, .t_slider::-webkit-slider-runnable-track, .w_slider::-webkit-slider-runnable-track, .f_slider::-webkit-slider-runnable-track, .a_slider::-webkit-slider-runnable-track {
+ -webkit-appeareance: none;
+ background:transparent;
+ height: 0.5rem;
+}
+
+
+/******** Firefox **** **/
+.e_slider::-moz-range-track, .t_slider::-moz-range-track, .w_slider::-moz-range-track, .f_slider::-moz-range-track, .a_slider::-moz-range-track {
+ -webkit-appearance: none;
+ background-color: transparent;
+ border-radius: 30px;
+ height: 0.5rem;
+}
+
+
+.e_slider::-webkit-slider-thumb, .t_slider::-webkit-slider-thumb, .w_slider::-webkit-slider-thumb, .f_slider::-webkit-slider-thumb, .a_slider::-webkit-slider-thumb {
+ -webkit-appearance: none;
+ appearance: none;
+ height: 0.75rem;
+ width: 0.75rem;
+ border-radius: 0.375rem;
+ margin-top: -0.125rem;
+ background-color: #FFFFFF;
+ border: solid 2px #82CFD0;
+}
+
+input[type=range]:focus {
+ outline: none; /* Removes the border. */
+}
+
+
.nDam, .Neutral {
color: #FFAA00;
}
diff --git a/sq2bs.html b/sq2bs.html
index 857ed5f..0c5adfe 100644
--- a/sq2bs.html
+++ b/sq2bs.html
@@ -491,7 +491,7 @@
Rage (Passive)
-
+
@@ -534,7 +534,7 @@
Kill Streak (Passive)
-
+
@@ -577,7 +577,7 @@
Concentration (Passive)
-
+
@@ -620,7 +620,7 @@
Endurance (Passive)
-
+
@@ -663,7 +663,7 @@
Dodge (Passive)
-
+
diff --git a/sq2builder.js b/sq2builder.js
index eb9924a..35f81b8 100644
--- a/sq2builder.js
+++ b/sq2builder.js
@@ -655,19 +655,26 @@ function updateArmorPowderSpecials(elem_id) {
let elem = document.getElementById(elem_id);
let value = elem.value;
- let dmg_id = elem_chars[skp_names.indexOf(wynn_elem)] + "DamPct";
- let new_dmgboost = player_build.externalStats.get(dmg_id) + (value - armor_powder_boosts[skp_names.indexOf(wynn_elem)]);
- armor_powder_boosts[skp_names.indexOf(wynn_elem)] = value;
let label = document.getElementById(elem_id + "_label");
- label.textContent = label.textContent.split(":")[0] + ": " + elem.value;
+ label.textContent = label.textContent.split(":")[0] + ": " + value;
- //update build stats
- player_build.externalStats.set(dmg_id, new_dmgboost);
+ if (player_build) {
+ let dmg_id = elem_chars[skp_names.indexOf(wynn_elem)] + "DamPct";
+ let new_dmgboost = player_build.externalStats.get(dmg_id) + (value - armor_powder_boosts[skp_names.indexOf(wynn_elem)]);
+ armor_powder_boosts[skp_names.indexOf(wynn_elem)] = value;
+ //update build stats
+ player_build.externalStats.set(dmg_id, new_dmgboost);
+
+ //calc build stats and display powder special
+ calculateBuildStats();
+ // displaysq2PowderSpecials(document.getElementById("powder-special-stats"), powderSpecials, player_build, true);
+ }
- //calc build stats and display powder special
- calculateBuildStats();
- // displaysq2PowderSpecials(document.getElementById("powder-special-stats"), powderSpecials, player_build, true);
+ //update the slider's graphics
+ let bg_color = elem_colors[skp_names.indexOf(wynn_elem)];
+ let pct = Math.round(100 * value / powderSpecialStats[skp_names.indexOf(wynn_elem)].cap);
+ elem.setAttribute("style.background",`linear-gradient(to right, ${bg_color}, ${bg_color} ${pct}%, #AAAAAA ${pct}%, #AAAAAA ${100 - pct}%)`);
}
/* Calculates all build statistics and updates the entire display.
diff --git a/sq2display_constants.js b/sq2display_constants.js
index 6737a3f..0d90f99 100644
--- a/sq2display_constants.js
+++ b/sq2display_constants.js
@@ -30,6 +30,14 @@ let elem_chars = [
'a'
]
+let elem_colors = [
+ "#00AA00",
+ "FFFF55",
+ "55FFFF",
+ "FF5555",
+ "FFFFFF"
+]
+
/*
* Display commands
*/