summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/character/src/View/SubMenu/Status.elm')
-rw-r--r-- | src/character/src/View/SubMenu/Status.elm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/character/src/View/SubMenu/Status.elm b/src/character/src/View/SubMenu/Status.elm new file mode 100644 index 0000000..485704e --- /dev/null +++ b/src/character/src/View/SubMenu/Status.elm @@ -0,0 +1,55 @@ +module View.SubMenu.Status exposing (get_html) + +-- Elm ------------------------------------------------------------------------- +import Array + +import Html +import Html.Attributes +import Html.Lazy + +-- Struct.Map ------------------------------------------------------------------- +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 "battle-footer-tabmenu-content"), + (Html.Attributes.class "battle-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.") + ) + ] + ) |