summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/battle/Battle/View/Help')
-rw-r--r--src/shared/battle/Battle/View/Help/Attribute.elm62
-rw-r--r--src/shared/battle/Battle/View/Help/Statistic.elm62
2 files changed, 124 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
+ ]
diff --git a/src/shared/battle/Battle/View/Help/Statistic.elm b/src/shared/battle/Battle/View/Help/Statistic.elm
new file mode 100644
index 0000000..0e1f056
--- /dev/null
+++ b/src/shared/battle/Battle/View/Help/Statistic.elm
@@ -0,0 +1,62 @@
+module Battle.View.Help.Statistic exposing (get_html_contents)
+
+-- Elm -------------------------------------------------------------------------
+import Html
+import Html.Attributes
+
+-- Battle ----------------------------------------------------------------------
+import Battle.Struct.Statistics
+import Battle.Lang.English
+
+-- Local Module ----------------------------------------------------------------
+import Struct.Event
+
+--------------------------------------------------------------------------------
+-- LOCAL -----------------------------------------------------------------------
+--------------------------------------------------------------------------------
+get_header_html : (
+ Battle.Struct.Statistics.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.Statistics.encode_category cat)
+ )
+ )
+ ]
+ [
+ ]
+ ),
+ (Html.text name)
+ ]
+ )
+
+--------------------------------------------------------------------------------
+-- EXPORTED --------------------------------------------------------------------
+--------------------------------------------------------------------------------
+get_html_contents : (
+ Battle.Struct.Statistics.Category ->
+ (List (Html.Html Struct.Event.Type))
+ )
+get_html_contents cat =
+ let
+ (name, tooltip) = (Battle.Lang.English.get_statistic_category_help cat)
+ in
+ [
+ (get_header_html cat name),
+ tooltip
+ ]