Safe Haskell | None |
---|---|
Language | Haskell2010 |
Game.LambdaHack.Client.UI.Msg
Description
Game messages displayed on top of the screen for the player to read and then saved to player history.
Synopsis
- data Msg
- class MsgShared a
- toMsgShared :: MsgShared a => [(String, Color)] -> a -> Text -> Msg
- toMsgDistinct :: [(String, Color)] -> MsgClassDistinct -> Text -> Text -> Msg
- data MsgClassShowAndSave
- = MsgBookKeeping
- | MsgStatusWakeup
- | MsgStatusStopUs
- | MsgStatusStopThem
- | MsgItemCreation
- | MsgItemRuination
- | MsgDeathVictory
- | MsgDeathDeafeat
- | MsgDeathBoring
- | MsgRiskOfDeath
- | MsgPointmanSwap
- | MsgFactionIntel
- | MsgFinalOutcome
- | MsgBackdropInfo
- | MsgTerrainReveal
- | MsgItemDiscovery
- | MsgSpottedActor
- | MsgItemMovement
- | MsgActionMajor
- | MsgActionMinor
- | MsgEffectMajor
- | MsgEffectMedium
- | MsgEffectMinor
- | MsgMiscellanous
- | MsgHeardOutside
- | MsgHeardNearby
- | MsgHeardFaraway
- | MsgBackdropFocus
- | MsgActionWarning
- | MsgRangedMightyWe
- | MsgRangedMightyUs
- | MsgRangedOthers
- | MsgRangedNormalUs
- | MsgGoodMiscEvent
- | MsgBadMiscEvent
- | MsgNeutralEvent
- | MsgSpecialEvent
- | MsgMeleeMightyWe
- | MsgMeleeMightyUs
- | MsgMeleeComplexWe
- | MsgMeleeComplexUs
- | MsgMeleeOthers
- | MsgMeleeNormalUs
- | MsgActionComplete
- | MsgAtFeetMajor
- | MsgAtFeetMinor
- | MsgTutorialHint
- data MsgClassShow
- data MsgClassSave
- data MsgClassIgnore
- data MsgClassDistinct
- data MsgClass
- interruptsRunning :: MsgClass -> Bool
- disturbsResting :: MsgClass -> Bool
- data Report
- nullVisibleReport :: Report -> Bool
- consReport :: Msg -> Report -> Report
- renderReport :: Bool -> Report -> [AttrString]
- anyInReport :: (MsgClass -> Bool) -> Report -> Bool
- data History
- newReport :: History -> Report
- emptyHistory :: Int -> History
- addToReport :: Set Msg -> Bool -> Bool -> History -> Msg -> Time -> (Set Msg, History, Bool)
- addEolToNewReport :: History -> History
- archiveReport :: History -> History
- lengthHistory :: History -> Int
- renderHistory :: History -> [AttrString]
- type UAttrString = Vector Word32
- uToAttrString :: UAttrString -> AttrString
- attrStringToU :: AttrString -> UAttrString
- toMsg :: [(String, Color)] -> MsgPrototype -> Msg
- data MsgPrototype
- tripleFromProto :: MsgPrototype -> (Text, Text, MsgClass)
- scrapsRepeats :: MsgClass -> Bool
- isTutorialHint :: MsgClass -> Bool
- msgColor :: MsgClass -> Color
- data RepMsgNK
- nullRepMsgNK :: RepMsgNK -> Bool
- emptyReport :: Report
- renderRepetition :: (AttrString, Int) -> AttrString
- scrapRepetitionSingle :: (AttrString, Int) -> [(AttrString, Int)] -> [(AttrString, Int)] -> (Bool, [(AttrString, Int)], [(AttrString, Int)])
- scrapRepetition :: History -> Maybe History
- renderTimeReport :: Time -> Report -> [AttrString]
Msg
The type of a single game message.
Instances
toMsgDistinct :: [(String, Color)] -> MsgClassDistinct -> Text -> Text -> Msg Source #
data MsgClassShowAndSave Source #
Constructors
MsgBookKeeping | |
MsgStatusWakeup | |
MsgStatusStopUs | |
MsgStatusStopThem | |
MsgItemCreation | |
MsgItemRuination | |
MsgDeathVictory | |
MsgDeathDeafeat | |
MsgDeathBoring | |
MsgRiskOfDeath | |
MsgPointmanSwap | |
MsgFactionIntel | |
MsgFinalOutcome | |
MsgBackdropInfo | |
MsgTerrainReveal | |
MsgItemDiscovery | |
MsgSpottedActor | |
MsgItemMovement | |
MsgActionMajor | |
MsgActionMinor | |
MsgEffectMajor | |
MsgEffectMedium | |
MsgEffectMinor | |
MsgMiscellanous | |
MsgHeardOutside | |
MsgHeardNearby | |
MsgHeardFaraway | |
MsgBackdropFocus | |
MsgActionWarning | |
MsgRangedMightyWe | |
MsgRangedMightyUs | |
MsgRangedOthers | |
MsgRangedNormalUs | |
MsgGoodMiscEvent | |
MsgBadMiscEvent | |
MsgNeutralEvent | |
MsgSpecialEvent | |
MsgMeleeMightyWe | |
MsgMeleeMightyUs | |
MsgMeleeComplexWe | |
MsgMeleeComplexUs | |
MsgMeleeOthers | |
MsgMeleeNormalUs | |
MsgActionComplete | |
MsgAtFeetMajor | |
MsgAtFeetMinor | |
MsgTutorialHint |
Instances
MsgShared MsgClassShowAndSave Source # | |||||
Binary MsgClassShowAndSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods put :: MsgClassShowAndSave -> Put # get :: Get MsgClassShowAndSave # putList :: [MsgClassShowAndSave] -> Put # | |||||
Bounded MsgClassShowAndSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Enum MsgClassShowAndSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods succ :: MsgClassShowAndSave -> MsgClassShowAndSave # pred :: MsgClassShowAndSave -> MsgClassShowAndSave # toEnum :: Int -> MsgClassShowAndSave # fromEnum :: MsgClassShowAndSave -> Int # enumFrom :: MsgClassShowAndSave -> [MsgClassShowAndSave] # enumFromThen :: MsgClassShowAndSave -> MsgClassShowAndSave -> [MsgClassShowAndSave] # enumFromTo :: MsgClassShowAndSave -> MsgClassShowAndSave -> [MsgClassShowAndSave] # enumFromThenTo :: MsgClassShowAndSave -> MsgClassShowAndSave -> MsgClassShowAndSave -> [MsgClassShowAndSave] # | |||||
Generic MsgClassShowAndSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Associated Types
Methods from :: MsgClassShowAndSave -> Rep MsgClassShowAndSave x # to :: Rep MsgClassShowAndSave x -> MsgClassShowAndSave # | |||||
Show MsgClassShowAndSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods showsPrec :: Int -> MsgClassShowAndSave -> ShowS # show :: MsgClassShowAndSave -> String # showList :: [MsgClassShowAndSave] -> ShowS # | |||||
Eq MsgClassShowAndSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods (==) :: MsgClassShowAndSave -> MsgClassShowAndSave -> Bool # (/=) :: MsgClassShowAndSave -> MsgClassShowAndSave -> Bool # | |||||
Ord MsgClassShowAndSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods compare :: MsgClassShowAndSave -> MsgClassShowAndSave -> Ordering # (<) :: MsgClassShowAndSave -> MsgClassShowAndSave -> Bool # (<=) :: MsgClassShowAndSave -> MsgClassShowAndSave -> Bool # (>) :: MsgClassShowAndSave -> MsgClassShowAndSave -> Bool # (>=) :: MsgClassShowAndSave -> MsgClassShowAndSave -> Bool # max :: MsgClassShowAndSave -> MsgClassShowAndSave -> MsgClassShowAndSave # min :: MsgClassShowAndSave -> MsgClassShowAndSave -> MsgClassShowAndSave # | |||||
type Rep MsgClassShowAndSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg type Rep MsgClassShowAndSave = D1 ('MetaData "MsgClassShowAndSave" "Game.LambdaHack.Client.UI.Msg" "LambdaHack-0.11.0.1-KLiWVfvNqBS4jGys3MM0dZ" 'False) (((((C1 ('MetaCons "MsgBookKeeping" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgStatusWakeup" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MsgStatusStopUs" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgStatusStopThem" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgItemCreation" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "MsgItemRuination" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgDeathVictory" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgDeathDeafeat" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "MsgDeathBoring" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgRiskOfDeath" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgPointmanSwap" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "MsgFactionIntel" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgFinalOutcome" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgBackdropInfo" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "MsgTerrainReveal" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgItemDiscovery" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgSpottedActor" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "MsgItemMovement" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgActionMajor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgActionMinor" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "MsgEffectMajor" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgEffectMedium" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgEffectMinor" 'PrefixI 'False) (U1 :: Type -> Type)))))) :+: ((((C1 ('MetaCons "MsgMiscellanous" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgHeardOutside" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgHeardNearby" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "MsgHeardFaraway" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgBackdropFocus" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgActionWarning" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "MsgRangedMightyWe" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgRangedMightyUs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgRangedOthers" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "MsgRangedNormalUs" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgGoodMiscEvent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgBadMiscEvent" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "MsgNeutralEvent" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgSpecialEvent" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgMeleeMightyWe" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "MsgMeleeMightyUs" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgMeleeComplexWe" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgMeleeComplexUs" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "MsgMeleeOthers" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgMeleeNormalUs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgActionComplete" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "MsgAtFeetMajor" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgAtFeetMinor" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgTutorialHint" 'PrefixI 'False) (U1 :: Type -> Type))))))) |
data MsgClassShow Source #
Constructors
MsgPromptGeneric | |
MsgPromptFocus | |
MsgPromptMention | |
MsgPromptModify | |
MsgPromptActors | |
MsgPromptItems | |
MsgPromptAction | |
MsgActionAlert | |
MsgSpottedThreat |
Instances
MsgShared MsgClassShow Source # | |||||
Binary MsgClassShow Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Bounded MsgClassShow Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Enum MsgClassShow Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods succ :: MsgClassShow -> MsgClassShow # pred :: MsgClassShow -> MsgClassShow # toEnum :: Int -> MsgClassShow # fromEnum :: MsgClassShow -> Int # enumFrom :: MsgClassShow -> [MsgClassShow] # enumFromThen :: MsgClassShow -> MsgClassShow -> [MsgClassShow] # enumFromTo :: MsgClassShow -> MsgClassShow -> [MsgClassShow] # enumFromThenTo :: MsgClassShow -> MsgClassShow -> MsgClassShow -> [MsgClassShow] # | |||||
Generic MsgClassShow Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Associated Types
| |||||
Show MsgClassShow Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods showsPrec :: Int -> MsgClassShow -> ShowS # show :: MsgClassShow -> String # showList :: [MsgClassShow] -> ShowS # | |||||
Eq MsgClassShow Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Ord MsgClassShow Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods compare :: MsgClassShow -> MsgClassShow -> Ordering # (<) :: MsgClassShow -> MsgClassShow -> Bool # (<=) :: MsgClassShow -> MsgClassShow -> Bool # (>) :: MsgClassShow -> MsgClassShow -> Bool # (>=) :: MsgClassShow -> MsgClassShow -> Bool # max :: MsgClassShow -> MsgClassShow -> MsgClassShow # min :: MsgClassShow -> MsgClassShow -> MsgClassShow # | |||||
type Rep MsgClassShow Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg type Rep MsgClassShow = D1 ('MetaData "MsgClassShow" "Game.LambdaHack.Client.UI.Msg" "LambdaHack-0.11.0.1-KLiWVfvNqBS4jGys3MM0dZ" 'False) (((C1 ('MetaCons "MsgPromptGeneric" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgPromptFocus" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MsgPromptMention" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgPromptModify" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MsgPromptActors" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgPromptItems" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MsgPromptAction" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgActionAlert" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgSpottedThreat" 'PrefixI 'False) (U1 :: Type -> Type))))) |
data MsgClassSave Source #
Constructors
MsgInnerWorkSpam | |
MsgNumericReport |
Instances
MsgShared MsgClassSave Source # | |||||
Binary MsgClassSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Bounded MsgClassSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Enum MsgClassSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods succ :: MsgClassSave -> MsgClassSave # pred :: MsgClassSave -> MsgClassSave # toEnum :: Int -> MsgClassSave # fromEnum :: MsgClassSave -> Int # enumFrom :: MsgClassSave -> [MsgClassSave] # enumFromThen :: MsgClassSave -> MsgClassSave -> [MsgClassSave] # enumFromTo :: MsgClassSave -> MsgClassSave -> [MsgClassSave] # enumFromThenTo :: MsgClassSave -> MsgClassSave -> MsgClassSave -> [MsgClassSave] # | |||||
Generic MsgClassSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Associated Types
| |||||
Show MsgClassSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods showsPrec :: Int -> MsgClassSave -> ShowS # show :: MsgClassSave -> String # showList :: [MsgClassSave] -> ShowS # | |||||
Eq MsgClassSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Ord MsgClassSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods compare :: MsgClassSave -> MsgClassSave -> Ordering # (<) :: MsgClassSave -> MsgClassSave -> Bool # (<=) :: MsgClassSave -> MsgClassSave -> Bool # (>) :: MsgClassSave -> MsgClassSave -> Bool # (>=) :: MsgClassSave -> MsgClassSave -> Bool # max :: MsgClassSave -> MsgClassSave -> MsgClassSave # min :: MsgClassSave -> MsgClassSave -> MsgClassSave # | |||||
type Rep MsgClassSave Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg |
data MsgClassIgnore Source #
Constructors
MsgMacroOperation | |
MsgRunStopReason | |
MsgStopPlayback |
Instances
MsgShared MsgClassIgnore Source # | |||||
Binary MsgClassIgnore Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods put :: MsgClassIgnore -> Put # get :: Get MsgClassIgnore # putList :: [MsgClassIgnore] -> Put # | |||||
Bounded MsgClassIgnore Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Enum MsgClassIgnore Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods succ :: MsgClassIgnore -> MsgClassIgnore # pred :: MsgClassIgnore -> MsgClassIgnore # toEnum :: Int -> MsgClassIgnore # fromEnum :: MsgClassIgnore -> Int # enumFrom :: MsgClassIgnore -> [MsgClassIgnore] # enumFromThen :: MsgClassIgnore -> MsgClassIgnore -> [MsgClassIgnore] # enumFromTo :: MsgClassIgnore -> MsgClassIgnore -> [MsgClassIgnore] # enumFromThenTo :: MsgClassIgnore -> MsgClassIgnore -> MsgClassIgnore -> [MsgClassIgnore] # | |||||
Generic MsgClassIgnore Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Associated Types
Methods from :: MsgClassIgnore -> Rep MsgClassIgnore x # to :: Rep MsgClassIgnore x -> MsgClassIgnore # | |||||
Show MsgClassIgnore Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods showsPrec :: Int -> MsgClassIgnore -> ShowS # show :: MsgClassIgnore -> String # showList :: [MsgClassIgnore] -> ShowS # | |||||
Eq MsgClassIgnore Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods (==) :: MsgClassIgnore -> MsgClassIgnore -> Bool # (/=) :: MsgClassIgnore -> MsgClassIgnore -> Bool # | |||||
Ord MsgClassIgnore Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods compare :: MsgClassIgnore -> MsgClassIgnore -> Ordering # (<) :: MsgClassIgnore -> MsgClassIgnore -> Bool # (<=) :: MsgClassIgnore -> MsgClassIgnore -> Bool # (>) :: MsgClassIgnore -> MsgClassIgnore -> Bool # (>=) :: MsgClassIgnore -> MsgClassIgnore -> Bool # max :: MsgClassIgnore -> MsgClassIgnore -> MsgClassIgnore # min :: MsgClassIgnore -> MsgClassIgnore -> MsgClassIgnore # | |||||
type Rep MsgClassIgnore Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg type Rep MsgClassIgnore = D1 ('MetaData "MsgClassIgnore" "Game.LambdaHack.Client.UI.Msg" "LambdaHack-0.11.0.1-KLiWVfvNqBS4jGys3MM0dZ" 'False) (C1 ('MetaCons "MsgMacroOperation" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgRunStopReason" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgStopPlayback" 'PrefixI 'False) (U1 :: Type -> Type))) |
data MsgClassDistinct Source #
Constructors
MsgSpottedItem | |
MsgStatusSleep | |
MsgStatusGoodUs | |
MsgStatusBadUs | |
MsgStatusOthers | |
MsgStatusBenign | |
MsgStatusWarning | |
MsgStatusLongerUs | |
MsgStatusLongThem |
Instances
Binary MsgClassDistinct Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods put :: MsgClassDistinct -> Put # get :: Get MsgClassDistinct # putList :: [MsgClassDistinct] -> Put # | |||||
Bounded MsgClassDistinct Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
Enum MsgClassDistinct Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods succ :: MsgClassDistinct -> MsgClassDistinct # pred :: MsgClassDistinct -> MsgClassDistinct # toEnum :: Int -> MsgClassDistinct # fromEnum :: MsgClassDistinct -> Int # enumFrom :: MsgClassDistinct -> [MsgClassDistinct] # enumFromThen :: MsgClassDistinct -> MsgClassDistinct -> [MsgClassDistinct] # enumFromTo :: MsgClassDistinct -> MsgClassDistinct -> [MsgClassDistinct] # enumFromThenTo :: MsgClassDistinct -> MsgClassDistinct -> MsgClassDistinct -> [MsgClassDistinct] # | |||||
Generic MsgClassDistinct Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Associated Types
Methods from :: MsgClassDistinct -> Rep MsgClassDistinct x # to :: Rep MsgClassDistinct x -> MsgClassDistinct # | |||||
Show MsgClassDistinct Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods showsPrec :: Int -> MsgClassDistinct -> ShowS # show :: MsgClassDistinct -> String # showList :: [MsgClassDistinct] -> ShowS # | |||||
Eq MsgClassDistinct Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods (==) :: MsgClassDistinct -> MsgClassDistinct -> Bool # (/=) :: MsgClassDistinct -> MsgClassDistinct -> Bool # | |||||
Ord MsgClassDistinct Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Methods compare :: MsgClassDistinct -> MsgClassDistinct -> Ordering # (<) :: MsgClassDistinct -> MsgClassDistinct -> Bool # (<=) :: MsgClassDistinct -> MsgClassDistinct -> Bool # (>) :: MsgClassDistinct -> MsgClassDistinct -> Bool # (>=) :: MsgClassDistinct -> MsgClassDistinct -> Bool # max :: MsgClassDistinct -> MsgClassDistinct -> MsgClassDistinct # min :: MsgClassDistinct -> MsgClassDistinct -> MsgClassDistinct # | |||||
type Rep MsgClassDistinct Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg type Rep MsgClassDistinct = D1 ('MetaData "MsgClassDistinct" "Game.LambdaHack.Client.UI.Msg" "LambdaHack-0.11.0.1-KLiWVfvNqBS4jGys3MM0dZ" 'False) (((C1 ('MetaCons "MsgSpottedItem" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgStatusSleep" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MsgStatusGoodUs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgStatusBadUs" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "MsgStatusOthers" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgStatusBenign" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "MsgStatusWarning" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "MsgStatusLongerUs" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "MsgStatusLongThem" 'PrefixI 'False) (U1 :: Type -> Type))))) |
Instances
Binary MsgClass Source # | |||||
Generic MsgClass Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Associated Types
| |||||
Show MsgClass Source # | |||||
Eq MsgClass Source # | |||||
Ord MsgClass Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg | |||||
type Rep MsgClass Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg type Rep MsgClass = D1 ('MetaData "MsgClass" "Game.LambdaHack.Client.UI.Msg" "LambdaHack-0.11.0.1-KLiWVfvNqBS4jGys3MM0dZ" 'False) ((C1 ('MetaCons "MsgClassShowAndSave" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MsgClassShowAndSave)) :+: C1 ('MetaCons "MsgClassShow" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MsgClassShow))) :+: (C1 ('MetaCons "MsgClassSave" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MsgClassSave)) :+: (C1 ('MetaCons "MsgClassIgnore" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MsgClassIgnore)) :+: C1 ('MetaCons "MsgClassDistinct" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 MsgClassDistinct))))) |
interruptsRunning :: MsgClass -> Bool Source #
disturbsResting :: MsgClass -> Bool Source #
Report
The set of messages, with repetitions, to show at the screen at once.
nullVisibleReport :: Report -> Bool Source #
Test if the list of non-whitespace messages is empty.
renderReport :: Bool -> Report -> [AttrString] Source #
Render a report as a (possibly very long) list of AttrString
.
History
The history of reports. This is a ring buffer of the given length containing old archived history and two most recent reports stored separately.
Instances
Binary History Source # | |||||
Generic History Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Associated Types
| |||||
Show History Source # | |||||
type Rep History Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg type Rep History = D1 ('MetaData "History" "Game.LambdaHack.Client.UI.Msg" "LambdaHack-0.11.0.1-KLiWVfvNqBS4jGys3MM0dZ" 'False) (C1 ('MetaCons "History" 'PrefixI 'True) ((S1 ('MetaSel ('Just "newReport") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Report) :*: S1 ('MetaSel ('Just "newTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Time)) :*: (S1 ('MetaSel ('Just "oldReport") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Report) :*: (S1 ('MetaSel ('Just "oldTime") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Time) :*: S1 ('MetaSel ('Just "archivedHistory") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (RingBuffer UAttrString)))))) |
emptyHistory :: Int -> History Source #
Empty history of the given maximal length.
addToReport :: Set Msg -> Bool -> Bool -> History -> Msg -> Time -> (Set Msg, History, Bool) Source #
Add a message to the new report of history, eliminating a possible duplicate and noting its existence in the result.
addEolToNewReport :: History -> History Source #
Add a newline to end of the new report of history, unless empty.
archiveReport :: History -> History Source #
Archive old report to history, filtering out messages with 0 duplicates and prompts. Set up new report with a new timestamp.
lengthHistory :: History -> Int Source #
renderHistory :: History -> [AttrString] Source #
Render history as many lines of text. New report is not rendered. It's expected to be empty when history is shown.
Internal operations
type UAttrString = Vector Word32 Source #
data MsgPrototype Source #
tripleFromProto :: MsgPrototype -> (Text, Text, MsgClass) Source #
scrapsRepeats :: MsgClass -> Bool Source #
isTutorialHint :: MsgClass -> Bool Source #
Instances
Binary RepMsgNK Source # | |||||
Generic RepMsgNK Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg Associated Types
| |||||
Show RepMsgNK Source # | |||||
type Rep RepMsgNK Source # | |||||
Defined in Game.LambdaHack.Client.UI.Msg type Rep RepMsgNK = D1 ('MetaData "RepMsgNK" "Game.LambdaHack.Client.UI.Msg" "LambdaHack-0.11.0.1-KLiWVfvNqBS4jGys3MM0dZ" 'False) (C1 ('MetaCons "RepMsgNK" 'PrefixI 'True) (S1 ('MetaSel ('Just "repMsg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Msg) :*: (S1 ('MetaSel ('Just "_repShow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int) :*: S1 ('MetaSel ('Just "_repSave") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 Int)))) |
nullRepMsgNK :: RepMsgNK -> Bool Source #
If only one of the message components is non-empty and non-whitespace, but its count is zero, the message is considered empty.
emptyReport :: Report Source #
Empty set of messages.
renderRepetition :: (AttrString, Int) -> AttrString Source #
scrapRepetitionSingle :: (AttrString, Int) -> [(AttrString, Int)] -> [(AttrString, Int)] -> (Bool, [(AttrString, Int)], [(AttrString, Int)]) Source #
renderTimeReport :: Time -> Report -> [AttrString] Source #