summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-02-01 18:00:28 +0100
committernsensfel <SpamShield0@noot-noot.org>2019-02-01 18:00:28 +0100
commita6734aa05a940cff59c6a7d637d47114db66f74e (patch)
tree98dc215da12cb53e590dd70236f0452df0131278
parent54be32b14162e4152fba820a41b70e490ee06fae (diff)
...
-rw-r--r--src/css/src/shared/omnimod-icons.scss53
-rw-r--r--src/roster-editor/src/View/CharacterCard.elm83
2 files changed, 102 insertions, 34 deletions
diff --git a/src/css/src/shared/omnimod-icons.scss b/src/css/src/shared/omnimod-icons.scss
index b782165..d56a466 100644
--- a/src/css/src/shared/omnimod-icons.scss
+++ b/src/css/src/shared/omnimod-icons.scss
@@ -1,8 +1,8 @@
.omnimod-icon
{
display: inline-block;
- height: 1em;
- width: 1em;
+ height: 1.5em;
+ width: 1.5em;
background-size: 100%;
background-repeat: no-repeat;
vertical-align: middle;
@@ -12,6 +12,10 @@
{
background-image: url(/asset/svg/damage_type/damage.svg);
}
+.omnimod-icon-range
+{
+ background-image: url(/asset/svg/damage_type/accuracy.svg);
+}
.omnimod-icon-slh
{
@@ -27,3 +31,48 @@
{
background-image: url(/asset/svg/damage_type/piercing.svg);
}
+
+.omnimod-icon-pary
+{
+ background-image: url(/asset/svg/damage_type/parry.svg);
+}
+
+.omnimod-icon-accu
+{
+ background-image: url(/asset/svg/damage_type/accuracy2.svg);
+}
+
+.omnimod-icon-dhit
+{
+ background-image: url(/asset/svg/damage_type/2hits.svg);
+}
+
+.omnimod-icon-con
+{
+ background-image: url(/asset/svg/damage_type/constitution.svg);
+}
+
+.omnimod-icon-dex
+{
+ background-image: url(/asset/svg/damage_type/dexterity.svg);
+}
+
+.omnimod-icon-int
+{
+ background-image: url(/asset/svg/damage_type/intelligence.svg);
+}
+
+.omnimod-icon-min
+{
+ background-image: url(/asset/svg/damage_type/mind.svg);
+}
+
+.omnimod-icon-spe
+{
+ background-image: url(/asset/svg/damage_type/speed.svg);
+}
+
+.omnimod-icon-str
+{
+ background-image: url(/asset/svg/damage_type/strength.svg);
+}
diff --git a/src/roster-editor/src/View/CharacterCard.elm b/src/roster-editor/src/View/CharacterCard.elm
index 7ae2338..01aea47 100644
--- a/src/roster-editor/src/View/CharacterCard.elm
+++ b/src/roster-editor/src/View/CharacterCard.elm
@@ -138,29 +138,42 @@ get_weapon_field_header damage_multiplier weapon =
[
]
[
+ (Html.div
+ [
+ (Html.Attributes.class "omnimod-icon"),
+ (Html.Attributes.class "omnimod-icon-dmg")
+ ]
+ [
+ ]
+ ),
(Html.text
- (
- "~"
- ++
- (String.fromInt
- (ceiling
- (
- (toFloat (Struct.Weapon.get_damage_sum weapon))
- * damage_multiplier
- )
+ (String.fromInt
+ (ceiling
+ (
+ (toFloat (Struct.Weapon.get_damage_sum weapon))
+ * damage_multiplier
)
)
- ++ " dmg @ ["
- ++
+ )
+ ),
+ (Html.div
+ [
+ (Html.Attributes.class "omnimod-icon"),
+ (Html.Attributes.class "omnimod-icon-range")
+ ]
+ [
+ ]
+ ),
+ (Html.text
+ (
(String.fromInt
(Struct.Weapon.get_defense_range weapon)
)
- ++ ", "
+ ++ "-"
++
(String.fromInt
(Struct.Weapon.get_attack_range weapon)
)
- ++ "]"
)
)
]
@@ -178,9 +191,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))
]
)
@@ -316,10 +335,10 @@ stat_name : String -> (Html.Html Struct.Event.Type)
stat_name name =
(Html.div
[
- (Html.Attributes.class "character-card-stat-name")
+ (Html.Attributes.class "omnimod-icon"),
+ (Html.Attributes.class ("omnimod-icon-" ++ name))
]
[
- (Html.text name)
]
)
@@ -360,15 +379,15 @@ get_relevant_stats stats =
)
]
[
- (stat_name "Dodge"),
+ (stat_name "dodg"),
(stat_val (Struct.Statistics.get_dodges stats) True),
- (stat_name "Parry"),
+ (stat_name "pary"),
(stat_val (Struct.Statistics.get_parries stats) True),
- (stat_name "Accu."),
+ (stat_name "accu"),
(stat_val (Struct.Statistics.get_accuracy stats) False),
- (stat_name "2xHit"),
+ (stat_name "dhit"),
(stat_val (Struct.Statistics.get_double_hits stats) True),
- (stat_name "Crit."),
+ (stat_name "crit"),
(stat_val (Struct.Statistics.get_critical_hits stats) True)
]
)
@@ -387,18 +406,18 @@ get_attributes atts =
)
]
[
- (stat_name "Con"),
+ (stat_name "con"),
(stat_val (Struct.Attributes.get_constitution atts) False),
- (stat_name "Dex"),
+ (stat_name "str"),
+ (stat_val (Struct.Attributes.get_strength atts) False),
+ (stat_name "dex"),
(stat_val (Struct.Attributes.get_dexterity atts) False),
- (stat_name "Int"),
- (stat_val (Struct.Attributes.get_intelligence atts) False),
- (stat_name "Min"),
- (stat_val (Struct.Attributes.get_mind atts) False),
- (stat_name "Spe"),
+ (stat_name "spe"),
(stat_val (Struct.Attributes.get_speed atts) False),
- (stat_name "Str"),
- (stat_val (Struct.Attributes.get_strength atts) False)
+ (stat_name "int"),
+ (stat_val (Struct.Attributes.get_intelligence atts) False),
+ (stat_name "min"),
+ (stat_val (Struct.Attributes.get_mind atts) False)
]
)