summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornsensfel <SpamShield0@noot-noot.org>2019-05-03 14:17:19 +0200
committernsensfel <SpamShield0@noot-noot.org>2019-05-03 14:17:19 +0200
commit112dbe2aa3e4771d71754a357627ba4449e8c974 (patch)
tree273624e799464df39e4d276da09fa9ee3100eab8 /src/shared/battle/Battle/View
parentf0b1a04a8a4903596ed3347aaf0a97bc1ce9ba44 (diff)
Base dmg icon, dmg types help.
Diffstat (limited to 'src/shared/battle/Battle/View')
-rw-r--r--src/shared/battle/Battle/View/Help/DamageType.elm62
1 files changed, 62 insertions, 0 deletions
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
+ ]