summaryrefslogtreecommitdiff |
diff options
-rw-r--r-- | src/battlemap/src/ElmModule/Update.elm | 4 | ||||
-rw-r--r-- | src/battlemap/src/Struct/Event.elm | 1 | ||||
-rw-r--r-- | src/battlemap/src/View/Footer.elm | 18 | ||||
-rw-r--r-- | src/battlemap/www/style.css | 3 |
4 files changed, 20 insertions, 6 deletions
diff --git a/src/battlemap/src/ElmModule/Update.elm b/src/battlemap/src/ElmModule/Update.elm index 22217bf..36270a4 100644 --- a/src/battlemap/src/ElmModule/Update.elm +++ b/src/battlemap/src/ElmModule/Update.elm @@ -6,6 +6,7 @@ module ElmModule.Update exposing (update) import Struct.Event import Struct.Model +import Update.AttackWithoutMoving import Update.ChangeScale import Update.DisplayCharacterInfo import Update.EndTurn @@ -28,6 +29,9 @@ update event model = new_model = (Struct.Model.clear_error model) in case event of + Struct.Event.AttackWithoutMovingRequest -> + (Update.AttackWithoutMoving.apply_to new_model) + (Struct.Event.DirectionRequested d) -> (Update.RequestDirection.apply_to new_model d) diff --git a/src/battlemap/src/Struct/Event.elm b/src/battlemap/src/Struct/Event.elm index ecda85b..c2696eb 100644 --- a/src/battlemap/src/Struct/Event.elm +++ b/src/battlemap/src/Struct/Event.elm @@ -25,3 +25,4 @@ type Type = | DebugTeamSwitchRequest | DebugLoadBattlemapRequest | WeaponSwitchRequest + | AttackWithoutMovingRequest diff --git a/src/battlemap/src/View/Footer.elm b/src/battlemap/src/View/Footer.elm index b868dd7..6a95aa9 100644 --- a/src/battlemap/src/View/Footer.elm +++ b/src/battlemap/src/View/Footer.elm @@ -18,6 +18,13 @@ import Util.Html -------------------------------------------------------------------------------- -- LOCAL ----------------------------------------------------------------------- -------------------------------------------------------------------------------- +attack_button : (Html.Html Struct.Event.Type) +attack_button = + (Html.button + [ (Html.Events.onClick Struct.Event.AttackWithoutMovingRequest) ] + [ (Html.text "Attack Without Moving") ] + ) + end_turn_button : (Html.Html Struct.Event.Type) end_turn_button = (Html.button @@ -74,9 +81,11 @@ get_curr_char_info_htmls model char = ++ char.name ++ ". Move (" ++ (get_navigator_info model char) - ++ ") or " + ++ "), " ) ), + (attack_button), + (Html.text ", or "), (inventory_button) ] @@ -86,7 +95,7 @@ get_curr_char_info_htmls model char = ( "Controlling " ++ char.name - ++ ". Moved. Select targets or " + ++ ". Moved. Select a target, or " ) ), (end_turn_button) @@ -98,10 +107,11 @@ get_curr_char_info_htmls model char = ( "Controlling " ++ char.name - ++ ". Moved. Chose target(s). Select additional targets or " + ++ ". Moved. Chose a target. Click on " ) ), - (end_turn_button) + (end_turn_button), + (Html.text "to end turn.") ] _ -> diff --git a/src/battlemap/www/style.css b/src/battlemap/www/style.css index 2f4624a..4fcf666 100644 --- a/src/battlemap/www/style.css +++ b/src/battlemap/www/style.css @@ -36,10 +36,10 @@ overflow-y: auto; width: inherit; word-wrap: break-word; - padding-bottom: 1em; border-top: 1px solid #502D16; box-shadow: 0px -1px 2px #502D16; padding: 0.5em; + padding-bottom: 1em; } /*** Main View ****************************************************************/ @@ -147,7 +147,6 @@ .battlemap-characters-element { flex: 2; - padding: 1em; margin: 0.5em 0.5em 0 0.5em; text-align: center; background-color: #917C6f; |