Fix button not updating bug

This commit is contained in:
2022-06-14 18:47:11 +01:00
parent dafbd8a2da
commit 0957c79e58
10 changed files with 51 additions and 67 deletions
+9 -8
View File
@@ -77,15 +77,16 @@ putTerminal col f = putTerminal'' (mc & mcColor .~ col) f (\_ -> basicMachineUpd
termButton :: Button
termButton = Button
{ _btPict = const mempty
, _btPos = 0
, _btRot = 0
, _btEvent = accessTerminal . _btTermMID
, _btID = 0
, _btText = "TERMINAL"
, _btState = BtOff
{ _btPict = const mempty
, _btPos = 0
, _btRot = 0
, _btEvent = accessTerminal . _btTermMID
, _btID = 0
, _btText = "TERMINAL"
, _btState = BtOff
, _btTermMID = Nothing
, _btName = ""
, _btName = ""
, _btColor = dark magenta
}
terminalColor :: Color
+8
View File
@@ -32,6 +32,14 @@ heightWall h ps = ps0j (PutShape . colorSH col $ upperPrismPoly h ps)
, _wlHeight = h
}
invisibleWall :: [Point2] -> Placement
invisibleWall ps = sps0 $ PutWall ps $ defaultWall
{ _wlOpacity = SeeAbove
, _wlDraw = False
, _wlHeight = 0
, _wlTouchThrough = True
}
midWall :: [Point2] -> Placement
midWall ps = ps0j (PutShape . colorSH col $ upperPrismPoly 50 ps)
$ sps0 $ PutWall ps theWall