Nub close points for game room boundaries

This commit is contained in:
2021-10-04 09:39:18 +01:00
parent df9a8ea242
commit c8e08d903e
8 changed files with 67 additions and 95 deletions
+22 -29
View File
@@ -18,7 +18,6 @@ import Dodge.Initialisation
import Preload.Update
import Dodge.Base.Window
import Dodge.SoundLogic
--import Picture
import Control.Lens
optionMenu :: ScreenLayer
@@ -30,13 +29,15 @@ optionMenu = OptionScreen
}
optionsOptions :: [MenuOption]
optionsOptions =
[ Toggle ScancodeV (pushScreen soundMenu) (const "VOLUME")
, Toggle ScancodeG (pushScreen graphicsMenu) (const "GRAPHICS")
, Toggle ScancodeP (pushScreen gameplayOptionsMenu) (const "GAMEPLAY")
, Toggle ScancodeD (pushScreen debugOptionsMenu) (const "DEBUG OPTIONS")
[ anOption ScancodeV soundMenu "VOLUME"
, anOption ScancodeG graphicsMenu "GRAPHICS"
, anOption ScancodeP gameplayMenu "GAMEPLAY"
, anOption ScancodeD debugMenu "DEBUG OPTIONS"
]
debugOptionsMenu :: ScreenLayer
debugOptionsMenu = OptionScreen
where
anOption scode submenu t = Toggle scode (pushScreen submenu) (const t)
debugMenu :: ScreenLayer
debugMenu = OptionScreen
{ _scTitle = const "OPTIONS:GAMEPLAY"
, _scOptions = debugMenuOptions
, _scDefaultEff = popScreen . writeConfig
@@ -44,21 +45,16 @@ debugOptionsMenu = OptionScreen
}
debugMenuOptions :: [MenuOption]
debugMenuOptions =
[ Toggle ScancodeF
(Just . (config . debug_seconds_frame %~ not))
(\w -> "SHOW SECONDS/FRAME:" ++ show (_debug_seconds_frame $ _config w))
, Toggle ScancodeC
(Just . (config . debug_noclip %~ not))
(\w -> "NOCLIP:" ++ show (_debug_noclip $ _config w))
, Toggle ScancodeS
(Just . (config . debug_cr_status %~ not))
(\w -> "SHOW CREATURE STATUS:" ++ show (_debug_cr_status $ _config w))
, Toggle ScancodeV
(Just . (config . debug_view_boundaries %~ not))
(\w -> "SHOW VIEW BOUNDARIES:" ++ show (_debug_view_boundaries $ _config w))
[ doption ScancodeF debug_seconds_frame "SHOW SECONDS/FRAME" _debug_seconds_frame
, doption ScancodeC debug_noclip "NOCLIP" _debug_noclip
, doption ScancodeS debug_cr_status "SHOW CREATURE STATUS" _debug_cr_status
, doption ScancodeV debug_view_boundaries "SHOW VIEW BOUNDARIES" _debug_view_boundaries
, doption ScancodeP debug_pathing "SHOW PATHING" _debug_pathing
]
gameplayOptionsMenu :: ScreenLayer
gameplayOptionsMenu = OptionScreen
where
doption scode l t rec = Toggle scode (Just . (config . l %~ not)) (\w -> t ++ ":" ++ show (rec $ _config w))
gameplayMenu :: ScreenLayer
gameplayMenu = OptionScreen
{ _scTitle = const "OPTIONS:GAMEPLAY"
, _scOptions = gameplayMenuOptions
, _scDefaultEff = popScreen . writeConfig
@@ -66,15 +62,12 @@ gameplayOptionsMenu = OptionScreen
}
gameplayMenuOptions :: [MenuOption]
gameplayMenuOptions =
[ Toggle
ScancodeR
(Just . (config . rotate_to_wall %~ not))
(\w -> "ROTATE TO WALL:" ++ show (_rotate_to_wall $ _config w))
, Toggle
ScancodeS
(Just . (config . show_sound %~ not))
(\w -> "SHOW VISUAL SOUNDS:" ++ show (_show_sound $ _config w))
[ option ScancodeR rotate_to_wall "ROTATE TO WALL" _rotate_to_wall
, option ScancodeS show_sound "SHOW VISUAL SOUNDS" _show_sound
]
where
option scode l t rec = Toggle scode (Just . (config . l %~ not))
(\w -> t ++ ":" ++ show (rec $ _config w))
soundMenu :: ScreenLayer
soundMenu = OptionScreen