buildingmaker palette

This commit is contained in:
minjaesong
2023-10-15 12:39:04 +09:00
parent 1af172d354
commit 20f2f2f7b1
3 changed files with 47 additions and 10 deletions

View File

@@ -31,7 +31,7 @@ class UIItemVertSlider(
private var mouseOnHandle = false
private val handleTravelDist = height - handleHeight
private var handlePos = (initialValue / max).times(handleTravelDist).coerceIn(0.0, handleTravelDist.toDouble())
private var handlePos = if (max == 0.0) 0.0 else (initialValue / max).times(handleTravelDist).coerceIn(0.0, handleTravelDist.toDouble())
var value: Double = initialValue; private set
var selectionChangeListener: (Double) -> Unit = {}