License | BSD-3-Clause |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
A UI-centric model for Objective presentation.
Synopsis
- data GoalStatus
- type CategorizedGoals = Map GoalStatus (NonEmpty Objective)
- data GoalEntry
- shouldSkipSelection :: GoalEntry -> Bool
- data GoalTracking = GoalTracking {}
- data GoalDisplay = GoalDisplay {}
- listWidget :: Lens' GoalDisplay (List Name GoalEntry)
- goalsContent :: Lens' GoalDisplay GoalTracking
- focus :: Lens' GoalDisplay (FocusRing Name)
- emptyGoalDisplay :: GoalDisplay
- hasAnythingToShow :: GoalTracking -> Bool
- hasMultipleGoals :: GoalTracking -> Bool
- constructGoalMap :: Bool -> ObjectiveCompletion -> CategorizedGoals
Documentation
data GoalStatus Source #
These are intended to be used as keys in a map of lists of goals.
Upcoming | Goals in this category have other goals as prerequisites.
However, they are only displayed if the "previewable" attribute
is |
Active | Goals in this category may be pursued in parallel.
However, they are only displayed if the "hidden" attribute
is |
Completed | A goal's programmatic condition, as well as all its prerequisites, were completed. This is a "latch" mechanism; at some point the conditions required to meet the goal may no longer hold. Nonetheless, the goal remains "completed". |
Failed | A goal that can no longer be achieved. If this goal is not an "optional" goal, then the player also "loses" the scenario. Note that currently the only way to "fail" a goal is by way of a negative prerequisite that was completed. |
Instances
type CategorizedGoals = Map GoalStatus (NonEmpty Objective) Source #
shouldSkipSelection :: GoalEntry -> Bool Source #
data GoalTracking Source #
GoalTracking | |
|
Instances
ToJSON GoalTracking Source # | |
Defined in Swarm.TUI.Model.Goal toJSON :: GoalTracking -> Value # toEncoding :: GoalTracking -> Encoding # toJSONList :: [GoalTracking] -> Value # toEncodingList :: [GoalTracking] -> Encoding # | |
Generic GoalTracking Source # | |
Defined in Swarm.TUI.Model.Goal type Rep GoalTracking :: Type -> Type # from :: GoalTracking -> Rep GoalTracking x # to :: Rep GoalTracking x -> GoalTracking # | |
ToSample GoalTracking Source # | |
Defined in Swarm.TUI.Model.Goal toSamples :: Proxy GoalTracking -> [(Text, GoalTracking)] # | |
type Rep GoalTracking Source # | |
Defined in Swarm.TUI.Model.Goal type Rep GoalTracking = D1 ('MetaData "GoalTracking" "Swarm.TUI.Model.Goal" "swarm-0.5.0.0-6qXEbhCmuXA4wRndqqhBu" 'False) (C1 ('MetaCons "GoalTracking" 'PrefixI 'True) (S1 ('MetaSel ('Just "announcements") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 [Announcement]) :*: S1 ('MetaSel ('Just "goals") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 CategorizedGoals))) |
data GoalDisplay Source #
GoalDisplay | |
|
hasAnythingToShow :: GoalTracking -> Bool Source #
hasMultipleGoals :: GoalTracking -> Bool Source #