change how modal num works so that it is only clipped to 255 if setting a new colour/alpha value
This commit is contained in:
@@ -247,14 +247,8 @@ struct
|
||||
(model, drawMsg)
|
||||
end
|
||||
|
||||
fun updateNum (model: app_type, inputNum) =
|
||||
let
|
||||
val oldNum = #modalNum model
|
||||
val newNum = oldNum * 10 + inputNum
|
||||
val newNum = if newNum > 255 then 0 else newNum
|
||||
in
|
||||
fun updateNum (model: app_type, newNum) =
|
||||
(AppWith.modalNum (model, newNum), [])
|
||||
end
|
||||
|
||||
fun updateRed model = (AppWith.r model, [])
|
||||
fun updateGreen model = (AppWith.g model, [])
|
||||
|
||||
Reference in New Issue
Block a user