change integer layer field when 'l' is pressed
This commit is contained in:
@@ -226,10 +226,13 @@ struct
|
||||
fun updateNum (model: app_type, newNum) =
|
||||
(AppWith.modalNum (model, newNum), [])
|
||||
|
||||
fun clearNum model = updateNum (model, 0)
|
||||
|
||||
fun updateRed model = (AppWith.r model, [])
|
||||
fun updateGreen model = (AppWith.g model, [])
|
||||
fun updateBlue model = (AppWith.b model, [])
|
||||
fun updateAlpha model = (AppWith.a model, [])
|
||||
fun changeLayer model = (AppWith.layer model, [])
|
||||
|
||||
fun selectCursorColour (model: app_type) =
|
||||
let
|
||||
@@ -333,10 +336,12 @@ struct
|
||||
| MOUSE_LEFT_RELEASE => mouseMoveOrRelease model
|
||||
| MOUSE_LEFT_CLICK => mouseLeftClick model
|
||||
| NUM num => updateNum (model, num)
|
||||
| KEY_ESC => clearNum model
|
||||
| KEY_R => updateRed model
|
||||
| KEY_G => updateGreen model
|
||||
| KEY_B => updateBlue model
|
||||
| KEY_A => updateAlpha model
|
||||
| KEY_L => changeLayer model
|
||||
| KEY_C => selectCursorColour model
|
||||
| KEY_W => updateCanvasWidth model
|
||||
| KEY_H => updateCanvasHeight model
|
||||
@@ -362,5 +367,4 @@ struct
|
||||
| KEY_SPACE => enterOrSpaceCoordinates model
|
||||
| FILE_BROWSER_AND_PATH {fileBrowser, path} =>
|
||||
handleFileBrowserAndPathInNormalMode (model, fileBrowser, path)
|
||||
| KEY_ESC => (model, [])
|
||||
end
|
||||
|
||||
@@ -58,13 +58,17 @@ struct
|
||||
key = Input.KEY_S () andalso action = Input.PRESS () andalso mods = 0x002
|
||||
then
|
||||
Mailbox.send (mailbox, KEY_CTRL_S)
|
||||
else if
|
||||
key = Input.KEY_L () andalso action = Input.PRESS () andalso mods = 0
|
||||
then
|
||||
Mailbox.send (mailbox, KEY_L)
|
||||
else if
|
||||
(* ctrl-l *)
|
||||
key = Input.KEY_L () andalso action = Input.PRESS () andalso mods = 0x002
|
||||
then
|
||||
Mailbox.send (mailbox, KEY_CTRL_L)
|
||||
else if
|
||||
(* ctrl-l *)
|
||||
(* ctrl-e *)
|
||||
key = Input.KEY_E () andalso action = Input.PRESS () andalso mods = 0x002
|
||||
then
|
||||
Mailbox.send (mailbox, KEY_CTRL_E)
|
||||
|
||||
@@ -16,6 +16,7 @@ struct
|
||||
| KEY_H
|
||||
| KEY_M
|
||||
| KEY_C
|
||||
| KEY_L
|
||||
| KEY_BACKSPACE
|
||||
| KEY_CTRL_S
|
||||
| KEY_CTRL_L
|
||||
|
||||
Reference in New Issue
Block a user