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

Swarm.Game.Scenario.Style

Description

Types for styling custom entity attributes

Synopsis

Documentation

data StyleFlag Source #

Instances

Instances details
FromJSON StyleFlag Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

ToJSON StyleFlag Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Generic StyleFlag Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Associated Types

type Rep StyleFlag :: Type -> Type #

Show StyleFlag Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Eq StyleFlag Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Ord StyleFlag Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

type Rep StyleFlag Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

type Rep StyleFlag = D1 ('MetaData "StyleFlag" "Swarm.Game.Scenario.Style" "swarm-0.6.0.0-ERx1HMcRMba59aI2b6aNrS-swarm-scenario" 'False) (((C1 ('MetaCons "Standout" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Italic" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Strikethrough" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Underline" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "ReverseVideo" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Blink" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Dim" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Bold" 'PrefixI 'False) (U1 :: Type -> Type))))

newtype HexColor Source #

Hexadecimal color notation. May include a leading hash symbol (see sRGB24read).

Constructors

HexColor Text 

Instances

Instances details
FromJSON HexColor Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

ToJSON HexColor Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Generic HexColor Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Associated Types

type Rep HexColor :: Type -> Type #

Methods

from :: HexColor -> Rep HexColor x #

to :: Rep HexColor x -> HexColor #

Show HexColor Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Eq HexColor Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Ord HexColor Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

type Rep HexColor Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

type Rep HexColor = D1 ('MetaData "HexColor" "Swarm.Game.Scenario.Style" "swarm-0.6.0.0-ERx1HMcRMba59aI2b6aNrS-swarm-scenario" 'True) (C1 ('MetaCons "HexColor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)))

data CustomAttr Source #

Constructors

CustomAttr 

Instances

Instances details
FromJSON CustomAttr Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

ToJSON CustomAttr Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Generic CustomAttr Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Associated Types

type Rep CustomAttr :: Type -> Type #

Show CustomAttr Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

Eq CustomAttr Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

type Rep CustomAttr Source # 
Instance details

Defined in Swarm.Game.Scenario.Style

type Rep CustomAttr = D1 ('MetaData "CustomAttr" "Swarm.Game.Scenario.Style" "swarm-0.6.0.0-ERx1HMcRMba59aI2b6aNrS-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.