Skip to content

Commit

Permalink
Renamed RTilesetEditorContext to TilesetEditorContext.
Browse files Browse the repository at this point in the history
  • Loading branch information
Relintai committed Dec 22, 2023
1 parent 0d6f38b commit f9cbc81
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
20 changes: 10 additions & 10 deletions modules/tile_map/tile_set_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
texture_dialog->connect("files_selected", this, "_on_textures_added");

//---------------
helper = memnew(RTilesetEditorContext(this));
helper = memnew(TilesetEditorContext(this));
tile_names_visible = false;

// Config scale.
Expand Down Expand Up @@ -3463,16 +3463,16 @@ Ref<Texture> TileSetEditor::get_current_texture() {
}
}

void RTilesetEditorContext::set_tileset(const Ref<TileSet> &p_tileset) {
void TilesetEditorContext::set_tileset(const Ref<TileSet> &p_tileset) {
tileset = p_tileset;
}

void RTilesetEditorContext::set_snap_options_visible(bool p_visible) {
void TilesetEditorContext::set_snap_options_visible(bool p_visible) {
snap_options_visible = p_visible;
_change_notify("");
}

bool RTilesetEditorContext::_set(const StringName &p_name, const Variant &p_value) {
bool TilesetEditorContext::_set(const StringName &p_name, const Variant &p_value) {
String name = p_name.operator String();

if (name == "options_offset") {
Expand Down Expand Up @@ -3540,7 +3540,7 @@ bool RTilesetEditorContext::_set(const StringName &p_name, const Variant &p_valu
return false;
}

bool RTilesetEditorContext::_get(const StringName &p_name, Variant &r_ret) const {
bool TilesetEditorContext::_get(const StringName &p_name, Variant &r_ret) const {
String name = p_name.operator String();
bool v = false;

Expand Down Expand Up @@ -3609,7 +3609,7 @@ bool RTilesetEditorContext::_get(const StringName &p_name, Variant &r_ret) const
return v;
}

void RTilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const {
void TilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const {
if (snap_options_visible) {
p_list->push_back(PropertyInfo(Variant::NIL, "Snap Options", PROPERTY_HINT_NONE, "options_", PROPERTY_USAGE_GROUP));
p_list->push_back(PropertyInfo(Variant::VECTOR2, "options_offset"));
Expand Down Expand Up @@ -3659,11 +3659,11 @@ void RTilesetEditorContext::_get_property_list(List<PropertyInfo> *p_list) const
}
}

void RTilesetEditorContext::_bind_methods() {
ClassDB::bind_method("_hide_script_from_inspector", &RTilesetEditorContext::_hide_script_from_inspector);
void TilesetEditorContext::_bind_methods() {
ClassDB::bind_method("_hide_script_from_inspector", &TilesetEditorContext::_hide_script_from_inspector);
}

RTilesetEditorContext::RTilesetEditorContext(TileSetEditor *p_tileset_editor) {
TilesetEditorContext::TilesetEditorContext(TileSetEditor *p_tileset_editor) {
tileset_editor = p_tileset_editor;
snap_options_visible = false;
}
Expand All @@ -3675,7 +3675,7 @@ void TileSetEditorPlugin::edit(Object *p_node) {
}

bool TileSetEditorPlugin::handles(Object *p_node) const {
return p_node->is_class("TileSet") || p_node->is_class("RTilesetEditorContext");
return p_node->is_class("TileSet") || p_node->is_class("TilesetEditorContext");
}

void TileSetEditorPlugin::make_visible(bool p_visible) {
Expand Down
12 changes: 6 additions & 6 deletions modules/tile_map/tile_set_editor_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

#define WORKSPACE_MARGIN Vector2(10, 10)

class RTilesetEditorContext;
class TilesetEditorContext;
class ScrollContainer;
class SpinBox;
class Label;
Expand All @@ -56,7 +56,7 @@ class CheckBox;

class TileSetEditor : public HSplitContainer {
friend class TileSetEditorPlugin;
friend class RTilesetEditorContext;
friend class TilesetEditorContext;

GDCLASS(TileSetEditor, HSplitContainer);

Expand Down Expand Up @@ -115,7 +115,7 @@ class TileSetEditor : public HSplitContainer {
};

Ref<TileSet> tileset;
RTilesetEditorContext *helper;
TilesetEditorContext *helper;
EditorNode *editor;
UndoRedo *undo_redo;

Expand Down Expand Up @@ -264,9 +264,9 @@ class TileSetEditor : public HSplitContainer {
void set_current_tile(int p_id);
};

class RTilesetEditorContext : public Object {
class TilesetEditorContext : public Object {
friend class TileSetEditor;
GDCLASS(RTilesetEditorContext, Object);
GDCLASS(TilesetEditorContext, Object);

Ref<TileSet> tileset;
TileSetEditor *tileset_editor;
Expand All @@ -286,7 +286,7 @@ class RTilesetEditorContext : public Object {
static void _bind_methods();

public:
RTilesetEditorContext(TileSetEditor *p_tileset_editor);
TilesetEditorContext(TileSetEditor *p_tileset_editor);
};

class TileSetEditorPlugin : public EditorPlugin {
Expand Down

0 comments on commit f9cbc81

Please sign in to comment.