mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
fixed a bug where clicking on the selection display may advance the selection like pressing NEXT/+ twice
This commit is contained in:
@@ -58,7 +58,7 @@ class UIItemSpinner(
|
|||||||
else
|
else
|
||||||
0
|
0
|
||||||
|
|
||||||
if (!mouseLatched && Terrarum.mouseDown && mouseOnButton != 0) {
|
if (!mouseLatched && Terrarum.mouseDown && mouseOnButton in 1..2) {
|
||||||
mouseLatched = true
|
mouseLatched = true
|
||||||
value = (value + step * ((mouseOnButton * 2) - 3)).coerceIn(min, max)
|
value = (value + step * ((mouseOnButton * 2) - 3)).coerceIn(min, max)
|
||||||
fboUpdateLatch = true
|
fboUpdateLatch = true
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ class UIItemTextSelector(
|
|||||||
else
|
else
|
||||||
0
|
0
|
||||||
|
|
||||||
if (!mouseLatched && Terrarum.mouseDown && mouseOnButton != 0) {
|
if (!mouseLatched && Terrarum.mouseDown && mouseOnButton in 1..2) {
|
||||||
mouseLatched = true
|
mouseLatched = true
|
||||||
selection = (selection + (mouseOnButton * 2) - 3) fmod labelfuns.size
|
selection = (selection + (mouseOnButton * 2) - 3) fmod labelfuns.size
|
||||||
fboUpdateLatch = true
|
fboUpdateLatch = true
|
||||||
|
|||||||
Reference in New Issue
Block a user