diff --git a/tile_editor/tile_map_editor.cpp b/tile_editor/tile_map_editor.cpp index 7d74d26..8c45a90 100644 --- a/tile_editor/tile_map_editor.cpp +++ b/tile_editor/tile_map_editor.cpp @@ -40,7 +40,7 @@ #include "scene/gui/center_container.h" #include "scene/gui/split_container.h" -#include "core/input/input.h" +#include "core/os/input.h" #include "../geometry_2d.h" #include "core/os/keyboard.h" diff --git a/tile_editor/tile_map_editor.h b/tile_editor/tile_map_editor.h index 57e679b..1871237 100644 --- a/tile_editor/tile_map_editor.h +++ b/tile_editor/tile_map_editor.h @@ -127,7 +127,7 @@ private: void _set_tile_map_selection(const TypedArray &p_selection); TypedArray _get_tile_map_selection() const; - Set tile_set_selection; + Set tile_set_selection; void _update_selection_pattern_from_tilemap_selection(); void _update_selection_pattern_from_tileset_tiles_selection(); @@ -152,7 +152,7 @@ private: void _update_source_display(); // Atlas sources. - TileMapCell hovered_tile; + RTileMapCell hovered_tile; RTileAtlasView *tile_atlas_view; HSplitContainer *atlas_sources_split_container; @@ -253,14 +253,14 @@ private: bool drag_erasing = false; Vector2 drag_start_mouse_pos; Vector2 drag_last_mouse_pos; - Map drag_modified; + Map drag_modified; // Painting - Map _draw_terrains(const Map &p_to_paint, int p_terrain_set) const; - Map _draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); - Map _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + Map _draw_terrains(const Map &p_to_paint, int p_terrain_set) const; + Map _draw_line(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); + Map _draw_rect(Vector2i p_start_cell, Vector2i p_end_cell, bool p_erase); Set _get_cells_for_bucket_fill(Vector2i p_coords, bool p_contiguous); - Map _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); + Map _draw_bucket_fill(Vector2i p_coords, bool p_contiguous, bool p_erase); void _stop_dragging(); int selected_terrain_set = -1; @@ -350,13 +350,13 @@ public: bool forward_canvas_gui_input(const Ref &p_event); void forward_canvas_draw_over_viewport(Control *p_overlay); - void edit(TileMap *p_tile_map); + void edit(RTileMap *p_tile_map); RTileMapEditor(); ~RTileMapEditor(); // Static functions. - static Vector get_line(TileMap *p_tile_map, Vector2i p_from_cell, Vector2i p_to_cell); + static Vector get_line(RTileMap *p_tile_map, Vector2i p_from_cell, Vector2i p_to_cell); }; #endif // TILE_MAP_EDITOR_PLUGIN_H diff --git a/tile_editor/tile_proxies_manager_dialog.cpp b/tile_editor/tile_proxies_manager_dialog.cpp index c1b73cf..c2ff8eb 100644 --- a/tile_editor/tile_proxies_manager_dialog.cpp +++ b/tile_editor/tile_proxies_manager_dialog.cpp @@ -388,7 +388,7 @@ RTileProxiesManagerDialog::RTileProxiesManagerDialog() { source_from_property_editor->setup(-1, 99999, 1, true, false); vboxcontainer_from->add_child(source_from_property_editor); - coords_from_property_editor = memnew(EditorPropertyVector2i); + coords_from_property_editor = memnew(EditorPropertyVector2); coords_from_property_editor->set_label(TTR("From Coords")); coords_from_property_editor->set_object_and_property(this, "from_coords"); coords_from_property_editor->connect("property_changed", callable_mp(this, &RTileProxiesManagerDialog::_property_changed)); @@ -422,7 +422,7 @@ RTileProxiesManagerDialog::RTileProxiesManagerDialog() { source_to_property_editor->setup(-1, 99999, 1, true, false); vboxcontainer_to->add_child(source_to_property_editor); - coords_to_property_editor = memnew(EditorPropertyVector2i); + coords_to_property_editor = memnew(EditorPropertyVector2); coords_to_property_editor->set_label(TTR("To Coords")); coords_to_property_editor->set_object_and_property(this, "to_coords"); coords_to_property_editor->connect("property_changed", callable_mp(this, &RTileProxiesManagerDialog::_property_changed)); diff --git a/tile_editor/tile_proxies_manager_dialog.h b/tile_editor/tile_proxies_manager_dialog.h index 06b07b9..239ca24 100644 --- a/tile_editor/tile_proxies_manager_dialog.h +++ b/tile_editor/tile_proxies_manager_dialog.h @@ -56,10 +56,10 @@ private: ItemList *alternative_level_list; EditorPropertyInteger *source_from_property_editor; - EditorPropertyVector2i *coords_from_property_editor; + EditorPropertyVector2 *coords_from_property_editor; EditorPropertyInteger *alternative_from_property_editor; EditorPropertyInteger *source_to_property_editor; - EditorPropertyVector2i *coords_to_property_editor; + EditorPropertyVector2 *coords_to_property_editor; EditorPropertyInteger *alternative_to_property_editor; PopupMenu *popup_menu; diff --git a/tile_editor/tile_set_atlas_source_editor.cpp b/tile_editor/tile_set_atlas_source_editor.cpp index d587abe..7a8f363 100644 --- a/tile_editor/tile_set_atlas_source_editor.cpp +++ b/tile_editor/tile_set_atlas_source_editor.cpp @@ -96,9 +96,9 @@ bool RTileSetAtlasSourceEditor::RTileSetAtlasSourceProxyObject::_get(const Strin void RTileSetAtlasSourceEditor::RTileSetAtlasSourceProxyObject::_get_property_list(List *p_list) const { p_list->push_back(PropertyInfo(Variant::STRING, "name", PROPERTY_HINT_NONE, "")); p_list->push_back(PropertyInfo(Variant::OBJECT, "texture", PROPERTY_HINT_RESOURCE_TYPE, "Texture")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "margins", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "separation", PROPERTY_HINT_NONE, "")); - p_list->push_back(PropertyInfo(Variant::VECTOR2I, "texture_region_size", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::VECTOR2, "margins", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::VECTOR2, "separation", PROPERTY_HINT_NONE, "")); + p_list->push_back(PropertyInfo(Variant::VECTOR2, "texture_region_size", PROPERTY_HINT_NONE, "")); p_list->push_back(PropertyInfo(Variant::BOOL, "use_texture_padding", PROPERTY_HINT_NONE, "")); } diff --git a/tile_editor/tile_set_editor.h b/tile_editor/tile_set_editor.h index 6949c38..1a3ef8a 100644 --- a/tile_editor/tile_set_editor.h +++ b/tile_editor/tile_set_editor.h @@ -82,7 +82,7 @@ private: ItemList *patterns_item_list; Label *patterns_help_label; void _patterns_item_list_gui_input(const Ref &p_event); - void _pattern_preview_done(Ref p_pattern, Ref p_texture); + void _pattern_preview_done(Ref p_pattern, Ref p_texture); bool select_last_pattern = false; void _update_patterns_list(); diff --git a/tile_editor/tile_set_scenes_collection_source_editor.h b/tile_editor/tile_set_scenes_collection_source_editor.h index ce104ef..9a51305 100644 --- a/tile_editor/tile_set_scenes_collection_source_editor.h +++ b/tile_editor/tile_set_scenes_collection_source_editor.h @@ -45,7 +45,7 @@ private: private: Ref tile_set; - TileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr; + RTileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr; int source_id = -1; protected: @@ -68,7 +68,7 @@ private: private: RTileSetScenesCollectionSourceEditor *tile_set_scenes_collection_source_editor; - TileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr; + RTileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr; int source_id; int scene_id; @@ -81,7 +81,7 @@ private: public: // Update the proxyed object. - void edit(TileSetScenesCollectionSource *p_tile_set_atlas_source, int p_scene_id); + void edit(RTileSetScenesCollectionSource *p_tile_set_atlas_source, int p_scene_id); SceneTileProxyObject(RTileSetScenesCollectionSourceEditor *p_tiles_set_scenes_collection_source_editor) { tile_set_scenes_collection_source_editor = p_tiles_set_scenes_collection_source_editor; @@ -90,7 +90,7 @@ private: private: Ref tile_set; - TileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr; + RTileSetScenesCollectionSource *tile_set_scenes_collection_source = nullptr; int tile_set_source_id = -1; UndoRedo *undo_redo = EditorNode::get_undo_redo(); @@ -133,7 +133,7 @@ protected: static void _bind_methods(); public: - void edit(Ref p_tile_set, TileSetScenesCollectionSource *p_tile_set_scenes_collection_source, int p_source_id); + void edit(Ref p_tile_set, RTileSetScenesCollectionSource *p_tile_set_scenes_collection_source, int p_source_id); RTileSetScenesCollectionSourceEditor(); ~RTileSetScenesCollectionSourceEditor(); }; diff --git a/tile_editor/tiles_editor_plugin.cpp b/tile_editor/tiles_editor_plugin.cpp index 330d5a3..0f72b3d 100644 --- a/tile_editor/tiles_editor_plugin.cpp +++ b/tile_editor/tiles_editor_plugin.cpp @@ -148,7 +148,7 @@ void RTilesEditorPlugin::_tile_map_changed() { void RTilesEditorPlugin::_update_editors() { // If tile_map is not edited, we change the edited only if we are not editing a tile_set. tileset_editor->edit(tile_set); - TileMap *tile_map = Object::cast_to(ObjectDB::get_instance(tile_map_id)); + RTileMap *tile_map = Object::cast_to(ObjectDB::get_instance(tile_map_id)); if (tile_map) { tilemap_editor->edit(tile_map); } else { diff --git a/tile_editor/tiles_editor_plugin.h b/tile_editor/tiles_editor_plugin.h index d8444e9..726115b 100644 --- a/tile_editor/tiles_editor_plugin.h +++ b/tile_editor/tiles_editor_plugin.h @@ -54,7 +54,7 @@ private: RTileMapEditor *tilemap_editor; Button *tileset_editor_button; - RRTileSetEditor *tileset_editor; + RTileSetEditor *tileset_editor; void _update_editors();