swarm-0.7.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellNone
LanguageHaskell2010

Swarm.TUI.Model.Menu

Description

Sum types that represent menu options, modal dialogs, and buttons.

Synopsis

Documentation

data ButtonAction Source #

Constructors

Cancel 
KeepPlaying 
StartOver Seed (ScenarioWith ScenarioPath) 
QuitAction 
Next (NonEmpty (ScenarioWith ScenarioPath)) 

data MainMenuEntry Source #

Instances

Instances details
Bounded MainMenuEntry Source # 
Instance details

Defined in Swarm.TUI.Model.Menu

Enum MainMenuEntry Source # 
Instance details

Defined in Swarm.TUI.Model.Menu

Read MainMenuEntry Source # 
Instance details

Defined in Swarm.TUI.Model.Menu

Show MainMenuEntry Source # 
Instance details

Defined in Swarm.TUI.Model.Menu

Eq MainMenuEntry Source # 
Instance details

Defined in Swarm.TUI.Model.Menu

Ord MainMenuEntry Source # 
Instance details

Defined in Swarm.TUI.Model.Menu

data Menu Source #

Constructors

NoMenu

We started playing directly from command line, no menu to show

MainMenu (List Name MainMenuEntry) 
NewGameMenu (NonEmpty (List Name (ScenarioItem ScenarioPath)))

Stack of scenario item lists. INVARIANT: the currently selected menu item is ALWAYS the same as the scenario currently being played. See https://github.com/swarm-game/swarm/issues/1064 and https://github.com/swarm-game/swarm/pull/1065.

AchievementsMenu (List Name CategorizedAchievement) 
MessagesMenu 
AboutMenu 

_NewGameMenu :: Prism' Menu (NonEmpty (List Name (ScenarioItem ScenarioPath))) Source #

_AchievementsMenu :: Prism' Menu (List Name CategorizedAchievement) Source #

mkScenarioList :: ScenarioCollection a -> List Name (ScenarioItem a) Source #

Create a brick List of scenario items from a ScenarioCollection.

data InventoryListEntry Source #

An entry in the inventory list displayed in the info panel. We can either have an entity with a count in the robot's inventory, an entity equipped on the robot, or a labelled separator. The purpose of the separators is to show a clear distinction between the robot's inventory and its equipped devices.

Constructors

Separator Text 
InventoryEntry Count Entity 
EquippedEntry Entity 

Instances

Instances details
Eq InventoryListEntry Source # 
Instance details

Defined in Swarm.TUI.Model.Menu