Renamed RTilesetEditorContext to TilesetEditorContext.

This commit is contained in:
Relintai 2023-12-22 20:10:02 +01:00
parent 0d6f38b317
commit f9cbc81492
2 changed files with 16 additions and 16 deletions

View File

@ -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.
@ -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") {
@ -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;
@ -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"));
@ -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;
}
@ -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) {

View File

@ -40,7 +40,7 @@
#define WORKSPACE_MARGIN Vector2(10, 10)
class RTilesetEditorContext;
class TilesetEditorContext;
class ScrollContainer;
class SpinBox;
class Label;
@ -56,7 +56,7 @@ class CheckBox;
class TileSetEditor : public HSplitContainer {
friend class TileSetEditorPlugin;
friend class RTilesetEditorContext;
friend class TilesetEditorContext;
GDCLASS(TileSetEditor, HSplitContainer);
@ -115,7 +115,7 @@ class TileSetEditor : public HSplitContainer {
};
Ref<TileSet> tileset;
RTilesetEditorContext *helper;
TilesetEditorContext *helper;
EditorNode *editor;
UndoRedo *undo_redo;
@ -264,9 +264,9 @@ private:
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;
@ -286,7 +286,7 @@ protected:
static void _bind_methods();
public:
RTilesetEditorContext(TileSetEditor *p_tileset_editor);
TilesetEditorContext(TileSetEditor *p_tileset_editor);
};
class TileSetEditorPlugin : public EditorPlugin {