summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/battle/Battle/View')
-rw-r--r--src/shared/battle/Battle/View/Attribute.elm179
-rw-r--r--src/shared/battle/Battle/View/Help/Attribute.elm62
-rw-r--r--src/shared/battle/Battle/View/Omnimods.elm30
3 files changed, 0 insertions, 271 deletions
diff --git a/src/shared/battle/Battle/View/Attribute.elm b/src/shared/battle/Battle/View/Attribute.elm
deleted file mode 100644
index 091f3c3..0000000
--- a/src/shared/battle/Battle/View/Attribute.elm
+++ /dev/null
@@ -1,179 +0,0 @@
-module Battle.View.Attribute exposing
- (
- get_html,
- get_all_html,
- get_signed_html,
- get_all_signed_html
- )
-
--- Elm -------------------------------------------------------------------------
-import Html
-import Html.Attributes
-import Html.Events
-
--- Battle ----------------------------------------------------------------------
-import Battle.Struct.Attributes
-
--- Local Module ----------------------------------------------------------------
-import Struct.Event
-import Struct.HelpRequest
-
---------------------------------------------------------------------------------
--- LOCAL -----------------------------------------------------------------------
---------------------------------------------------------------------------------
-
---------------------------------------------------------------------------------
--- EXPORTED --------------------------------------------------------------------
---------------------------------------------------------------------------------
-get_html : (
- Battle.Struct.Attributes.Category ->
- Int ->
- (Html.Html Struct.Event.Type)
- )
-get_html attribute value =
- (Html.div
- [
- (Html.Events.onClick
- (Struct.Event.RequestedHelp
- (Struct.HelpRequest.Attribute attribute)
- )
- )
- ]
- [
- (Html.div
- [
- (Html.Attributes.class "omnimod-icon"),
- (Html.Attributes.class
- (
- "omnimod-icon-"
- ++ (Battle.Struct.Attributes.encode_category attribute)
- )
- )
- ]
- [
- ]
- ),
- (Html.div
- [
- (Html.Attributes.class "omnimod-value")
- ]
- [
- (Html.text (String.fromInt value))
- ]
- )
- ]
- )
-
-get_signed_html : (
- Battle.Struct.Attributes.Category ->
- Int ->
- (Html.Html Struct.Event.Type)
- )
-get_signed_html attribute value =
- (Html.div
- [
- (
- if (value < 0)
- then (Html.Attributes.class "omnimod-negative")
- else (Html.Attributes.class "omnimod-positive")
- ),
- (Html.Events.onClick
- (Struct.Event.RequestedHelp
- (Struct.HelpRequest.Attribute attribute)
- )
- )
- ]
- [
- (Html.div
- [
- (Html.Attributes.class "omnimod-icon"),
- (Html.Attributes.class
- (
- "omnimod-icon-"
- ++ (Battle.Struct.Attributes.encode_category attribute)
- )
- )
- ]
- [
- ]
- ),
- (Html.div
- [
- (Html.Attributes.class "omnimod-value")
- ]
- [
- (Html.text
- (
- if (value > 0)
- then ("+" ++ (String.fromInt value))
- else (String.fromInt value)
- )
- )
- ]
- )
- ]
- )
-
-get_all_html : (
- Battle.Struct.Attributes.Type ->
- (List (Html.Html Struct.Event.Type))
- )
-get_all_html atts =
- [
- (get_html
- Battle.Struct.Attributes.Constitution
- (Battle.Struct.Attributes.get_constitution atts)
- ),
- (get_html
- Battle.Struct.Attributes.Strength
- (Battle.Struct.Attributes.get_strength atts)
- ),
- (get_html
- Battle.Struct.Attributes.Dexterity
- (Battle.Struct.Attributes.get_dexterity atts)
- ),
- (get_html
- Battle.Struct.Attributes.Speed
- (Battle.Struct.Attributes.get_speed atts)
- ),
- (get_html
- Battle.Struct.Attributes.Intelligence
- (Battle.Struct.Attributes.get_intelligence atts)
- ),
- (get_html
- Battle.Struct.Attributes.Mind
- (Battle.Struct.Attributes.get_mind atts)
- )
- ]
-
-get_all_signed_html : (
- Battle.Struct.Attributes.Type ->
- (List (Html.Html Struct.Event.Type))
- )
-get_all_signed_html atts =
- [
- (get_signed_html
- Battle.Struct.Attributes.Constitution
- (Battle.Struct.Attributes.get_constitution atts)
- ),
- (get_signed_html
- Battle.Struct.Attributes.Strength
- (Battle.Struct.Attributes.get_strength atts)
- ),
- (get_signed_html
- Battle.Struct.Attributes.Dexterity
- (Battle.Struct.Attributes.get_dexterity atts)
- ),
- (get_signed_html
- Battle.Struct.Attributes.Speed
- (Battle.Struct.Attributes.get_speed atts)
- ),
- (get_signed_html
- Battle.Struct.Attributes.Intelligence
- (Battle.Struct.Attributes.get_intelligence atts)
- ),
- (get_signed_html
- Battle.Struct.Attributes.Mind
- (Battle.Struct.Attributes.get_mind atts)
- )
- ]
diff --git a/src/shared/battle/Battle/View/Help/Attribute.elm b/src/shared/battle/Battle/View/Help/Attribute.elm
deleted file mode 100644
index f7bd9e1..0000000
--- a/src/shared/battle/Battle/View/Help/Attribute.elm
+++ /dev/null
@@ -1,62 +0,0 @@
-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/Omnimods.elm b/src/shared/battle/Battle/View/Omnimods.elm
index 6a61c4b..a41afba 100644
--- a/src/shared/battle/Battle/View/Omnimods.elm
+++ b/src/shared/battle/Battle/View/Omnimods.elm
@@ -12,12 +12,10 @@ import Html.Attributes
import Html.Events
-- Battle ----------------------------------------------------------------------
-import Battle.Struct.Attributes
import Battle.Struct.DamageType
import Battle.Struct.Omnimods
import Battle.Struct.Statistics
-import Battle.View.Attribute
import Battle.View.DamageType
import Battle.View.Statistic
@@ -72,20 +70,6 @@ get_html_with_modifier attack_multiplier omnimods =
),
(Html.div
[
- (Html.Attributes.class "omnimod-attribute-mods")
- ]
- (List.map
- (\(k, v) ->
- (Battle.View.Attribute.get_signed_html
- (Battle.Struct.Attributes.decode_category k)
- v
- )
- )
- (Battle.Struct.Omnimods.get_attributes_mods omnimods)
- )
- ),
- (Html.div
- [
(Html.Attributes.class "omnimod-statistics-mods")
]
(List.map
@@ -138,20 +122,6 @@ get_html omnimods =
),
(Html.div
[
- (Html.Attributes.class "omnimod-attribute-mods")
- ]
- (List.map
- (\(k, v) ->
- (Battle.View.Attribute.get_signed_html
- (Battle.Struct.Attributes.decode_category k)
- v
- )
- )
- (Battle.Struct.Omnimods.get_attributes_mods omnimods)
- )
- ),
- (Html.div
- [
(Html.Attributes.class "omnimod-statistics-mods")
]
(List.map