fixed a bug where clicking on the selection display may advance the selection like pressing NEXT/+ twice

This commit is contained in:
minjaesong
2021-10-24 19:38:30 +09:00
parent 4336f0ff87
commit f3c025898c
2 changed files with 2 additions and 2 deletions

View File

@@ -58,7 +58,7 @@ class UIItemSpinner(
else
0
if (!mouseLatched && Terrarum.mouseDown && mouseOnButton != 0) {
if (!mouseLatched && Terrarum.mouseDown && mouseOnButton in 1..2) {
mouseLatched = true
value = (value + step * ((mouseOnButton * 2) - 3)).coerceIn(min, max)
fboUpdateLatch = true

View File

@@ -59,7 +59,7 @@ class UIItemTextSelector(
else
0
if (!mouseLatched && Terrarum.mouseDown && mouseOnButton != 0) {
if (!mouseLatched && Terrarum.mouseDown && mouseOnButton in 1..2) {
mouseLatched = true
selection = (selection + (mouseOnButton * 2) - 3) fmod labelfuns.size
fboUpdateLatch = true