summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/battlemap/src/View/SubMenu')
-rw-r--r--src/battlemap/src/View/SubMenu/Characters.elm12
-rw-r--r--src/battlemap/src/View/SubMenu/Status.elm2
-rw-r--r--src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm8
-rw-r--r--src/battlemap/src/View/SubMenu/Timeline.elm18
-rw-r--r--src/battlemap/src/View/SubMenu/Timeline/Attack.elm8
-rw-r--r--src/battlemap/src/View/SubMenu/Timeline/Movement.elm8
-rw-r--r--src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm6
7 files changed, 31 insertions, 31 deletions
diff --git a/src/battlemap/src/View/SubMenu/Characters.elm b/src/battlemap/src/View/SubMenu/Characters.elm
index 31819e5..be5bac4 100644
--- a/src/battlemap/src/View/SubMenu/Characters.elm
+++ b/src/battlemap/src/View/SubMenu/Characters.elm
@@ -17,11 +17,11 @@ import View.Controlled.CharacterCard
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
get_character_element_html : (
- String ->
+ Int ->
Struct.Character.Type ->
(Html.Html Struct.Event.Type)
)
-get_character_element_html player_id char =
+get_character_element_html player_ix char =
(Html.div
[
(Html.Attributes.class "battlemap-characters-element"),
@@ -44,7 +44,7 @@ get_character_element_html player_id char =
)
]
[
- (View.Controlled.CharacterCard.get_minimal_html player_id char)
+ (View.Controlled.CharacterCard.get_minimal_html player_ix char)
]
)
@@ -53,17 +53,17 @@ get_character_element_html player_id char =
--------------------------------------------------------------------------------
get_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
(Html.Html Struct.Event.Type)
)
-get_html characters player_id =
+get_html characters player_ix =
(Html.div
[
(Html.Attributes.class "battlemap-tabmenu-content"),
(Html.Attributes.class "battlemap-tabmenu-characters-tab")
]
(List.map
- (get_character_element_html player_id)
+ (get_character_element_html player_ix)
(Array.toList characters)
)
)
diff --git a/src/battlemap/src/View/SubMenu/Status.elm b/src/battlemap/src/View/SubMenu/Status.elm
index c64bc2d..f67c85e 100644
--- a/src/battlemap/src/View/SubMenu/Status.elm
+++ b/src/battlemap/src/View/SubMenu/Status.elm
@@ -42,7 +42,7 @@ get_html model =
(Just char) ->
(Html.Lazy.lazy2
(View.SubMenu.Status.CharacterInfo.get_html)
- model.player_id
+ model.player_ix
char
)
diff --git a/src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm b/src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm
index cbe776a..a927158 100644
--- a/src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm
+++ b/src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm
@@ -17,18 +17,18 @@ import View.Controlled.CharacterCard
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-get_html: (
- String ->
+get_html : (
+ Int ->
Struct.Character.Type ->
(Html.Html Struct.Event.Type)
)
-get_html player_id char =
+get_html player_ix char =
(Html.div
[
(Html.Attributes.class "battlemap-tabmenu-character-info")
]
[
(Html.text ("Focusing:")),
- (View.Controlled.CharacterCard.get_full_html player_id char)
+ (View.Controlled.CharacterCard.get_full_html player_ix char)
]
)
diff --git a/src/battlemap/src/View/SubMenu/Timeline.elm b/src/battlemap/src/View/SubMenu/Timeline.elm
index 5677da7..e6a449f 100644
--- a/src/battlemap/src/View/SubMenu/Timeline.elm
+++ b/src/battlemap/src/View/SubMenu/Timeline.elm
@@ -26,30 +26,30 @@ import View.SubMenu.Timeline.PlayerTurnStart
--------------------------------------------------------------------------------
get_turn_result_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
Struct.TurnResult.Type ->
(Html.Html Struct.Event.Type)
)
-get_turn_result_html characters player_id turn_result =
+get_turn_result_html characters player_ix turn_result =
case turn_result of
(Struct.TurnResult.Moved movement) ->
(View.SubMenu.Timeline.Movement.get_html
characters
- player_id
+ player_ix
movement
)
(Struct.TurnResult.Attacked attack) ->
(View.SubMenu.Timeline.Attack.get_html
characters
- player_id
+ player_ix
attack
)
(Struct.TurnResult.SwitchedWeapon weapon_switch) ->
(View.SubMenu.Timeline.WeaponSwitch.get_html
characters
- player_id
+ player_ix
weapon_switch
)
@@ -64,11 +64,11 @@ get_turn_result_html characters player_id turn_result =
true_get_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
(Array.Array Struct.TurnResult.Type) ->
(Html.Html Struct.Event.Type)
)
-true_get_html characters player_id turn_results =
+true_get_html characters player_ix turn_results =
(Html.div
[
(Html.Attributes.class "battlemap-tabmenu-content"),
@@ -76,7 +76,7 @@ true_get_html characters player_id turn_results =
]
(Array.toList
(Array.map
- (get_turn_result_html characters player_id)
+ (get_turn_result_html characters player_ix)
turn_results
)
)
@@ -90,6 +90,6 @@ get_html model =
(Html.Lazy.lazy3
(true_get_html)
model.characters
- model.player_id
+ model.player_ix
model.timeline
)
diff --git a/src/battlemap/src/View/SubMenu/Timeline/Attack.elm b/src/battlemap/src/View/SubMenu/Timeline/Attack.elm
index f41598b..875bc89 100644
--- a/src/battlemap/src/View/SubMenu/Timeline/Attack.elm
+++ b/src/battlemap/src/View/SubMenu/Timeline/Attack.elm
@@ -121,11 +121,11 @@ get_attack_html attacker defender attack =
--------------------------------------------------------------------------------
get_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
Struct.TurnResult.Attack ->
(Html.Html Struct.Event.Type)
)
-get_html characters player_id attack =
+get_html characters player_ix attack =
case
(
(Array.get attack.attacker_index characters),
@@ -140,8 +140,8 @@ get_html characters player_id attack =
]
(
[
- (View.Character.get_portrait_html player_id atkchar),
- (View.Character.get_portrait_html player_id defchar),
+ (View.Character.get_portrait_html player_ix atkchar),
+ (View.Character.get_portrait_html player_ix defchar),
(get_title_html atkchar defchar)
]
++
diff --git a/src/battlemap/src/View/SubMenu/Timeline/Movement.elm b/src/battlemap/src/View/SubMenu/Timeline/Movement.elm
index 36b0410..2f7acd3 100644
--- a/src/battlemap/src/View/SubMenu/Timeline/Movement.elm
+++ b/src/battlemap/src/View/SubMenu/Timeline/Movement.elm
@@ -1,7 +1,7 @@
module View.SubMenu.Timeline.Movement exposing (get_html)
-- Elm -------------------------------------------------------------------------
-import Array
+import Array
import Html
import Html.Attributes
@@ -23,11 +23,11 @@ import View.Character
--------------------------------------------------------------------------------
get_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
Struct.TurnResult.Movement ->
(Html.Html Struct.Event.Type)
)
-get_html characters player_id movement =
+get_html characters player_ix movement =
case (Array.get movement.character_index characters) of
(Just char) ->
(Html.div
@@ -36,7 +36,7 @@ get_html characters player_id movement =
(Html.Attributes.class "battlemap-timeline-movement")
]
[
- (View.Character.get_portrait_html player_id char),
+ (View.Character.get_portrait_html player_ix char),
(Html.text
(
(Struct.Character.get_name char)
diff --git a/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm b/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm
index 31d1a19..e66cfed 100644
--- a/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm
+++ b/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm
@@ -23,11 +23,11 @@ import View.Character
--------------------------------------------------------------------------------
get_html : (
(Array.Array Struct.Character.Type) ->
- String ->
+ Int ->
Struct.TurnResult.WeaponSwitch ->
(Html.Html Struct.Event.Type)
)
-get_html characters player_id weapon_switch =
+get_html characters player_ix weapon_switch =
case (Array.get weapon_switch.character_index characters) of
(Just char) ->
(Html.div
@@ -36,7 +36,7 @@ get_html characters player_id weapon_switch =
(Html.Attributes.class "battlemap-timeline-weapon-switch")
]
[
- (View.Character.get_portrait_html player_id char),
+ (View.Character.get_portrait_html player_ix char),
(Html.text
(
(Struct.Character.get_name char)