aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-05-06 17:30:09 +0200
committernsensfel <SpamShield0@noot-noot.org>2019-05-06 17:30:09 +0200
commit30d48f413b6a2178631ca20a4381c8b4e6bcd24d (patch)
treee87010dbe3ce3d45982c573acdc04fb79a06d83c
parentc14e56360447d5581913d5a535b0540378f04a04 (diff)
downloadtacticians-client-30d48f413b6a2178631ca20a4381c8b4e6bcd24d.zip
tacticians-client-30d48f413b6a2178631ca20a4381c8b4e6bcd24d.tar.bz2
Minor UI improvements.
-rw-r--r--src/battle/src/View/Controlled/CharacterCard.elm4
-rw-r--r--src/battle/src/View/SubMenu/Status/TileInfo.elm56
2 files changed, 8 insertions, 52 deletions
diff --git a/src/battle/src/View/Controlled/CharacterCard.elm b/src/battle/src/View/Controlled/CharacterCard.elm
index 2416323..f4202e8 100644
--- a/src/battle/src/View/Controlled/CharacterCard.elm
+++ b/src/battle/src/View/Controlled/CharacterCard.elm
@@ -351,7 +351,9 @@ get_armor_details omnimods armor =
]
),
(Html.div
- []
+ [
+ (Html.Attributes.class "omnimod-defense-mods")
+ ]
(List.map
(\(k, v) ->
(Battle.View.DamageType.get_html
diff --git a/src/battle/src/View/SubMenu/Status/TileInfo.elm b/src/battle/src/View/SubMenu/Status/TileInfo.elm
index a045caf..76e6e0e 100644
--- a/src/battle/src/View/SubMenu/Status/TileInfo.elm
+++ b/src/battle/src/View/SubMenu/Status/TileInfo.elm
@@ -12,6 +12,8 @@ import Util.Html
-- Battle ----------------------------------------------------------------------
import Battle.Struct.Omnimods
+import Battle.View.Omnimods
+
-- Battle Map ------------------------------------------------------------------
import BattleMap.Struct.Location
import BattleMap.Struct.Map
@@ -117,56 +119,6 @@ get_location tile_inst =
]
)
-get_mod_html : (String, Int) -> (Html.Html Struct.Event.Type)
-get_mod_html mod =
- let
- (category, value) = mod
- in
- (Html.div
- [
- (Html.Attributes.class "info-card-mod")
- ]
- [
- (Html.text
- (category ++ ": " ++ (String.fromInt value))
- )
- ]
- )
-
-get_omnimods_listing : (List (String, Int)) -> (Html.Html Struct.Event.Type)
-get_omnimods_listing mod_list =
- (Html.div
- [
- (Html.Attributes.class "info-card-omnimods-listing")
- ]
- (List.map (get_mod_html) mod_list)
- )
-
-get_omnimods : Battle.Struct.Omnimods.Type -> (Html.Html Struct.Event.Type)
-get_omnimods omnimods =
- (Html.div
- [
- (Html.Attributes.class "info-card-omnimods")
- ]
- [
- (Html.text "Attribute Modifiers"),
- (get_omnimods_listing
- (Battle.Struct.Omnimods.get_attributes_mods omnimods)
- ),
- (Html.text "Statistics Modifiers"),
- (get_omnimods_listing
- (Battle.Struct.Omnimods.get_statistics_mods omnimods)
- ),
- (Html.text "Attack Modifiers"),
- (get_omnimods_listing
- (Battle.Struct.Omnimods.get_attack_mods omnimods)
- ),
- (Html.text "Defense Modifiers"),
- (get_omnimods_listing
- (Battle.Struct.Omnimods.get_defense_mods omnimods)
- )
- ]
- )
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
@@ -196,7 +148,9 @@ get_html model loc =
(get_cost tile)
]
),
- (get_omnimods ((Struct.Model.tile_omnimods_fun model) loc))
+ (Battle.View.Omnimods.get_html
+ ((Struct.Model.tile_omnimods_fun model) loc)
+ )
]
)