Use strict tuples for SPics

This commit is contained in:
2024-10-01 01:20:29 +01:00
parent a98ec80f59
commit 5a4f2711c8
17 changed files with 69 additions and 481 deletions
+2 -4
View File
@@ -17,20 +17,18 @@ drawSwitch col1 col2 bt
| _btState bt == BtOff = flick $ pi / 4
| otherwise = flick (negate (pi / 4))
where
flick a =
flick a = noPic
( mconcat
[ colorSH col1 . upperBox Small Typical 20 $ reverse $ rectNSWE (-2) (-5) (-10) 10
, colorSH col2 . translateSH (V3 0 (-2) 20) . rotateSH a . upperBox Small Typical 2 $
reverse $
rectNSWE 10 0 (-2) 2
]
, mempty
)
defaultDrawButton :: Color -> Button -> SPic
defaultDrawButton col bt =
defaultDrawButton col bt = noPic
( translateSHz 15 . colorSH col $ upperBox Small Typical 5 buttonGeometry
, mempty
)
where
buttonGeometry