blob: 22aa99ad74224991abbc354ec663361d939a4bb3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
module View.SubMenu.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") ]
),
(Html.button
[
(Html.Events.onClick Struct.Event.DebugTestAnimation)
]
[ (Html.text "[DEBUG] Test animations") ]
)
]
)
|