From 112dbe2aa3e4771d71754a357627ba4449e8c974 Mon Sep 17 00:00:00 2001 From: nsensfel Date: Fri, 3 May 2019 14:17:19 +0200 Subject: Base dmg icon, dmg types help. --- src/shared/battle/Battle/View/Help/DamageType.elm | 62 +++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 src/shared/battle/Battle/View/Help/DamageType.elm (limited to 'src/shared/battle/Battle/View/Help') diff --git a/src/shared/battle/Battle/View/Help/DamageType.elm b/src/shared/battle/Battle/View/Help/DamageType.elm new file mode 100644 index 0000000..4be1867 --- /dev/null +++ b/src/shared/battle/Battle/View/Help/DamageType.elm @@ -0,0 +1,62 @@ +module Battle.View.Help.DamageType exposing (get_html_contents) + +-- Elm ------------------------------------------------------------------------- +import Html +import Html.Attributes + +-- Battle ---------------------------------------------------------------------- +import Battle.Struct.DamageType +import Battle.Lang.English + +-- Local Module ---------------------------------------------------------------- +import Struct.Event + +-------------------------------------------------------------------------------- +-- LOCAL ----------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_header_html : ( + Battle.Struct.DamageType.Type -> + 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.DamageType.encode cat) + ) + ) + ] + [ + ] + ), + (Html.text name) + ] + ) + +-------------------------------------------------------------------------------- +-- EXPORTED -------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_html_contents : ( + Battle.Struct.DamageType.Type -> + (List (Html.Html Struct.Event.Type)) + ) +get_html_contents cat = + let + (name, tooltip) = (Battle.Lang.English.get_damage_type_help cat) + in + [ + (get_header_html cat name), + tooltip + ] -- cgit v1.2.3-70-g09d2