License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Swarm.TUI.Model.UI
Contents
Description
Synopsis
- data UIState = UIState {}
- uiMenu :: Lens' UIState Menu
- uiPlaying :: Lens' UIState Bool
- uiDebugOptions :: Lens' UIState (Set DebugOption)
- uiLaunchConfig :: Lens' UIState LaunchOptions
- uiAttrMap :: Lens' UIState AttrMap
- initFocusRing :: FocusRing Name
- defaultInitLgTicksPerSecond :: Int
- initUIState :: forall (sig :: (Type -> Type) -> Type -> Type) m. (Has (Accum (Seq SystemFailure)) sig m, Has (Lift IO) sig m) => UIInitOptions -> m UIState
- data UIInitOptions = UIInitOptions {}
Documentation
UI state independent of an actively-playing scenario.
Compare to UIGameplay
, which contains UI state for an
active scenario.
Constructors
UIState | |
Fields
|
uiPlaying :: Lens' UIState Bool Source #
Are we currently playing the game?
True
= we are playing, and should thus display a world, REPL, etc.- False = we should display the current menu.
uiDebugOptions :: Lens' UIState (Set DebugOption) Source #
Debugging features, for example are we allowed to turn creative mode on and off?
uiLaunchConfig :: Lens' UIState LaunchOptions Source #
Configuration modal when launching a scenario
Initialization
initFocusRing :: FocusRing Name Source #
The initial state of the focus ring. NOTE: Normally, the Tab key might cycle through the members of the focus ring. However, the REPL already uses Tab. So, to is not used at all right now for navigating the toplevel focus ring.
defaultInitLgTicksPerSecond :: Int Source #
The initial tick speed.
initUIState :: forall (sig :: (Type -> Type) -> Type -> Type) m. (Has (Accum (Seq SystemFailure)) sig m, Has (Lift IO) sig m) => UIInitOptions -> m UIState Source #
Initialize the UI state. This needs to be in the IO monad since it involves reading a REPL history file, getting the current time, and loading text files from the data directory.
data UIInitOptions Source #
Constructors
UIInitOptions | |
Fields
|
Instances
Show UIInitOptions Source # | |
Defined in Swarm.TUI.Model.UI Methods showsPrec :: Int -> UIInitOptions -> ShowS # show :: UIInitOptions -> String # showList :: [UIInitOptions] -> ShowS # | |
Eq UIInitOptions Source # | |
Defined in Swarm.TUI.Model.UI Methods (==) :: UIInitOptions -> UIInitOptions -> Bool # (/=) :: UIInitOptions -> UIInitOptions -> Bool # |