summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2019-03-20 17:30:22 +0100 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2019-03-20 17:30:22 +0100 |
commit | 125eb8ba1e1707bd5468a96131a740abef3c6f43 (patch) | |
tree | 28216937c3d3403906f347108ab19d89f0afa828 /src/shared/battle/Battle/View/Attribute.elm | |
parent | b6fa3b730fe0c4249e714545ca88d2729c815a9b (diff) |
...
Diffstat (limited to 'src/shared/battle/Battle/View/Attribute.elm')
-rw-r--r-- | src/shared/battle/Battle/View/Attribute.elm | 28 |
1 files changed, 13 insertions, 15 deletions
diff --git a/src/shared/battle/Battle/View/Attribute.elm b/src/shared/battle/Battle/View/Attribute.elm index abf71c3..091f3c3 100644 --- a/src/shared/battle/Battle/View/Attribute.elm +++ b/src/shared/battle/Battle/View/Attribute.elm @@ -9,9 +9,10 @@ module Battle.View.Attribute exposing -- Elm ------------------------------------------------------------------------- import Html import Html.Attributes +import Html.Events -- Battle ---------------------------------------------------------------------- -import Battle.Struct.Attribute +import Battle.Struct.Attributes -- Local Module ---------------------------------------------------------------- import Struct.Event @@ -25,9 +26,9 @@ import Struct.HelpRequest -- EXPORTED -------------------------------------------------------------------- -------------------------------------------------------------------------------- get_html : ( - Battle.Struct.Attribute.Category -> + Battle.Struct.Attributes.Category -> Int -> - (List (Html.Html Struct.Event.Type)) + (Html.Html Struct.Event.Type) ) get_html attribute value = (Html.div @@ -45,9 +46,9 @@ get_html attribute value = (Html.Attributes.class ( "omnimod-icon-" - ++ (Battle.Struct.Attribute.encode_category attribute) + ++ (Battle.Struct.Attributes.encode_category attribute) ) - ), + ) ] [ ] @@ -57,14 +58,14 @@ get_html attribute value = (Html.Attributes.class "omnimod-value") ] [ - (Html.text (String.FromInt value)) + (Html.text (String.fromInt value)) ] ) ] ) get_signed_html : ( - Battle.Struct.Attribute.Category -> + Battle.Struct.Attributes.Category -> Int -> (Html.Html Struct.Event.Type) ) @@ -89,9 +90,9 @@ get_signed_html attribute value = (Html.Attributes.class ( "omnimod-icon-" - ++ (Battle.Struct.Attribute.encode_category attribute) + ++ (Battle.Struct.Attributes.encode_category attribute) ) - ), + ) ] [ ] @@ -103,12 +104,9 @@ get_signed_html attribute value = [ (Html.text ( - ( - if (value < 0) - then "-" - else "+" - ) - ++ (String.FromInt value) + if (value > 0) + then ("+" ++ (String.fromInt value)) + else (String.fromInt value) ) ) ] |