Work on terminals and machines

This commit is contained in:
2022-06-06 00:14:46 +01:00
parent a6141fd79a
commit b0173c3778
8 changed files with 81 additions and 66 deletions
+5
View File
@@ -211,6 +211,7 @@ defaultMachine = Machine
, _mcDeath = \_ -> id
, _mcApplyDamage = \_ _ -> id
, _mcDraw = const mempty
, _mcColor = white
, _mcPos = V2 0 0
, _mcDir = 0
, _mcHP = 1000
@@ -239,6 +240,9 @@ defaultDrawButton col bt =
| _btState bt == BtOff = rectNSEW 10 (-1) width (-width)
| otherwise = rectNSEW 2 (-1) width (-width)
width = 8
defaultTerminal :: Terminal
defaultTerminal = Terminal 0 (\_ _ -> NoTerminalParams) 0 0 "TESTTERMINAL"
defaultButton :: Button
defaultButton = Button
{ _btPict = defaultDrawButton (dark red)
@@ -250,6 +254,7 @@ defaultButton = Button
, _btText = "Button"
, _btState = BtOff
, _btTerminalParams = const NoTerminalParams
, _btTerminal = Nothing
, _btName = ""
}
defaultPT :: Prop