summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/map-editor/src/View')
-rw-r--r--src/map-editor/src/View/Map/Tile.elm27
-rw-r--r--src/map-editor/src/View/SubMenu/Status/TileInfo.elm20
-rw-r--r--src/map-editor/src/View/Toolbox.elm8
3 files changed, 35 insertions, 20 deletions
diff --git a/src/map-editor/src/View/Map/Tile.elm b/src/map-editor/src/View/Map/Tile.elm
index bf112d1..996dd3a 100644
--- a/src/map-editor/src/View/Map/Tile.elm
+++ b/src/map-editor/src/View/Map/Tile.elm
@@ -12,6 +12,7 @@ import Constants.IO
import Struct.Event
import Struct.Location
import Struct.Tile
+import Struct.TileInstance
import Struct.Toolbox
--------------------------------------------------------------------------------
@@ -19,7 +20,7 @@ import Struct.Toolbox
--------------------------------------------------------------------------------
get_layer_html : (
Int ->
- Struct.Tile.Border ->
+ Struct.TileInstancec.Border ->
(Html.Html Struct.Event.Type)
)
get_layer_html index border =
@@ -33,9 +34,9 @@ get_layer_html index border =
(
"url("
++ Constants.IO.tile_assets_url
- ++ (Struct.Tile.get_border_type_id border)
+ ++ (Struct.TileInstance.get_border_class_id border)
++ "-f-"
- ++ (Struct.Tile.get_border_variant_id border)
+ ++ (Struct.TileInstance.get_border_variant_id border)
++ ".svg)"
)
)
@@ -46,7 +47,10 @@ get_layer_html index border =
--------------------------------------------------------------------------------
-- EXPORTED --------------------------------------------------------------------
--------------------------------------------------------------------------------
-get_content_html : Struct.Tile.Instance -> (List (Html.Html Struct.Event.Type))
+get_content_html : (
+ Struct.TileInstance.Type ->
+ (List (Html.Html Struct.Event.Type))
+ )
get_content_html tile =
(
(Html.div
@@ -57,7 +61,7 @@ get_content_html tile =
(
"url("
++ Constants.IO.tile_assets_url
- ++ (Struct.Tile.get_type_id tile)
+ ++ (Struct.TileInstance.get_class_id tile)
++ "-bg.svg)"
)
)
@@ -74,9 +78,9 @@ get_content_html tile =
(
"url("
++ Constants.IO.tile_assets_url
- ++ (Struct.Tile.get_type_id tile)
+ ++ (Struct.TileInstance.get_class_id tile)
++ "-v-"
- ++ (Struct.Tile.get_variant_id tile)
+ ++ (Struct.TileInstance.get_variant_id tile)
++ ".svg)"
)
)
@@ -93,12 +97,12 @@ get_content_html tile =
get_html : (
Struct.Toolbox.Type ->
- Struct.Tile.Instance ->
+ Struct.TileInstance.Type ->
(Html.Html Struct.Event.Type)
)
get_html tb tile =
let
- tile_loc = (Struct.Tile.get_location tile)
+ tile_loc = (Struct.TileInstance.get_location tile)
in
(Html.div
[
@@ -117,7 +121,10 @@ get_html tb tile =
(Html.Attributes.class
(
"map-tile-variant-"
- ++ (String.fromInt (Struct.Tile.get_local_variant_ix tile))
+ ++
+ (String.fromInt
+ (Struct.TileInstance.get_local_variant_ix tile)
+ )
)
),
(Html.Attributes.class "clickable"),
diff --git a/src/map-editor/src/View/SubMenu/Status/TileInfo.elm b/src/map-editor/src/View/SubMenu/Status/TileInfo.elm
index 450e52d..166dc42 100644
--- a/src/map-editor/src/View/SubMenu/Status/TileInfo.elm
+++ b/src/map-editor/src/View/SubMenu/Status/TileInfo.elm
@@ -14,6 +14,7 @@ import Struct.Event
import Struct.Location
import Struct.Model
import Struct.Tile
+import Struct.TileInstance
import Util.Html
@@ -22,7 +23,7 @@ import View.Map.Tile
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
-get_icon : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
+get_icon : (Struct.TileInstance.Type -> (Html.Html Struct.Event.Type))
get_icon tile =
(Html.div
[
@@ -30,7 +31,10 @@ get_icon tile =
(Html.Attributes.class
(
"map-tile-variant-"
- ++ (String.fromInt (Struct.Tile.get_local_variant_ix tile))
+ ++
+ (String.fromInt
+ (Struct.TileInstance.get_local_variant_ix tile)
+ )
)
)
]
@@ -39,11 +43,11 @@ get_icon tile =
get_name : (
Struct.Model.Type ->
- Struct.Tile.Instance ->
+ Struct.TileInstance.Type ->
(Html.Html Struct.Event.Type)
)
get_name model tile =
- case (Dict.get (Struct.Tile.get_type_id tile) model.tiles) of
+ case (Dict.get (Struct.TileInstance.get_class_id tile) model.tiles) of
Nothing -> (Util.Html.nothing)
(Just tile_type) ->
(Html.div
@@ -55,10 +59,10 @@ get_name model tile =
]
)
-get_cost : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
+get_cost : (Struct.TileInstance.Type -> (Html.Html Struct.Event.Type))
get_cost tile =
let
- cost = (Struct.Tile.get_instance_cost tile)
+ cost = (Struct.TileInstance.get_cost tile)
text =
if (cost > Constants.Movement.max_points)
then
@@ -75,10 +79,10 @@ get_cost tile =
]
)
-get_location : (Struct.Tile.Instance -> (Html.Html Struct.Event.Type))
+get_location : (Struct.TileInstance.Type -> (Html.Html Struct.Event.Type))
get_location tile =
let
- tile_location = (Struct.Tile.get_location tile)
+ tile_location = (Struct.TileInstance.get_location tile)
in
(Html.div
[
diff --git a/src/map-editor/src/View/Toolbox.elm b/src/map-editor/src/View/Toolbox.elm
index ff64b56..28e7ba6 100644
--- a/src/map-editor/src/View/Toolbox.elm
+++ b/src/map-editor/src/View/Toolbox.elm
@@ -5,9 +5,10 @@ import Html
import Html.Attributes
import Html.Events
--- Struct.Battlemap -------------------------------------------------------------------
+-- Map Editor ------------------------------------------------------------------
import Struct.Event
import Struct.Tile
+import Struct.TileInstance
import Struct.Toolbox
import View.Map.Tile
@@ -15,7 +16,10 @@ import View.Map.Tile
--------------------------------------------------------------------------------
-- LOCAL -----------------------------------------------------------------------
--------------------------------------------------------------------------------
-get_template_icon_html : Struct.Tile.Instance -> (Html.Html Struct.Event.Type)
+get_template_icon_html : (
+ Struct.TileInstance.Type ->
+ (Html.Html Struct.Event.Type)
+ )
get_template_icon_html template =
(Html.div
[