Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module contains generic things to be used in *View.hs
and *ViewInternal.hs files. Contrary to ViewInternal
, it contains
things that are specific to the game; not solely pure HTML/CSS stuff.
|
Synopsis
- cardBoxShadowStyle :: (Int, Int, Int) -> Int -> MisoString -> Attribute a
- cardView :: DisplayLocation -> Int -> Model -> Team -> Card Core -> CardDrawStyle -> Styled (View Action)
- cardPositionStyle :: Int -> Int -> Map MisoString MisoString
- cardPositionStyle' :: Int -> Int -> Map MisoString MisoString
- noCardView :: Int -> Model -> T -> Styled (View Action)
- scrollbarStyle :: Map MisoString MisoString
- tileCell :: Model -> Size -> Tile -> View a
- viewFrame :: DisplayMode -> Int -> Model -> Frame -> View a
- data BorderOverlay
- data CardDrawStyle = CardDrawStyle {}
-
data DisplayLocation
- = GameApplicationLoc ManaShower
- | GameInPlaceLoc ManaShower Place
- | GameHandLoc ManaShower
- | GameDragLoc ManaShower
- | DeckLoc ManaShower
- | LootLoc ManaShower
-
data DisplayMode
- = NormalMode
- | DebugMode
Documentation
:: DisplayLocation | |
-> Int | The z index |
-> Model | |
-> Team | The team of the card, for selecting the background. |
-> Card Core | |
-> CardDrawStyle | |
-> Styled (View Action) |
Div displaying a card. Draws the picture and the background
and delegate most stuff to cardView'
:: Int | The horizontal offset from the enclosing container, in number of cells |
-> Int | The vertical offset from the enclosing container, in number of cells |
-> Map MisoString MisoString |
The position of a card, from its enclosing container. Sizes are in number of cells.
:: Int | The horizontal offset from the enclosing container, in pixels |
-> Int | The vertical offset from the enclosing container, in pixels |
-> Map MisoString MisoString |
The position of a card, from its enclosing container. Sizes are in pixels.
The view to display on a spot without a creature
data BorderOverlay #
The overlay to show the selected card in the LootView
Blue | Blue overlay |
Green | Green overlay |
None | No border. Used to avoid having to wrap values in |
Yellow | Yellow overlay |
Instances
Semigroup BorderOverlay # | |
Defined in PCWViewInternal (<>) :: BorderOverlay -> BorderOverlay -> BorderOverlay # sconcat :: NonEmpty BorderOverlay -> BorderOverlay # stimes :: Integral b => b -> BorderOverlay -> BorderOverlay # | |
Monoid BorderOverlay # | |
Defined in PCWViewInternal mempty :: BorderOverlay # mappend :: BorderOverlay -> BorderOverlay -> BorderOverlay # mconcat :: [BorderOverlay] -> BorderOverlay # |
data CardDrawStyle #
Instances
Semigroup CardDrawStyle # | |
Defined in PCWViewInternal (<>) :: CardDrawStyle -> CardDrawStyle -> CardDrawStyle # sconcat :: NonEmpty CardDrawStyle -> CardDrawStyle # stimes :: Integral b => b -> CardDrawStyle -> CardDrawStyle # | |
Monoid CardDrawStyle # | |
Defined in PCWViewInternal mempty :: CardDrawStyle # mappend :: CardDrawStyle -> CardDrawStyle -> CardDrawStyle # mconcat :: [CardDrawStyle] -> CardDrawStyle # |
data DisplayLocation #
Where a card is being drawn
GameApplicationLoc ManaShower | |
GameInPlaceLoc ManaShower Place | |
GameHandLoc ManaShower | |
GameDragLoc ManaShower | TODO @smelc remove? |
DeckLoc ManaShower | |
LootLoc ManaShower |
data DisplayMode #
Orphan instances
ToMisoString Nat # | |
toMisoString :: Nat -> MisoString # | |
ToMisoString Damage # | |
toMisoString :: Damage -> MisoString # |