summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-09-12 23:11:05 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-09-12 23:11:05 +0200 |
commit | e0844c02544ade4b383e707151bda654d7b7af3d (patch) | |
tree | 6572816e7b998a61dad90a49e60c97203b92ba34 | |
parent | 512d266bc7da3bfcd55d23fdb6de7e4ba5293165 (diff) |
Revert "Experimenting with icons"
This reverts commit 512d266bc7da3bfcd55d23fdb6de7e4ba5293165.
-rw-r--r-- | src/css/src/shared/omnimod-icons.scss | 5 | ||||
-rw-r--r-- | src/shared/battle/Battle/View/Attribute.elm | 90 | ||||
-rw-r--r-- | src/shared/battle/Battle/View/DamageType.elm | 68 |
3 files changed, 107 insertions, 56 deletions
diff --git a/src/css/src/shared/omnimod-icons.scss b/src/css/src/shared/omnimod-icons.scss index 1c80411..32835dc 100644 --- a/src/css/src/shared/omnimod-icons.scss +++ b/src/css/src/shared/omnimod-icons.scss @@ -1,13 +1,12 @@ .omnimod-icon { display: inline-block; - min-height: 3em; - min-width: 3em; + min-height: 1.5em; + min-width: 1.5em; background-size: 1.5em; background-repeat: no-repeat; vertical-align: middle; background-position: center; - text-align: center; } .omnimod-icon-dmg, diff --git a/src/shared/battle/Battle/View/Attribute.elm b/src/shared/battle/Battle/View/Attribute.elm index 5c53b4c..9b2a8c7 100644 --- a/src/shared/battle/Battle/View/Attribute.elm +++ b/src/shared/battle/Battle/View/Attribute.elm @@ -41,13 +41,6 @@ get_html attribute value = (Struct.HelpRequest.Attribute attribute) ) ), - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.Attributes.encode_category attribute) - ) - ), (Html.Attributes.class ( if (value < 0) @@ -60,12 +53,32 @@ get_html attribute value = ) ] [ - (Html.text - ( - if (Battle.Struct.Attributes.is_percent attribute) - then ((String.fromInt value) ++ "%") - else (String.fromInt value) - ) + (Html.div + [ + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.Attributes.encode_category attribute) + ) + ) + ] + [ + ] + ), + (Html.div + [ + (Html.Attributes.class "omnimod-value") + ] + [ + (Html.text + ( + if (Battle.Struct.Attributes.is_percent attribute) + then ((String.fromInt value) ++ "%") + else (String.fromInt value) + ) + ) + ] ) ] ) @@ -83,13 +96,6 @@ get_signed_html attribute value = then (Html.Attributes.class "omnimod-negative") else (Html.Attributes.class "omnimod-positive") ), - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.Attributes.encode_category attribute) - ) - ), (Html.Events.onClick (Struct.Event.RequestedHelp (Struct.HelpRequest.Attribute attribute) @@ -97,20 +103,40 @@ get_signed_html attribute value = ) ] [ - (Html.text - ( - ( - if (value > 0) - then ("+" ++ (String.fromInt value)) - else (String.fromInt value) + (Html.div + [ + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.Attributes.encode_category attribute) + ) ) - ++ - ( - if (Battle.Struct.Attributes.is_percent attribute) - then "%" - else "" + ] + [ + ] + ), + (Html.div + [ + (Html.Attributes.class "omnimod-value") + ] + [ + (Html.text + ( + ( + if (value > 0) + then ("+" ++ (String.fromInt value)) + else (String.fromInt value) + ) + ++ + ( + if (Battle.Struct.Attributes.is_percent attribute) + then "%" + else "" + ) + ) ) - ) + ] ) ] ) diff --git a/src/shared/battle/Battle/View/DamageType.elm b/src/shared/battle/Battle/View/DamageType.elm index 4f74133..eee2838 100644 --- a/src/shared/battle/Battle/View/DamageType.elm +++ b/src/shared/battle/Battle/View/DamageType.elm @@ -33,13 +33,6 @@ get_html : ( get_html damage_type value = (Html.div [ - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.DamageType.encode damage_type) - ) - ), (Html.Events.onClick (Struct.Event.RequestedHelp (Struct.HelpRequest.DamageType damage_type) @@ -47,7 +40,27 @@ get_html damage_type value = ) ] [ - (Html.text (String.fromInt value)) + (Html.div + [ + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.DamageType.encode damage_type) + ) + ) + ] + [ + ] + ), + (Html.div + [ + (Html.Attributes.class "omnimod-value") + ] + [ + (Html.text (String.fromInt value)) + ] + ) ] ) @@ -64,13 +77,6 @@ get_signed_html damage_type value = then (Html.Attributes.class "omnimod-negative") else (Html.Attributes.class "omnimod-positive") ), - (Html.Attributes.class "omnimod-icon"), - (Html.Attributes.class - ( - "omnimod-icon-" - ++ (Battle.Struct.DamageType.encode damage_type) - ) - ), (Html.Events.onClick (Struct.Event.RequestedHelp (Struct.HelpRequest.DamageType damage_type) @@ -78,12 +84,32 @@ get_signed_html damage_type value = ) ] [ - (Html.text - ( - if (value > 0) - then ("+" ++ (String.fromInt value)) - else (String.fromInt value) - ) + (Html.div + [ + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.DamageType.encode damage_type) + ) + ) + ] + [ + ] + ), + (Html.div + [ + (Html.Attributes.class "omnimod-value") + ] + [ + (Html.text + ( + if (value > 0) + then ("+" ++ (String.fromInt value)) + else (String.fromInt value) + ) + ) + ] ) ] ) |