app

Safe Haskell None
Language Haskell2010

PCWViewInternal

Contents

Description

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

Documentation

cardBoxShadowStyle #

Arguments

:: (Int, Int, Int)

The (r, g, b) of the border. FIXME @smelc change to Nat, Nat, Nat

-> Int

The width of the border

-> MisoString

The timing-function of the transition

-> Attribute a  

cardView #

Arguments

:: 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'

cardPositionStyle #

Arguments

:: 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.

cardPositionStyle' #

Arguments

:: 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.

noCardView #

Arguments

:: Int

The z index

-> Model  
-> T  
-> Styled (View Action)  

The view to display on a spot without a creature

tileCell :: Model -> Size -> Tile -> View a #

data BorderOverlay #

The overlay to show the selected card in the LootView

Constructors

Blue

Blue overlay

Green

Green overlay

None

No border. Used to avoid having to wrap values in Maybe

Yellow

Yellow overlay

data CardDrawStyle #

Constructors

CardDrawStyle  

Fields

  • fade :: Fade

    Whether the card should fade in

  • hover :: Bool

    Whether the card is being hovered

  • overlay :: BorderOverlay

    Whether to show a green overlay border. Used for cards picked from the rewards in LootView.

  • selected :: Bool

    Whether the card is selected

data DisplayLocation #

Where a card is being drawn

Constructors

GameApplicationLoc ManaShower  
GameInPlaceLoc ManaShower Place  
GameHandLoc ManaShower  
GameDragLoc ManaShower

TODO @smelc remove?

DeckLoc ManaShower  
LootLoc ManaShower  

data DisplayMode #

Constructors

NormalMode  
DebugMode  

Orphan instances

ToMisoString Nat #  
Instance details

Methods

toMisoString :: Nat -> MisoString #

ToMisoString Damage #  
Instance details