swarm-0.5.0.0: 2D resource gathering game with programmable robots
LicenseBSD-3-Clause
Safe HaskellSafe-Inferred
LanguageHaskell2010

Swarm.TUI.Model.Menu

Description

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

Synopsis

Documentation

data ScenarioOutcome Source #

Constructors

WinModal 
LoseModal 

Instances

Instances details
Show ScenarioOutcome Source # 
Instance details

Defined in Swarm.TUI.Model.Menu

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))

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 

mkScenarioList :: Bool -> ScenarioCollection -> List Name ScenarioItem Source #

Create a brick List of scenario items from a ScenarioCollection.

mkNewGameMenu :: Bool -> ScenarioCollection -> FilePath -> Maybe Menu Source #

Given a ScenarioCollection and a FilePath which is the canonical path to some folder or scenario, construct a NewGameMenu stack focused on the given item, if possible.

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.

Instances

Instances details
Eq InventoryListEntry Source # 
Instance details

Defined in Swarm.TUI.Model.Menu