summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/css/src/shared/omnimod-icons.scss7
-rw-r--r--src/roster-editor/src/View/WeaponSelection.elm57
2 files changed, 38 insertions, 26 deletions
diff --git a/src/css/src/shared/omnimod-icons.scss b/src/css/src/shared/omnimod-icons.scss
index d56a466..723df26 100644
--- a/src/css/src/shared/omnimod-icons.scss
+++ b/src/css/src/shared/omnimod-icons.scss
@@ -1,11 +1,12 @@
.omnimod-icon
{
display: inline-block;
- height: 1.5em;
- width: 1.5em;
- background-size: 100%;
+ min-height: 1.5em;
+ min-width: 1.5em;
+ background-size: 1.5em;
background-repeat: no-repeat;
vertical-align: middle;
+ background-position: center;
}
.omnimod-icon-dmg
diff --git a/src/roster-editor/src/View/WeaponSelection.elm b/src/roster-editor/src/View/WeaponSelection.elm
index c3dd805..d43a8d9 100644
--- a/src/roster-editor/src/View/WeaponSelection.elm
+++ b/src/roster-editor/src/View/WeaponSelection.elm
@@ -26,9 +26,15 @@ get_mod_html mod =
(Html.Attributes.class "info-card-mod")
]
[
- (Html.text
- (category ++ ": " ++ (String.fromInt value))
- )
+ (Html.div
+ [
+ (Html.Attributes.class "omnimod-icon"),
+ (Html.Attributes.class ("omnimod-icon-" ++ category))
+ ]
+ [
+ ]
+ ),
+ (Html.text (String.fromInt value))
]
)
@@ -60,29 +66,34 @@ get_weapon_html weapon =
),
(Html.div
[
+ (Html.Attributes.class "omnimod-icon"),
+ (Html.Attributes.class "omnimod-icon-dmg")
+ ]
+ [
+ ]
+ ),
+ (Html.text
+ (String.fromInt (Struct.Weapon.get_damage_sum weapon))
+ ),
+ (Html.div
+ [
+ (Html.Attributes.class "omnimod-icon"),
+ (Html.Attributes.class "omnimod-icon-range")
]
[
- (Html.text
- (
- "~"
- ++
- (String.fromInt
- (Struct.Weapon.get_damage_sum weapon)
- )
- ++ " dmg @ ["
- ++
- (String.fromInt
- (Struct.Weapon.get_defense_range weapon)
- )
- ++ ", "
- ++
- (String.fromInt
- (Struct.Weapon.get_attack_range weapon)
- )
- ++ "]"
- )
- )
]
+ ),
+ (Html.text
+ (
+ (String.fromInt
+ (Struct.Weapon.get_defense_range weapon)
+ )
+ ++ "-"
+ ++
+ (String.fromInt
+ (Struct.Weapon.get_attack_range weapon)
+ )
+ )
)
]
),