summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/battlemap/src/View/SubMenu')
-rw-r--r-- | src/battlemap/src/View/SubMenu/Characters.elm | 69 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Settings.elm | 59 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Status.elm | 55 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm | 34 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Status/TileInfo.elm | 142 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Timeline.elm | 95 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Timeline/Attack.elm | 164 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Timeline/Movement.elm | 62 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Timeline/PlayerDefeat.elm | 38 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Timeline/PlayerTurnStart.elm | 38 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Timeline/PlayerVictory.elm | 38 | ||||
-rw-r--r-- | src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm | 58 |
12 files changed, 0 insertions, 852 deletions
diff --git a/src/battlemap/src/View/SubMenu/Characters.elm b/src/battlemap/src/View/SubMenu/Characters.elm deleted file mode 100644 index be5bac4..0000000 --- a/src/battlemap/src/View/SubMenu/Characters.elm +++ /dev/null @@ -1,69 +0,0 @@ -module View.SubMenu.Characters exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Array - -import Html -import Html.Attributes -import Html.Events - --- Battlemap ------------------------------------------------------------------- -import Struct.Character -import Struct.Event - -import View.Controlled.CharacterCard - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_character_element_html : ( - Int -> - Struct.Character.Type -> - (Html.Html Struct.Event.Type) - ) -get_character_element_html player_ix char = - (Html.div - [ - (Html.Attributes.class "battlemap-characters-element"), - ( - if (Struct.Character.is_alive char) - then - (Html.Attributes.class "clickable") - else - (Html.Attributes.class "") - ), - (Html.Events.onClick - (Struct.Event.LookingForCharacter (Struct.Character.get_index char)) - ), - ( - if (Struct.Character.is_enabled char) - then - (Html.Attributes.class "battlemap-characters-element-active") - else - (Html.Attributes.class "battlemap-characters-element-inactive") - ) - ] - [ - (View.Controlled.CharacterCard.get_minimal_html player_ix char) - ] - ) - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - (Array.Array Struct.Character.Type) -> - Int -> - (Html.Html Struct.Event.Type) - ) -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_ix) - (Array.toList characters) - ) - ) diff --git a/src/battlemap/src/View/SubMenu/Settings.elm b/src/battlemap/src/View/SubMenu/Settings.elm deleted file mode 100644 index 22aa99a..0000000 --- a/src/battlemap/src/View/SubMenu/Settings.elm +++ /dev/null @@ -1,59 +0,0 @@ -module View.SubMenu.Settings exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Html -import Html.Attributes -import Html.Events - --- Battlemap ------------------------------------------------------------------- -import Struct.Event -import Struct.Model - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- -scale_button : Float -> String -> (Html.Html Struct.Event.Type) -scale_button mod label = - (Html.button - [ - (Html.Events.onClick - (Struct.Event.ScaleChangeRequested mod) - ) - ] - [ (Html.text label) ] - ) - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type) -get_html model = - (Html.div - [ - (Html.Attributes.class "battlemap-tabmenu-content"), - (Html.Attributes.class "battlemap-tabmenu-settings-tab") - ] - [ - (scale_button (0.75) "Zoom -"), - (scale_button 0 "Zoom Reset"), - (scale_button (1.15) "Zoom +"), - (Html.button - [ - (Html.Events.onClick Struct.Event.DebugTeamSwitchRequest) - ] - [ (Html.text "[DEBUG] Switch team") ] - ), - (Html.button - [ - (Html.Events.onClick Struct.Event.DebugLoadBattlemapRequest) - ] - [ (Html.text "[DEBUG] Load battlemap") ] - ), - (Html.button - [ - (Html.Events.onClick Struct.Event.DebugTestAnimation) - ] - [ (Html.text "[DEBUG] Test animations") ] - ) - ] - ) diff --git a/src/battlemap/src/View/SubMenu/Status.elm b/src/battlemap/src/View/SubMenu/Status.elm deleted file mode 100644 index f67c85e..0000000 --- a/src/battlemap/src/View/SubMenu/Status.elm +++ /dev/null @@ -1,55 +0,0 @@ -module View.SubMenu.Status exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Array - -import Html -import Html.Attributes -import Html.Lazy - --- Struct.Battlemap ------------------------------------------------------------------- -import Struct.Event -import Struct.Location -import Struct.Model -import Struct.UI - -import View.SubMenu.Status.CharacterInfo -import View.SubMenu.Status.TileInfo --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type) -get_html model = - (Html.div - [ - (Html.Attributes.class "battlemap-footer-tabmenu-content"), - (Html.Attributes.class "battlemap-footer-tabmenu-content-status") - ] - [ - (case (Struct.UI.get_previous_action model.ui) of - (Just (Struct.UI.SelectedLocation loc)) -> - (View.SubMenu.Status.TileInfo.get_html - model - (Struct.Location.from_ref loc) - ) - - (Just (Struct.UI.SelectedCharacter target_char)) -> - case (Array.get target_char model.characters) of - (Just char) -> - (Html.Lazy.lazy2 - (View.SubMenu.Status.CharacterInfo.get_html) - model.player_ix - char - ) - - _ -> (Html.text "Error: Unknown character selected.") - - _ -> - (Html.text "Nothing is being focused.") - ) - ] - ) diff --git a/src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm b/src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm deleted file mode 100644 index a927158..0000000 --- a/src/battlemap/src/View/SubMenu/Status/CharacterInfo.elm +++ /dev/null @@ -1,34 +0,0 @@ -module View.SubMenu.Status.CharacterInfo exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Html -import Html.Attributes - --- Struct.Battlemap ------------------------------------------------------------------- -import Struct.Character -import Struct.Event - -import View.Controlled.CharacterCard - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - Int -> - Struct.Character.Type -> - (Html.Html Struct.Event.Type) - ) -get_html player_ix char = - (Html.div - [ - (Html.Attributes.class "battlemap-tabmenu-character-info") - ] - [ - (Html.text ("Focusing:")), - (View.Controlled.CharacterCard.get_full_html player_ix char) - ] - ) diff --git a/src/battlemap/src/View/SubMenu/Status/TileInfo.elm b/src/battlemap/src/View/SubMenu/Status/TileInfo.elm deleted file mode 100644 index a009bc3..0000000 --- a/src/battlemap/src/View/SubMenu/Status/TileInfo.elm +++ /dev/null @@ -1,142 +0,0 @@ -module View.SubMenu.Status.TileInfo exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Dict - -import Html -import Html.Attributes - --- Struct.Battlemap ------------------------------------------------------------------- -import Constants.IO -import Constants.Movement - -import Struct.Battlemap -import Struct.Event -import Struct.Location -import Struct.Model -import Struct.Tile - -import Util.Html --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_icon : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type)) -get_icon tile = - (Html.div - [ - (Html.Attributes.class "battlemap-tile-card-icon"), - (Html.Attributes.class - ( - "battlemap-tile-variant-" - ++ (toString (Struct.Tile.get_variant_id tile)) - ) - ), - (Html.Attributes.style - [ - ( - "background-image", - ( - "url(" - ++ Constants.IO.tile_assets_url - ++ (Struct.Tile.get_icon_id tile) - ++".svg)" - ) - ) - ] - ) - ] - [ - ] - ) - -get_name : ( - Struct.Model.Type -> - Struct.Tile.Instance -> - (Html.Html Struct.Event.Type) - ) -get_name model tile = - case (Dict.get (Struct.Tile.get_type_id tile) model.tiles) of - Nothing -> (Util.Html.nothing) - (Just tile_type) -> - (Html.div - [ - (Html.Attributes.class "battlemap-tile-card-name") - ] - [ - (Html.text (Struct.Tile.get_name tile_type)) - ] - ) - -get_cost : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type)) -get_cost tile = - let - cost = (Struct.Tile.get_instance_cost tile) - text = - if (cost > Constants.Movement.max_points) - then - "Obstructed" - else - ("Cost: " ++ (toString cost)) - in - (Html.div - [ - (Html.Attributes.class "battlemap-tile-card-cost") - ] - [ - (Html.text text) - ] - ) - -get_location : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type)) -get_location tile = - let - tile_location = (Struct.Tile.get_location tile) - in - (Html.div - [ - (Html.Attributes.class "battlemap-tile-card-location") - ] - [ - (Html.text - ( - "{x: " - ++ (toString tile_location.x) - ++ "; y: " - ++ (toString tile_location.y) - ++ "}" - ) - ) - ] - ) - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - Struct.Model.Type -> - Struct.Location.Type -> - (Html.Html Struct.Event.Type) - ) -get_html model loc = - case (Struct.Battlemap.try_getting_tile_at loc model.battlemap) of - (Just tile) -> - (Html.div - [ - (Html.Attributes.class "battlemap-tile-card") - ] - [ - (get_name model tile), - (Html.div - [ - (Html.Attributes.class "battlemap-tile-card-top") - ] - [ - (get_icon tile), - (get_location tile), - (get_cost tile) - ] - ) - ] - ) - - Nothing -> (Html.text "Error: Unknown tile location selected.") diff --git a/src/battlemap/src/View/SubMenu/Timeline.elm b/src/battlemap/src/View/SubMenu/Timeline.elm deleted file mode 100644 index e6a449f..0000000 --- a/src/battlemap/src/View/SubMenu/Timeline.elm +++ /dev/null @@ -1,95 +0,0 @@ -module View.SubMenu.Timeline exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Array - -import Html -import Html.Attributes ---import Html.Events -import Html.Lazy - --- Battlemap ------------------------------------------------------------------- -import Struct.Character -import Struct.Event -import Struct.TurnResult -import Struct.Model - -import View.SubMenu.Timeline.Attack -import View.SubMenu.Timeline.Movement -import View.SubMenu.Timeline.WeaponSwitch -import View.SubMenu.Timeline.PlayerVictory -import View.SubMenu.Timeline.PlayerDefeat -import View.SubMenu.Timeline.PlayerTurnStart - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_turn_result_html : ( - (Array.Array Struct.Character.Type) -> - Int -> - Struct.TurnResult.Type -> - (Html.Html Struct.Event.Type) - ) -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_ix - movement - ) - - (Struct.TurnResult.Attacked attack) -> - (View.SubMenu.Timeline.Attack.get_html - characters - player_ix - attack - ) - - (Struct.TurnResult.SwitchedWeapon weapon_switch) -> - (View.SubMenu.Timeline.WeaponSwitch.get_html - characters - player_ix - weapon_switch - ) - - (Struct.TurnResult.PlayerWon pvict) -> - (View.SubMenu.Timeline.PlayerVictory.get_html pvict) - - (Struct.TurnResult.PlayerLost pdefeat) -> - (View.SubMenu.Timeline.PlayerDefeat.get_html pdefeat) - - (Struct.TurnResult.PlayerTurnStarted pturns) -> - (View.SubMenu.Timeline.PlayerTurnStart.get_html pturns) - -true_get_html : ( - (Array.Array Struct.Character.Type) -> - Int -> - (Array.Array Struct.TurnResult.Type) -> - (Html.Html Struct.Event.Type) - ) -true_get_html characters player_ix turn_results = - (Html.div - [ - (Html.Attributes.class "battlemap-tabmenu-content"), - (Html.Attributes.class "battlemap-tabmenu-timeline-tab") - ] - (Array.toList - (Array.map - (get_turn_result_html characters player_ix) - turn_results - ) - ) - ) - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type) -get_html model = - (Html.Lazy.lazy3 - (true_get_html) - model.characters - 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 deleted file mode 100644 index 875bc89..0000000 --- a/src/battlemap/src/View/SubMenu/Timeline/Attack.elm +++ /dev/null @@ -1,164 +0,0 @@ -module View.SubMenu.Timeline.Attack exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Array - -import Html -import Html.Attributes ---import Html.Events - --- Battlemap ------------------------------------------------------------------- -import Struct.Attack -import Struct.Event -import Struct.TurnResult -import Struct.Character - -import View.Character - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_title_html : ( - Struct.Character.Type -> - Struct.Character.Type -> - (Html.Html Struct.Event.Type) - ) -get_title_html attacker defender = - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-attack-title") - ] - [ - (Html.text - ( - (Struct.Character.get_name attacker) - ++ " attacked " - ++ (Struct.Character.get_name defender) - ++ "!" - ) - ) - ] - ) - -get_effect_text : Struct.Attack.Type -> String -get_effect_text attack = - ( - ( - case attack.precision of - Struct.Attack.Hit -> " hit for " - Struct.Attack.Graze -> " grazed for " - Struct.Attack.Miss -> " missed." - ) - ++ - ( - if (attack.precision == Struct.Attack.Miss) - then - "" - else - ( - ((toString attack.damage) ++ " damage") - ++ - ( - if (attack.critical) - then " (Critical Hit)." - else "." - ) - ) - ) - ) - -get_attack_html : ( - Struct.Character.Type -> - Struct.Character.Type -> - Struct.Attack.Type -> - (Html.Html Struct.Event.Type) - ) -get_attack_html attacker defender attack = - let - attacker_name = (Struct.Character.get_name attacker) - defender_name = (Struct.Character.get_name defender) - in - (Html.div - [] - [ - (Html.text - ( - case (attack.order, attack.parried) of - (Struct.Attack.Counter, True) -> - ( - defender_name - ++ " attempted to strike back, but " - ++ attacker_name - ++ " parried, and " - ++ (get_effect_text attack) - ) - - (Struct.Attack.Counter, _) -> - ( - defender_name - ++ " striked back, and " - ++ (get_effect_text attack) - ) - - (_, True) -> - ( - attacker_name - ++ " attempted a hit, but " - ++ defender_name - ++ " parried, and " - ++ (get_effect_text attack) - ) - - (_, _) -> - (attacker_name ++ " " ++ (get_effect_text attack)) - ) - ) - ] - ) - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - (Array.Array Struct.Character.Type) -> - Int -> - Struct.TurnResult.Attack -> - (Html.Html Struct.Event.Type) - ) -get_html characters player_ix attack = - case - ( - (Array.get attack.attacker_index characters), - (Array.get attack.defender_index characters) - ) - of - ((Just atkchar), (Just defchar)) -> - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-attack") - ] - ( - [ - (View.Character.get_portrait_html player_ix atkchar), - (View.Character.get_portrait_html player_ix defchar), - (get_title_html atkchar defchar) - ] - ++ - (List.map - (get_attack_html atkchar defchar) - attack.sequence - ) - ) - ) - - _ -> - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-attack") - ] - [ - (Html.text "Error: Attack with unknown characters") - ] - ) diff --git a/src/battlemap/src/View/SubMenu/Timeline/Movement.elm b/src/battlemap/src/View/SubMenu/Timeline/Movement.elm deleted file mode 100644 index 2f7acd3..0000000 --- a/src/battlemap/src/View/SubMenu/Timeline/Movement.elm +++ /dev/null @@ -1,62 +0,0 @@ -module View.SubMenu.Timeline.Movement exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Array - -import Html -import Html.Attributes ---import Html.Events - --- Battlemap ------------------------------------------------------------------- -import Struct.Event -import Struct.TurnResult -import Struct.Character - -import View.Character - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - (Array.Array Struct.Character.Type) -> - Int -> - Struct.TurnResult.Movement -> - (Html.Html Struct.Event.Type) - ) -get_html characters player_ix movement = - case (Array.get movement.character_index characters) of - (Just char) -> - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-movement") - ] - [ - (View.Character.get_portrait_html player_ix char), - (Html.text - ( - (Struct.Character.get_name char) - ++ " moved to (" - ++ (toString movement.destination.x) - ++ ", " - ++ (toString movement.destination.y) - ++ ")." - ) - ) - ] - ) - - _ -> - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-movement") - ] - [ - (Html.text "Error: Moving with unknown character") - ] - ) diff --git a/src/battlemap/src/View/SubMenu/Timeline/PlayerDefeat.elm b/src/battlemap/src/View/SubMenu/Timeline/PlayerDefeat.elm deleted file mode 100644 index 7bbff11..0000000 --- a/src/battlemap/src/View/SubMenu/Timeline/PlayerDefeat.elm +++ /dev/null @@ -1,38 +0,0 @@ -module View.SubMenu.Timeline.PlayerDefeat exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Html -import Html.Attributes ---import Html.Events - --- Battlemap ------------------------------------------------------------------- -import Struct.Event -import Struct.TurnResult - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - Struct.TurnResult.PlayerDefeat -> - (Html.Html Struct.Event.Type) - ) -get_html pdefeat = - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-player-defeat") - ] - [ - (Html.text - ( - "Player " - ++ (toString pdefeat.player_index) - ++ " has been eliminated." - ) - ) - ] - ) diff --git a/src/battlemap/src/View/SubMenu/Timeline/PlayerTurnStart.elm b/src/battlemap/src/View/SubMenu/Timeline/PlayerTurnStart.elm deleted file mode 100644 index 11f639e..0000000 --- a/src/battlemap/src/View/SubMenu/Timeline/PlayerTurnStart.elm +++ /dev/null @@ -1,38 +0,0 @@ -module View.SubMenu.Timeline.PlayerTurnStart exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Html -import Html.Attributes ---import Html.Events - --- Battlemap ------------------------------------------------------------------- -import Struct.Event -import Struct.TurnResult - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - Struct.TurnResult.PlayerTurnStart -> - (Html.Html Struct.Event.Type) - ) -get_html pturns = - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-turn-start") - ] - [ - (Html.text - ( - "Player " - ++ (toString pturns.player_index) - ++ "'s turn has started." - ) - ) - ] - ) diff --git a/src/battlemap/src/View/SubMenu/Timeline/PlayerVictory.elm b/src/battlemap/src/View/SubMenu/Timeline/PlayerVictory.elm deleted file mode 100644 index 77494b6..0000000 --- a/src/battlemap/src/View/SubMenu/Timeline/PlayerVictory.elm +++ /dev/null @@ -1,38 +0,0 @@ -module View.SubMenu.Timeline.PlayerVictory exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Html -import Html.Attributes ---import Html.Events - --- Battlemap ------------------------------------------------------------------- -import Struct.Event -import Struct.TurnResult - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - Struct.TurnResult.PlayerVictory -> - (Html.Html Struct.Event.Type) - ) -get_html pvict = - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-player-victory") - ] - [ - (Html.text - ( - "Player " - ++ (toString pvict.player_index) - ++ " has won the battle." - ) - ) - ] - ) diff --git a/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm b/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm deleted file mode 100644 index e66cfed..0000000 --- a/src/battlemap/src/View/SubMenu/Timeline/WeaponSwitch.elm +++ /dev/null @@ -1,58 +0,0 @@ -module View.SubMenu.Timeline.WeaponSwitch exposing (get_html) - --- Elm ------------------------------------------------------------------------- -import Array - -import Html -import Html.Attributes ---import Html.Events - --- Battlemap ------------------------------------------------------------------- -import Struct.Event -import Struct.TurnResult -import Struct.Character - -import View.Character - --------------------------------------------------------------------------------- --- LOCAL ----------------------------------------------------------------------- --------------------------------------------------------------------------------- - --------------------------------------------------------------------------------- --- EXPORTED -------------------------------------------------------------------- --------------------------------------------------------------------------------- -get_html : ( - (Array.Array Struct.Character.Type) -> - Int -> - Struct.TurnResult.WeaponSwitch -> - (Html.Html Struct.Event.Type) - ) -get_html characters player_ix weapon_switch = - case (Array.get weapon_switch.character_index characters) of - (Just char) -> - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-weapon-switch") - ] - [ - (View.Character.get_portrait_html player_ix char), - (Html.text - ( - (Struct.Character.get_name char) - ++ " switched weapons." - ) - ) - ] - ) - - _ -> - (Html.div - [ - (Html.Attributes.class "battlemap-timeline-element"), - (Html.Attributes.class "battlemap-timeline-weapon-switch") - ] - [ - (Html.text "Error: Unknown character switched weapons") - ] - ) |