Move universe IO effects outside of world
This commit is contained in:
+3
-3
@@ -134,13 +134,13 @@ soundMenuOptions =
|
||||
scod2
|
||||
(change inc stype)
|
||||
(\w -> Right (str , leftPad 2 '.' $ show (round $ 10 * voltype (_uvConfig w)::Int)))
|
||||
change g vt = return . Just . (uvConfig . vt %~ g) . sw
|
||||
change g vt uv = sw uv >> return (Just $ uv & uvConfig . vt %~ g)
|
||||
dec x = max 0 (x - 0.1)
|
||||
inc x = min 1 (x + 0.1)
|
||||
sw w = w & uvWorld . sideEffects %~ setVolThen (_uvConfig w)
|
||||
sw w = setVol (_uvConfig w)
|
||||
|
||||
writeConfig :: Universe -> Universe
|
||||
writeConfig w = w & uvWorld . sideEffects %~ saveConfig (_uvConfig w)
|
||||
writeConfig w = w & uvIOEffects %~ saveConfig (_uvConfig w)
|
||||
|
||||
graphicsMenu :: ScreenLayer
|
||||
graphicsMenu = slTitleOptions "OPTIONS:GRAPHICS" graphicsMenuOptions
|
||||
|
||||
Reference in New Issue
Block a user