aboutsummaryrefslogtreecommitdiff
blob: 206a4a65db077c18e6a72475cb00c326ea58007f (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
module View.SideBar exposing (get_html)

-- Elm -------------------------------------------------------------------------
import Html
import Html.Attributes

-- Battlemap -------------------------------------------------------------------
import Struct.CharacterTurn
import Struct.Event
import Struct.Model
import Struct.UI

import Util.Html


import View.SideBar.TabMenu
import View.SideBar.Targets
import View.SideBar.ManualControls

--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
get_html : Struct.Model.Type -> (Html.Html Struct.Event.Type)
get_html model =
   (Html.div
      [
         (Html.Attributes.class "battlemap-side-bar")
      ]
      [
         (View.SideBar.TabMenu.get_html model),
         (
            case (Struct.CharacterTurn.get_target model.char_turn) of
               (Just target_ref) ->
                  (View.SideBar.Targets.get_html model target_ref)

               _ ->
               (Util.Html.nothing)
         ),
         (
            if (Struct.UI.has_manual_controls_enabled model.ui)
            then
               (View.SideBar.ManualControls.get_html)
            else
               (Util.Html.nothing)
         )
      ]
   )