summaryrefslogtreecommitdiff |
diff options
Diffstat (limited to 'src/map-editor/src/View')
-rw-r--r-- | src/map-editor/src/View/Map/Tile.elm | 2 | ||||
-rw-r--r-- | src/map-editor/src/View/SubMenu/Status/TileInfo.elm | 2 | ||||
-rw-r--r-- | src/map-editor/src/View/SubMenu/Tiles.elm (renamed from src/map-editor/src/View/SubMenu/Tiles.elm.m4) | 23 |
3 files changed, 18 insertions, 9 deletions
diff --git a/src/map-editor/src/View/Map/Tile.elm b/src/map-editor/src/View/Map/Tile.elm index 3431663..077889e 100644 --- a/src/map-editor/src/View/Map/Tile.elm +++ b/src/map-editor/src/View/Map/Tile.elm @@ -47,7 +47,7 @@ get_html tb tile = (Html.Attributes.class ( "map-tile-variant-" - ++ (toString (Struct.Tile.get_variant_id tile)) + ++ (toString (Struct.Tile.get_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 0ac727e..eeb51a8 100644 --- a/src/map-editor/src/View/SubMenu/Status/TileInfo.elm +++ b/src/map-editor/src/View/SubMenu/Status/TileInfo.elm @@ -28,7 +28,7 @@ get_icon tile = (Html.Attributes.class ( "map-tile-variant-" - ++ (toString (Struct.Tile.get_variant_id tile)) + ++ (toString (Struct.Tile.get_variant_ix tile)) ) ), (Html.Attributes.style diff --git a/src/map-editor/src/View/SubMenu/Tiles.elm.m4 b/src/map-editor/src/View/SubMenu/Tiles.elm index bbfafd7..64cd633 100644 --- a/src/map-editor/src/View/SubMenu/Tiles.elm.m4 +++ b/src/map-editor/src/View/SubMenu/Tiles.elm @@ -13,6 +13,7 @@ import Struct.Event -------------------------------------------------------------------------------- -- LOCAL ----------------------------------------------------------------------- -------------------------------------------------------------------------------- +-- TODO: display and allow selection of all variations. get_icon_html : Int -> (Html.Html Struct.Event.Type) get_icon_html icon_id = (Html.div @@ -26,21 +27,29 @@ get_icon_html icon_id = ( "background-image", ( - "url(" - ++ Constants.IO.tile_assets_url - ++ (toString icon_id) - ++".svg)" + let + icon_id_str = (toString icon_id) + in + ( + "url(" + ++ Constants.IO.tile_assets_url + ++ icon_id_str + ++ "-" + ++ icon_id_str + ++"-0.svg)" + ) ) ) ] ), - (Html.Events.onClick (Struct.Event.TemplateRequested icon_id)) + (Html.Events.onClick + (Struct.Event.TemplateRequested (icon_id, icon_id, 0)) + ) ] [ ] ) -m4_include(__MAKEFILE_DATA_DIR/tile/global.m4.conf)m4_dnl -------------------------------------------------------------------------------- -- EXPORTED -------------------------------------------------------------------- -------------------------------------------------------------------------------- @@ -53,6 +62,6 @@ get_html = ] (List.map (get_icon_html) - (List.range 0 __TILE_CLASS_MAX_ID) + (List.range 0 3) ) ) |