Add num_shadow_casters graphics parameter, allow cycle down enum options

This commit is contained in:
2023-02-26 23:38:58 +00:00
parent bf1bd5bb0b
commit 6b0f78d4eb
9 changed files with 203 additions and 151 deletions
+7 -1
View File
@@ -11,8 +11,9 @@ makeBoolOption lns t =
(\u -> MODStringOption t (show (u ^# uvConfig . lns)))
makeEnumOption lns str sideeff =
Toggle
Toggle2
(\u -> sideeff (u & uvConfig . lns #%~ cycleEnum))
(\u -> sideeff (u & uvConfig . lns #%~ cycleDownEnum))
(\u -> MODStringOption str (show (u ^# uvConfig . lns)))
makeSubmenuOption submenu t = Toggle (pushScreen submenu) (const t)
@@ -21,3 +22,8 @@ cycleEnum :: (Eq a, Enum a, Bounded a) => a -> a
cycleEnum x
| x == maxBound = minBound
| otherwise = succ x
cycleDownEnum :: (Eq a, Enum a, Bounded a) => a -> a
cycleDownEnum x
| x == minBound = maxBound
| otherwise = pred x