mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-03-07 20:31:51 +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
|
||||
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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user