License | BSD-3-Clause |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Swarm.Game.Scenario.Style
Description
Types for styling custom entity attributes
Synopsis
- data StyleFlag
- = Standout
- | Italic
- | Strikethrough
- | Underline
- | ReverseVideo
- | Blink
- | Dim
- | Bold
- styleFlagJsonOptions :: Options
- newtype HexColor = HexColor {
- getHexColor :: Kolor
- data CustomAttr = CustomAttr {}
- toHifiPair :: CustomAttr -> Maybe (WorldAttr, PreservableColor)
Documentation
Constructors
Standout | |
Italic | |
Strikethrough | |
Underline | |
ReverseVideo | |
Blink | |
Dim | |
Bold |
Instances
A color, parsed from hexadecimal notation. May include a leading
hash symbol (see sRGB24read
).
Constructors
HexColor | |
Fields
|
Instances
FromJSON HexColor Source # | |||||
Defined in Swarm.Game.Scenario.Style | |||||
ToJSON HexColor Source # | |||||
Generic HexColor Source # | |||||
Defined in Swarm.Game.Scenario.Style Associated Types
| |||||
Show HexColor Source # | |||||
Eq HexColor Source # | |||||
Ord HexColor Source # | |||||
Defined in Swarm.Game.Scenario.Style | |||||
ToPixel HexColor Source # | |||||
Defined in Swarm.Game.Scenario.Style Methods toPixel :: HexColor -> PixelRGBA8 | |||||
type Rep HexColor Source # | |||||
Defined in Swarm.Game.Scenario.Style |
data CustomAttr Source #
Constructors
CustomAttr | |
Instances
FromJSON CustomAttr Source # | |||||
Defined in Swarm.Game.Scenario.Style | |||||
ToJSON CustomAttr Source # | |||||
Defined in Swarm.Game.Scenario.Style Methods toJSON :: CustomAttr -> Value # toEncoding :: CustomAttr -> Encoding # toJSONList :: [CustomAttr] -> Value # toEncodingList :: [CustomAttr] -> Encoding # omitField :: CustomAttr -> Bool # | |||||
Generic CustomAttr Source # | |||||
Defined in Swarm.Game.Scenario.Style Associated Types
| |||||
Show CustomAttr Source # | |||||
Defined in Swarm.Game.Scenario.Style Methods showsPrec :: Int -> CustomAttr -> ShowS # show :: CustomAttr -> String # showList :: [CustomAttr] -> ShowS # | |||||
Eq CustomAttr Source # | |||||
Defined in Swarm.Game.Scenario.Style | |||||
type Rep CustomAttr Source # | |||||
Defined in Swarm.Game.Scenario.Style type Rep CustomAttr = D1 ('MetaData "CustomAttr" "Swarm.Game.Scenario.Style" "swarm-0.7.0.0-IuFfgHrMoE7JrptOBRVOwx-swarm-scenario" 'False) (C1 ('MetaCons "CustomAttr" 'PrefixI 'True) ((S1 ('MetaSel ('Just "name") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 String) :*: S1 ('MetaSel ('Just "fg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe HexColor))) :*: (S1 ('MetaSel ('Just "bg") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe HexColor)) :*: S1 ('MetaSel ('Just "style") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedStrict) (Rec0 (Maybe (Set StyleFlag)))))) |
toHifiPair :: CustomAttr -> Maybe (WorldAttr, PreservableColor) Source #
Must specify either a foreground or background color; just a style is not sufficient.