summaryrefslogtreecommitdiff |
diff options
author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-08-10 18:23:48 +0200 |
---|---|---|
committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2019-08-10 18:23:48 +0200 |
commit | 120b0b7f6df0c8978aac9a423cbf8364feac4779 (patch) | |
tree | 9fd0b29790de37c8f3f6c786391a543d79b74164 /src/shared/battle/Battle/View/Help/Attribute.elm | |
parent | 69611b72a28333c129ad25c3daae92b4215ac5d4 (diff) |
Statistics -> Attributes.
Diffstat (limited to 'src/shared/battle/Battle/View/Help/Attribute.elm')
-rw-r--r-- | src/shared/battle/Battle/View/Help/Attribute.elm | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/src/shared/battle/Battle/View/Help/Attribute.elm b/src/shared/battle/Battle/View/Help/Attribute.elm new file mode 100644 index 0000000..f7bd9e1 --- /dev/null +++ b/src/shared/battle/Battle/View/Help/Attribute.elm @@ -0,0 +1,62 @@ +module Battle.View.Help.Attribute exposing (get_html_contents) + +-- Elm ------------------------------------------------------------------------- +import Html +import Html.Attributes + +-- Battle ---------------------------------------------------------------------- +import Battle.Struct.Attributes +import Battle.Lang.English + +-- Local Module ---------------------------------------------------------------- +import Struct.Event + +-------------------------------------------------------------------------------- +-- LOCAL ----------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_header_html : ( + Battle.Struct.Attributes.Category -> + String -> + (Html.Html Struct.Event.Type) + ) +get_header_html cat name = + (Html.h1 + [] + [ + (Html.div + [(Html.Attributes.class "help-guide-icon")] + [] + ), + (Html.text " "), + (Html.div + [ + (Html.Attributes.class "omnimod-icon"), + (Html.Attributes.class + ( + "omnimod-icon-" + ++ (Battle.Struct.Attributes.encode_category cat) + ) + ) + ] + [ + ] + ), + (Html.text name) + ] + ) + +-------------------------------------------------------------------------------- +-- EXPORTED -------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_html_contents : ( + Battle.Struct.Attributes.Category -> + (List (Html.Html Struct.Event.Type)) + ) +get_html_contents cat = + let + (name, tooltip) = (Battle.Lang.English.get_attribute_category_help cat) + in + [ + (get_header_html cat name), + tooltip + ] |