summaryrefslogtreecommitdiff |
diff options
author | nsensfel <SpamShield0@noot-noot.org> | 2018-08-24 17:36:33 +0200 |
---|---|---|
committer | nsensfel <SpamShield0@noot-noot.org> | 2018-08-24 17:36:33 +0200 |
commit | b3fd9613c298e1af44f025d9d95021eec8c72a59 (patch) | |
tree | 4e00b8d3c2f3a56747a3520a3ec260c5e3302861 /src/character/src/View/MainMenu.elm | |
parent | 3713d6089adccd96385b0d079bb72587d2122848 (diff) |
Starting to work on the character editor.
Diffstat (limited to 'src/character/src/View/MainMenu.elm')
-rw-r--r-- | src/character/src/View/MainMenu.elm | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/character/src/View/MainMenu.elm b/src/character/src/View/MainMenu.elm new file mode 100644 index 0000000..9f3099b --- /dev/null +++ b/src/character/src/View/MainMenu.elm @@ -0,0 +1,38 @@ +module View.MainMenu exposing (get_html) + +-- Elm ------------------------------------------------------------------------- +import Html +import Html.Attributes +import Html.Events + +-- Map ------------------------------------------------------------------- +import Struct.Event +import Struct.UI + +-------------------------------------------------------------------------------- +-- LOCAL ----------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_menu_button_html : ( + Struct.UI.Tab -> + (Html.Html Struct.Event.Type) + ) +get_menu_button_html tab = + (Html.button + [ (Html.Events.onClick (Struct.Event.TabSelected tab)) ] + [ (Html.text (Struct.UI.to_string tab)) ] + ) + +-------------------------------------------------------------------------------- +-- EXPORTED -------------------------------------------------------------------- +-------------------------------------------------------------------------------- +get_html : (Html.Html Struct.Event.Type) +get_html = + (Html.div + [ + (Html.Attributes.class "battle-main-menu") + ] + (List.map + (get_menu_button_html) + (Struct.UI.get_all_tabs) + ) + ) |