aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/battlemap/src/View/SubMenu/TabMenu/Settings.elm')
-rw-r--r--src/battlemap/src/View/SubMenu/TabMenu/Settings.elm53
1 files changed, 53 insertions, 0 deletions
diff --git a/src/battlemap/src/View/SubMenu/TabMenu/Settings.elm b/src/battlemap/src/View/SubMenu/TabMenu/Settings.elm
new file mode 100644
index 0000000..3f42739
--- /dev/null
+++ b/src/battlemap/src/View/SubMenu/TabMenu/Settings.elm
@@ -0,0 +1,53 @@
+module View.SideBar.TabMenu.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") ]
+ )
+ ]
+ )