From 2d54254e59289c452777fccb1f4d00b56eb7e451 Mon Sep 17 00:00:00 2001 From: Nathanael Sensfelder Date: Wed, 27 Sep 2017 11:31:17 +0200 Subject: Improves error msgs & UI controls. --- elm/battlemap/src/View/Status.elm | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'elm/battlemap/src/View') diff --git a/elm/battlemap/src/View/Status.elm b/elm/battlemap/src/View/Status.elm index a7beb28..5fcc663 100644 --- a/elm/battlemap/src/View/Status.elm +++ b/elm/battlemap/src/View/Status.elm @@ -29,14 +29,17 @@ moving_character_text model = view : Model.Type -> (Html.Html Event.Type) view model = (Html.text - (case model.state of - Model.Default -> "Click on a character to control it." - Model.MovingCharacterWithButtons -> (moving_character_text model) - Model.MovingCharacterWithClick -> (moving_character_text model) - Model.FocusingTile -> "Error: Unimplemented." - (Model.Error Error.Programming) -> - "Error of programming, please report." - (Model.Error Error.IllegalAction) -> - "This cannot be done while in this state." + ( + (case model.state of + Model.Default -> "Click on a character to control it." + Model.MovingCharacterWithButtons -> (moving_character_text model) + Model.MovingCharacterWithClick -> (moving_character_text model) + Model.FocusingTile -> "Error: Unimplemented." + ) + ++ " " ++ + (case model.error of + Nothing -> "" + (Just error) -> (Error.to_string error) + ) ) ) -- cgit v1.2.3-70-g09d2