summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2018-09-10 18:04:34 +0200
committernsensfel <SpamShield0@noot-noot.org>2018-09-10 18:04:34 +0200
commit4089e04b953ce2799d839d841278446d7f0b4c32 (patch)
treee1877866c559544a97a4557cc99c025184f122c1 /src/character/src/View/SubMenu/Status
parent04e4ce4137fe3ffb0ccc6dc8635db3e202517945 (diff)
character -> roster-editor
Diffstat (limited to 'src/character/src/View/SubMenu/Status')
-rw-r--r--src/character/src/View/SubMenu/Status/CharacterInfo.elm34
-rw-r--r--src/character/src/View/SubMenu/Status/TileInfo.elm137
2 files changed, 0 insertions, 171 deletions
diff --git a/src/character/src/View/SubMenu/Status/CharacterInfo.elm b/src/character/src/View/SubMenu/Status/CharacterInfo.elm
deleted file mode 100644
index 814ce5f..0000000
--- a/src/character/src/View/SubMenu/Status/CharacterInfo.elm
+++ /dev/null
@@ -1,34 +0,0 @@
-module View.SubMenu.Status.CharacterInfo exposing (get_html)
-
--- Elm -------------------------------------------------------------------------
-import Html
-import Html.Attributes
-
--- Struct.Map -------------------------------------------------------------------
-import Struct.Character
-import Struct.Event
-
-import View.Controlled.CharacterCard
-
---------------------------------------------------------------------------------
--- LOCAL -----------------------------------------------------------------------
---------------------------------------------------------------------------------
-
---------------------------------------------------------------------------------
--- EXPORTED --------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_html : (
- Int ->
- Struct.Character.Type ->
- (Html.Html Struct.Event.Type)
- )
-get_html player_ix char =
- (Html.div
- [
- (Html.Attributes.class "battle-tabmenu-character-info")
- ]
- [
- (Html.text ("Focusing:")),
- (View.Controlled.CharacterCard.get_full_html player_ix char)
- ]
- )
diff --git a/src/character/src/View/SubMenu/Status/TileInfo.elm b/src/character/src/View/SubMenu/Status/TileInfo.elm
deleted file mode 100644
index 920b5ce..0000000
--- a/src/character/src/View/SubMenu/Status/TileInfo.elm
+++ /dev/null
@@ -1,137 +0,0 @@
-module View.SubMenu.Status.TileInfo exposing (get_html)
-
--- Elm -------------------------------------------------------------------------
-import Dict
-
-import Html
-import Html.Attributes
-
--- Struct.Map -------------------------------------------------------------------
-import Constants.Movement
-
-import Struct.Map
-import Struct.Event
-import Struct.Location
-import Struct.Model
-import Struct.Tile
-
-import Util.Html
-
-import View.Map.Tile
-
---------------------------------------------------------------------------------
--- LOCAL -----------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_icon : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
-get_icon tile =
- (Html.div
- [
- (Html.Attributes.class "battle-tile-card-icon"),
- (Html.Attributes.class "battle-info-card-picture"),
- (Html.Attributes.class
- (
- "battle-tile-variant-"
- ++ (toString (Struct.Tile.get_local_variant_ix tile))
- )
- )
- ]
- (View.Map.Tile.get_content_html tile)
- )
-
-get_name : (
- Struct.Model.Type ->
- Struct.Tile.Instance ->
- (Html.Html Struct.Event.Type)
- )
-get_name model tile =
- case (Dict.get (Struct.Tile.get_type_id tile) model.tiles) of
- Nothing -> (Util.Html.nothing)
- (Just tile_type) ->
- (Html.div
- [
- (Html.Attributes.class "battle-info-card-name"),
- (Html.Attributes.class "battle-info-card-text-field"),
- (Html.Attributes.class "battle-tile-card-name")
- ]
- [
- (Html.text (Struct.Tile.get_name tile_type))
- ]
- )
-
-get_cost : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
-get_cost tile =
- let
- cost = (Struct.Tile.get_instance_cost tile)
- text =
- if (cost > Constants.Movement.max_points)
- then
- "Obstructed"
- else
- ("Cost: " ++ (toString cost))
- in
- (Html.div
- [
- (Html.Attributes.class "battle-info-card-text-field"),
- (Html.Attributes.class "battle-tile-card-cost")
- ]
- [
- (Html.text text)
- ]
- )
-
-get_location : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
-get_location tile =
- let
- tile_location = (Struct.Tile.get_location tile)
- in
- (Html.div
- [
- (Html.Attributes.class "battle-info-card-text-field"),
- (Html.Attributes.class "battle-tile-card-location")
- ]
- [
- (Html.text
- (
- "{x: "
- ++ (toString tile_location.x)
- ++ "; y: "
- ++ (toString tile_location.y)
- ++ "}"
- )
- )
- ]
- )
-
---------------------------------------------------------------------------------
--- EXPORTED --------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_html : (
- Struct.Model.Type ->
- Struct.Location.Type ->
- (Html.Html Struct.Event.Type)
- )
-get_html model loc =
- case (Struct.Map.try_getting_tile_at loc model.map) of
- (Just tile) ->
- (Html.div
- [
- (Html.Attributes.class "battle-info-card"),
- (Html.Attributes.class "battle-tile-card")
- ]
- [
- (get_name model tile),
- (Html.div
- [
- (Html.Attributes.class "battle-info-card-top"),
- (Html.Attributes.class "battle-tile-card-top")
- ]
- [
- (get_icon tile),
- (get_location tile),
- (get_cost tile)
- ]
- )
- ]
- )
-
- Nothing -> (Html.text "Error: Unknown tile location selected.")