diff --git a/languages/zh.css b/languages/zh.css index 03b5df01..c37f16b3 100644 --- a/languages/zh.css +++ b/languages/zh.css @@ -334,7 +334,7 @@ content: "稀有(OR):"; } .search-box .awoken-div::before{ - content: "▼觉醒(AND)(提示:点击数字可减少数值)"; + content: "▼觉醒(AND)(提示:长按清除)"; } .search-box .sawoken-div::before{ content: "▼超觉醒(OR)"; diff --git a/multi.html b/multi.html index 633aca4f..d48bb09b 100644 --- a/multi.html +++ b/multi.html @@ -562,91 +562,91 @@ var formation = new Formation(teamsCount,5);
+
+ + + +
-
- - - -
diff --git a/script.js b/script.js index fae5eee0..71904a31 100644 --- a/script.js +++ b/script.js @@ -1426,12 +1426,43 @@ function initialize() { if (count < 9) { count++; countDom.value = count; - //this.setAttribute("value", count); - this.parentNode.classList.remove("zero"); + this.setAttribute("value", count); + //this.parentNode.classList.remove("zero"); } } + function search_awokenClear() { + this.setAttribute("value", 0); + const countDom = this.parentNode.querySelector(".count"); + countDom.value = 0; + //this.parentNode.classList.add("zero"); + } + const longPressDuration = 1000; //1秒钟 + function search_awokenLongPressStart(e) { + let _this = this; + this.longPress = setTimeout(function(){ + search_awokenClear.apply(_this); + }, longPressDuration); + this.startTime = new Date(); //仅仅给自己设一个开始时间 + } + function search_awokenLongPressEnd(e) { + const endTime = new Date(); + if ((endTime - this.startTime) < longPressDuration) + { + search_awokenAdd1.apply(this); + } + clearTimeout(this.longPress); + this.startTime = null; + } + function search_awokenLongPressBreak(e) { + const endTime = new Date(); + clearTimeout(this.longPress); + this.startTime = null; + } s_awokensIcons.forEach((b, idx) => { //每种觉醒增加1 - b.onclick = search_awokenAdd1; + //b.onclick = search_awokenAdd1; + b.onmousedown = search_awokenLongPressStart; + b.onmouseup = search_awokenLongPressEnd; + b.onmouseout = search_awokenLongPressBreak; }); function search_awokenSub1() { @@ -1439,8 +1470,9 @@ function initialize() { if (count > 0) { count--; this.value = count; + this.parentNode.parentNode.querySelector(".awoken-icon").setAttribute("value", count); if (count === 0) { - this.parentNode.parentNode.classList.add("zero"); + //this.parentNode.parentNode.classList.add("zero"); } } } diff --git a/solo.html b/solo.html index 1eef4aa2..298e4bb8 100644 --- a/solo.html +++ b/solo.html @@ -478,91 +478,91 @@ var formation = new Formation(teamsCount,6);
+
+ + + +
-
- - - -
diff --git a/style.css b/style.css index 4f7ff2fc..76ade163 100644 --- a/style.css +++ b/style.css @@ -1189,10 +1189,44 @@ ul{ /*.search-box .awoken-div::before{ content: "觉醒"; }*/ -.search-box .awoken-div .awoken-option -{ - display: inline; + +.awoken-div, +.sawoken-div{ + display: inline-block; +} +.awoken-div .awoken-icon{ + position: relative; + opacity: var(--search-icon-unchecked); +} +.awoken-div .awoken-icon:not([value="0"]){ + opacity: 1; +} +.awoken-div .awoken-icon~.count-symbol{ + opacity: var(--search-icon-unchecked); +} +.awoken-div .awoken-icon:not([value="0"])~.count-symbol{ + opacity: 1; +} + +.awoken-div .awoken-icon::before{ + display: none; } +.awoken-div .awoken-icon:not([value="0"])::before{ + display: inline-block; + content: attr(value); + position: absolute; + line-height: 18px; + font-size: 18px; + right: 0; + bottom: 0; + -webkit-text-stroke: 1px black; + text-stroke: 1px black; + text-shadow: black 1px 1px 1px; +} +.count-symbol{ + display: none !important; +} + .search-box .awoken-div .awoken-clear::before, .search-box .sawoken-div .sawoken-clear::before { @@ -1202,11 +1236,10 @@ ul{ .search-box .sawoken-div .sawoken-clear { padding: 0; - float: right; } .awoken-div .awoken-ul.official-awoken-sorting { - width: 620px; + width: 350px; } .awoken-ul .awoken-count { @@ -1215,7 +1248,8 @@ ul{ font-family: var(--game-font-family); display: inline-block; - margin-right: 3px; + margin-right: 5px; + margin-top: 5px; } .awoken-ul .count { @@ -1277,6 +1311,7 @@ ul{ .sawoken-div .sawoken-ul .awoken-count { margin-right: 5px; + margin-top: 5px; } .control-div button{ diff --git a/triple.html b/triple.html index 266d3c9e..5d61cbc5 100644 --- a/triple.html +++ b/triple.html @@ -1205,91 +1205,91 @@ var formation = new Formation(teamsCount,6);
+
+ + + +
-
- - - -