| summaryrefslogtreecommitdiff |
diff options
| author | nsensfel <SpamShield0@noot-noot.org> | 2019-11-20 18:35:01 +0100 |
|---|---|---|
| committer | nsensfel <SpamShield0@noot-noot.org> | 2019-11-20 18:35:01 +0100 |
| commit | f6f7a84e71cc0affd7bfd2ea51a7e67202586836 (patch) | |
| tree | 10276cc32eca2e100a11e493909bd5b98eac96b7 /src/battle/src/View | |
| parent | 6375ecebd314a070b0514e70fd31dc9e3002dfe5 (diff) | |
...
Diffstat (limited to 'src/battle/src/View')
| -rw-r--r-- | src/battle/src/View/Character.elm | 13 | ||||
| -rw-r--r-- | src/battle/src/View/Map/Character.elm | 14 | ||||
| -rw-r--r-- | src/battle/src/View/SubMenu.elm | 13 |
3 files changed, 25 insertions, 15 deletions
diff --git a/src/battle/src/View/Character.elm b/src/battle/src/View/Character.elm index c5082c9..dc256c6 100644 --- a/src/battle/src/View/Character.elm +++ b/src/battle/src/View/Character.elm @@ -48,11 +48,14 @@ get_alliance_class : ( (Html.Attribute Struct.Event.Type) ) get_alliance_class model char = - if ((Struct.Character.get_player_index char) == model.player_ix) - then - (Html.Attributes.class "character-ally") - else - (Html.Attributes.class "character-enemy") + if + ( + (Struct.Character.get_player_index char) == model.player_i + == + (Struct.Battle.get_own_player_index model.battle) + ) + then (Html.Attributes.class "character-ally") + else (Html.Attributes.class "character-enemy") get_position_style : ( Struct.Character.Type -> diff --git a/src/battle/src/View/Map/Character.elm b/src/battle/src/View/Map/Character.elm index 4b69ebc..b20c29a 100644 --- a/src/battle/src/View/Map/Character.elm +++ b/src/battle/src/View/Map/Character.elm @@ -16,6 +16,7 @@ import BattleCharacters.Struct.Equipment -- Local Module ---------------------------------------------------------------- import Constants.UI +import Struct.Battle import Struct.Character import Struct.CharacterTurn import Struct.Event @@ -80,11 +81,14 @@ get_alliance_class : ( (Html.Attribute Struct.Event.Type) ) get_alliance_class model char = - if ((Struct.Character.get_player_index char) == model.player_ix) - then - (Html.Attributes.class "character-ally") - else - (Html.Attributes.class "character-enemy") + if + ( + (Struct.Character.get_player_index char) + == + (Struct.Battle.get_own_player_index model.battle) + ) + then (Html.Attributes.class "character-ally") + else (Html.Attributes.class "character-enemy") get_position_style : ( Struct.Character.Type -> diff --git a/src/battle/src/View/SubMenu.elm b/src/battle/src/View/SubMenu.elm index 60a1c7d..dea0a86 100644 --- a/src/battle/src/View/SubMenu.elm +++ b/src/battle/src/View/SubMenu.elm @@ -11,6 +11,7 @@ import Html.Lazy import Util.Html -- Local Module ---------------------------------------------------------------- +import Struct.Battle import Struct.CharacterTurn import Struct.Event import Struct.Model @@ -37,10 +38,9 @@ get_inner_html model tab = (View.SubMenu.Status.get_html model) Struct.UI.CharactersTab -> - (Html.Lazy.lazy2 + (Html.Lazy.lazy (View.SubMenu.Characters.get_html) - model.characters - model.player_ix + model.battle ) Struct.UI.SettingsTab -> @@ -71,9 +71,12 @@ get_html model = [ (Html.text "Targeting:"), (Html.Lazy.lazy3 - (View.Controlled.CharacterCard.get_summary_html) + (View.Controlled.CharacterCard.get_summary_html + (Struct.Battle.get_own_player_index + model.battle + ) + ) model.char_turn - model.player_ix char ) ] |


