Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module to display an instance of the main view, i.e.
the battle between two players. Only this module (and modules that
depend on it) can depend on GameViewInternal
.
Synopsis
- viewGameModel :: Game -> Styled (View Action)
- mkTargetOffset :: Target -> Map MisoString MisoString
- cmdDiv :: Model -> [View Action]
-
data InPlaceCellContext = InPlaceCellContext {
- borders :: Borders
- z :: Int
- mkOffset :: Player -> Card -> Map MisoString MisoString
- boardToInPlaceCells :: InPlaceCellContext -> Game -> Maybe TargetType -> Styled [View Action]
- boardToInPlaceCell :: InPlaceCellContext -> Game -> Actionizer (Player, Card) Action -> Maybe TargetType -> Player -> Card -> Styled (View Action)
- decoViews :: Int -> Player -> T Core -> [View Action]
- boardToPlayerTarget :: Int -> Border -> Maybe TargetType -> Player -> View Action
- dropEvents :: Target -> [Attribute Action]
- targetBorderRGB :: Interaction -> Target -> (Int, Int, Int)
- boardToInHandCells :: Int -> HandDrawingInput -> Styled [View Action]
- toHandDrawingInput :: Game -> HandDrawingInput
-
data Actionizer a b = Actionizer {
- onMouseEnter :: a -> b
- onMouseLeave :: a -> b
- onSelection :: a -> b
- type HandOffseter = (Int, Int) -> (Int, Int)
- data HandDrawingInput = HandDrawingInput {}
- boardToInHandCell :: HandDrawingInput -> Actionizer HandIndex Action -> Int -> (Int, Card Core, HandIndex) -> Styled (View Action)
- cardCellsBoardOffset :: Player -> Card -> (Int, Int)
- handCell :: View Action
Documentation
mkTargetOffset :: Target -> Map MisoString MisoString #
mkTargetOffset returns the offset to display the application of a Neutral card to a creature in place.
data InPlaceCellContext #
Dumb container to reduce the number of arguments to some functions of this file.
InPlaceCellContext | |
|
:: InPlaceCellContext | |
-> Game | |
-> Maybe TargetType | The target to which the selected card (if any) applies (if any) |
-> Styled [View Action] |
:: InPlaceCellContext | |
-> Game | |
-> Actionizer (Player, Card) Action | |
-> Maybe TargetType | The target to which the card being selected applies (if any) |
-> Player | The part considered |
-> Card | The spot of the card to show |
-> Styled (View Action) |
boardToPlayerTarget :: Int -> Border -> Maybe TargetType -> Player -> View Action #
Whether to show the player target at pSpot
dropEvents :: Target -> [Attribute Action] #
The events for placeholders showing drop targets
targetBorderRGB :: Interaction -> Target -> (Int, Int, Int) #
The border color of a target
:: Int | The z index |
-> HandDrawingInput | |
-> Styled [View Action] |
data Actionizer a b #
Events on cards
Actionizer | |
|
Instances
Functor (Actionizer a) # | |
Defined in GameView fmap :: (a0 -> b) -> Actionizer a a0 -> Actionizer a b # (<$) :: a0 -> Actionizer a b -> Actionizer a a0 # |
data HandDrawingInput #
HandDrawingInput | |
|
boardToInHandCell :: HandDrawingInput -> Actionizer HandIndex Action -> Int -> (Int, Card Core, HandIndex) -> Styled (View Action) #