| License | BSD-3-Clause |
|---|---|
| Safe Haskell | None |
| Language | Haskell2010 |
Swarm.TUI.Model.Event
Description
Sum types representing the Swarm events abstracted away from keybindings.
Synopsis
- data SwarmEvent
- data MainEvent
- = QuitEvent
- | ViewHelpEvent
- | ViewRobotsEvent
- | ViewRecipesEvent
- | ViewCommandsEvent
- | ViewMessagesEvent
- | ViewStructuresEvent
- | ViewGoalEvent
- | HideRobotsEvent
- | ShowCESKDebugEvent
- | PauseEvent
- | RunSingleTickEvent
- | IncreaseTpsEvent
- | DecreaseTpsEvent
- | FocusWorldEvent
- | FocusRobotEvent
- | FocusREPLEvent
- | FocusInfoEvent
- | ToggleCreativeModeEvent
- | ToggleWorldEditorEvent
- | ToggleREPLVisibilityEvent
- | ViewBaseEvent
- | ToggleFPSEvent
- data REPLEvent
- newtype WorldEvent = MoveViewEvent AbsoluteDir
- data RobotEvent
- swarmEvents :: KeyEvents SwarmEvent
- defaultSwarmBindings :: [(SwarmEvent, [Binding])]
Documentation
data SwarmEvent Source #
Swarm named TUI event type.
See Note [how Swarm event handlers work]
Constructors
| Main MainEvent | |
| REPL REPLEvent | |
| World WorldEvent | |
| Robot RobotEvent |
Instances
Main abstract keybinding events while running the game itself.
See 'Swarm.TUI.Controller.MainEventHandler.'.
Constructors
| QuitEvent | |
| ViewHelpEvent | |
| ViewRobotsEvent | |
| ViewRecipesEvent | |
| ViewCommandsEvent | |
| ViewMessagesEvent | |
| ViewStructuresEvent | |
| ViewGoalEvent | |
| HideRobotsEvent | |
| ShowCESKDebugEvent | |
| PauseEvent | |
| RunSingleTickEvent | |
| IncreaseTpsEvent | |
| DecreaseTpsEvent | |
| FocusWorldEvent | |
| FocusRobotEvent | |
| FocusREPLEvent | |
| FocusInfoEvent | |
| ToggleCreativeModeEvent | |
| ToggleWorldEditorEvent | |
| ToggleREPLVisibilityEvent | |
| ViewBaseEvent | |
| ToggleFPSEvent |
Instances
| Bounded MainEvent Source # | |
| Enum MainEvent Source # | |
Defined in Swarm.TUI.Model.Event Methods succ :: MainEvent -> MainEvent # pred :: MainEvent -> MainEvent # fromEnum :: MainEvent -> Int # enumFrom :: MainEvent -> [MainEvent] # enumFromThen :: MainEvent -> MainEvent -> [MainEvent] # enumFromTo :: MainEvent -> MainEvent -> [MainEvent] # enumFromThenTo :: MainEvent -> MainEvent -> MainEvent -> [MainEvent] # | |
| Show MainEvent Source # | |
| Eq MainEvent Source # | |
| Ord MainEvent Source # | |
REPL abstract keybinding events.
See REPLEventHandler.
Instances
| Bounded REPLEvent Source # | |
| Enum REPLEvent Source # | |
Defined in Swarm.TUI.Model.Event Methods succ :: REPLEvent -> REPLEvent # pred :: REPLEvent -> REPLEvent # fromEnum :: REPLEvent -> Int # enumFrom :: REPLEvent -> [REPLEvent] # enumFromThen :: REPLEvent -> REPLEvent -> [REPLEvent] # enumFromTo :: REPLEvent -> REPLEvent -> [REPLEvent] # enumFromThenTo :: REPLEvent -> REPLEvent -> REPLEvent -> [REPLEvent] # | |
| Show REPLEvent Source # | |
| Eq REPLEvent Source # | |
| Ord REPLEvent Source # | |
newtype WorldEvent Source #
Constructors
| MoveViewEvent AbsoluteDir |
Instances
| Bounded WorldEvent Source # | |||||
Defined in Swarm.TUI.Model.Event | |||||
| Enum WorldEvent Source # | |||||
Defined in Swarm.TUI.Model.Event Methods succ :: WorldEvent -> WorldEvent # pred :: WorldEvent -> WorldEvent # toEnum :: Int -> WorldEvent # fromEnum :: WorldEvent -> Int # enumFrom :: WorldEvent -> [WorldEvent] # enumFromThen :: WorldEvent -> WorldEvent -> [WorldEvent] # enumFromTo :: WorldEvent -> WorldEvent -> [WorldEvent] # enumFromThenTo :: WorldEvent -> WorldEvent -> WorldEvent -> [WorldEvent] # | |||||
| Generic WorldEvent Source # | |||||
Defined in Swarm.TUI.Model.Event Associated Types
| |||||
| Show WorldEvent Source # | |||||
Defined in Swarm.TUI.Model.Event Methods showsPrec :: Int -> WorldEvent -> ShowS # show :: WorldEvent -> String # showList :: [WorldEvent] -> ShowS # | |||||
| Eq WorldEvent Source # | |||||
Defined in Swarm.TUI.Model.Event | |||||
| Ord WorldEvent Source # | |||||
Defined in Swarm.TUI.Model.Event Methods compare :: WorldEvent -> WorldEvent -> Ordering # (<) :: WorldEvent -> WorldEvent -> Bool # (<=) :: WorldEvent -> WorldEvent -> Bool # (>) :: WorldEvent -> WorldEvent -> Bool # (>=) :: WorldEvent -> WorldEvent -> Bool # max :: WorldEvent -> WorldEvent -> WorldEvent # min :: WorldEvent -> WorldEvent -> WorldEvent # | |||||
| type Rep WorldEvent Source # | |||||
Defined in Swarm.TUI.Model.Event type Rep WorldEvent = D1 ('MetaData "WorldEvent" "Swarm.TUI.Model.Event" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-tui" 'True) (C1 ('MetaCons "MoveViewEvent" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 AbsoluteDir))) | |||||
data RobotEvent Source #
Constructors
| MakeEntityEvent | |
| ShowZeroInventoryEntitiesEvent | |
| CycleInventorySortEvent | |
| SwitchInventorySortDirection | |
| SearchInventoryEvent |
Instances
| Bounded RobotEvent Source # | |
Defined in Swarm.TUI.Model.Event | |
| Enum RobotEvent Source # | |
Defined in Swarm.TUI.Model.Event Methods succ :: RobotEvent -> RobotEvent # pred :: RobotEvent -> RobotEvent # toEnum :: Int -> RobotEvent # fromEnum :: RobotEvent -> Int # enumFrom :: RobotEvent -> [RobotEvent] # enumFromThen :: RobotEvent -> RobotEvent -> [RobotEvent] # enumFromTo :: RobotEvent -> RobotEvent -> [RobotEvent] # enumFromThenTo :: RobotEvent -> RobotEvent -> RobotEvent -> [RobotEvent] # | |
| Show RobotEvent Source # | |
Defined in Swarm.TUI.Model.Event Methods showsPrec :: Int -> RobotEvent -> ShowS # show :: RobotEvent -> String # showList :: [RobotEvent] -> ShowS # | |
| Eq RobotEvent Source # | |
Defined in Swarm.TUI.Model.Event | |
| Ord RobotEvent Source # | |
Defined in Swarm.TUI.Model.Event Methods compare :: RobotEvent -> RobotEvent -> Ordering # (<) :: RobotEvent -> RobotEvent -> Bool # (<=) :: RobotEvent -> RobotEvent -> Bool # (>) :: RobotEvent -> RobotEvent -> Bool # (>=) :: RobotEvent -> RobotEvent -> Bool # max :: RobotEvent -> RobotEvent -> RobotEvent # min :: RobotEvent -> RobotEvent -> RobotEvent # | |
defaultSwarmBindings :: [(SwarmEvent, [Binding])] Source #