Add menu option for auto camera rotation

This commit is contained in:
2021-09-11 20:22:44 +01:00
parent f2553ded0e
commit ea333a363b
5 changed files with 34 additions and 22 deletions
+17 -2
View File
@@ -12,7 +12,6 @@ import Preload.Update
import Dodge.Base.Window
import Dodge.SoundLogic
import Picture
--import Geometry
import Control.Lens
import Data.Maybe
@@ -25,8 +24,9 @@ optionMenu = OptionScreen
}
optionsOptions :: [MenuOption]
optionsOptions =
[ Toggle ScancodeV (pushScreen soundMenu) (const "VOLUME")
[ Toggle ScancodeV (pushScreen soundMenu) (const "VOLUME")
, Toggle ScancodeG (pushScreen graphicsMenu) (const "GRAPHICS")
, Toggle ScancodeP (pushScreen gameplayOptionsMenu) (const "GAMEPLAY")
]
levelMenuOptions :: [MenuOption]
levelMenuOptions =
@@ -34,6 +34,21 @@ levelMenuOptions =
, InvisibleToggle ScancodeO (pushScreen optionMenu)
, InvisibleToggle ScancodeC (pushScreen displayControls)
]
gameplayOptionsMenu :: ScreenLayer
gameplayOptionsMenu = OptionScreen
{ _scTitle = const "OPTIONS:GAMEPLAY"
, _scOptions = gameplayMenuOptions
, _scDefaultEff = popScreen . writeConfig
, _scOptionFlag = NormalOptions
}
gameplayMenuOptions :: [MenuOption]
gameplayMenuOptions =
[ Toggle
ScancodeR
(Just . (config . rotate_to_wall %~ not))
(\w -> "ROTATE TO WALL:" ++ show (_rotate_to_wall $ _config w))
]
soundMenu :: ScreenLayer
soundMenu = OptionScreen
{ _scTitle = const "OPTIONS:VOLUME"