add ability to select cursor colour
This commit is contained in:
@@ -263,6 +263,16 @@ struct
|
||||
fun updateBlue model = (AppWith.b model, [])
|
||||
fun updateAlpha model = (AppWith.a model, [])
|
||||
|
||||
fun selectCursorColour (model: app_type) =
|
||||
let
|
||||
val {squares, arrowX, arrowY, ...} = model
|
||||
val yAxis = Vector.sub (squares, arrowX)
|
||||
val {r, g, b, a} = Vector.sub (yAxis, arrowY)
|
||||
val model = AppWith.cursorColour (model, r, g, b, a)
|
||||
in
|
||||
(model, [])
|
||||
end
|
||||
|
||||
fun updateCanvas (model, canvasWidth, canvasHeight) =
|
||||
let
|
||||
val
|
||||
@@ -359,6 +369,7 @@ struct
|
||||
| KEY_G => updateGreen model
|
||||
| KEY_B => updateBlue model
|
||||
| KEY_A => updateAlpha model
|
||||
| KEY_C => selectCursorColour model
|
||||
| KEY_W => updateCanvasWidth model
|
||||
| KEY_H => updateCanvasHeight model
|
||||
| KEY_M => enterMoveMode model
|
||||
|
||||
Reference in New Issue
Block a user