diff --git a/modules/paint/editor/paint_inspector_plugin.cpp b/modules/paint/editor/paint_inspector_plugin.cpp index dc127f3fd..d5c08e9e6 100644 --- a/modules/paint/editor/paint_inspector_plugin.cpp +++ b/modules/paint/editor/paint_inspector_plugin.cpp @@ -35,18 +35,18 @@ void PaintInspectorPlugin::parse_begin(Object *p_object) { PaintNode *paint_node = Object::cast_to(p_object); PaintProjectPropertyInspector *pc = memnew(PaintProjectPropertyInspector); - pc->on_paint_node_selected(paint_node); + pc->set_paint_node(paint_node); add_custom_control(pc); if (p_object->is_class("PaintCanvas")) { PaintToolsPropertyInspector *ptool = memnew(PaintToolsPropertyInspector); - ptool->on_paint_node_selected(paint_node); + ptool->set_paint_node(paint_node); add_custom_control(ptool); } if (p_object->is_class("PaintProject")) { PaintProjectToolsPropertyInspector *pct = memnew(PaintProjectToolsPropertyInspector); - pct->on_paint_node_selected(paint_node); + pct->set_paint_node(paint_node); add_custom_control(pct); } } diff --git a/modules/paint/ui/property_inspectors/paint_custom_property_inspector.cpp b/modules/paint/ui/property_inspectors/paint_custom_property_inspector.cpp index 0fb265423..77a7ce6ba 100644 --- a/modules/paint/ui/property_inspectors/paint_custom_property_inspector.cpp +++ b/modules/paint/ui/property_inspectors/paint_custom_property_inspector.cpp @@ -24,13 +24,13 @@ SOFTWARE. #include "../../nodes/paint_node.h" -void PaintCustomPropertyInspector::on_paint_node_selected(PaintNode *paint_node) { - call("_on_paint_node_selected", paint_node); +void PaintCustomPropertyInspector::set_paint_node(PaintNode *paint_node) { + call("_set_paint_node", paint_node); } -void PaintCustomPropertyInspector::on_paint_node_selected_bind(Node *paint_node) { - call("_on_paint_node_selected", paint_node); +void PaintCustomPropertyInspector::set_paint_node_bind(Node *paint_node) { + call("_set_paint_node", paint_node); } -void PaintCustomPropertyInspector::_on_paint_node_selected(Node *paint_node) { +void PaintCustomPropertyInspector::_set_paint_node(Node *paint_node) { } PaintCustomPropertyInspector::PaintCustomPropertyInspector() { @@ -40,8 +40,8 @@ PaintCustomPropertyInspector::~PaintCustomPropertyInspector() { } void PaintCustomPropertyInspector::_bind_methods() { - BIND_VMETHOD(MethodInfo("_on_paint_node_selected", PropertyInfo(Variant::OBJECT, "paint_node", PROPERTY_HINT_RESOURCE_TYPE, "PaintNode"))); + BIND_VMETHOD(MethodInfo("_set_paint_node", PropertyInfo(Variant::OBJECT, "paint_node", PROPERTY_HINT_RESOURCE_TYPE, "PaintNode"))); - ClassDB::bind_method(D_METHOD("on_paint_node_selected", "paint_node"), &PaintCustomPropertyInspector::on_paint_node_selected_bind); - ClassDB::bind_method(D_METHOD("_on_paint_node_selected", "paint_node"), &PaintCustomPropertyInspector::_on_paint_node_selected); + ClassDB::bind_method(D_METHOD("set_paint_node", "paint_node"), &PaintCustomPropertyInspector::set_paint_node_bind); + ClassDB::bind_method(D_METHOD("_set_paint_node", "paint_node"), &PaintCustomPropertyInspector::_set_paint_node); } diff --git a/modules/paint/ui/property_inspectors/paint_custom_property_inspector.h b/modules/paint/ui/property_inspectors/paint_custom_property_inspector.h index 2d132b859..1d62b7380 100644 --- a/modules/paint/ui/property_inspectors/paint_custom_property_inspector.h +++ b/modules/paint/ui/property_inspectors/paint_custom_property_inspector.h @@ -31,10 +31,10 @@ class PaintCustomPropertyInspector : public PanelContainer { GDCLASS(PaintCustomPropertyInspector, PanelContainer); public: - void on_paint_node_selected(PaintNode *paint_node); - void on_paint_node_selected_bind(Node *paint_node); + void set_paint_node(PaintNode *paint_node); + void set_paint_node_bind(Node *paint_node); - virtual void _on_paint_node_selected(Node *paint_node); + virtual void _set_paint_node(Node *paint_node); PaintCustomPropertyInspector(); ~PaintCustomPropertyInspector(); diff --git a/modules/paint/ui/property_inspectors/paint_project_property_inspector.cpp b/modules/paint/ui/property_inspectors/paint_project_property_inspector.cpp index 8a391f486..eee89bdff 100644 --- a/modules/paint/ui/property_inspectors/paint_project_property_inspector.cpp +++ b/modules/paint/ui/property_inspectors/paint_project_property_inspector.cpp @@ -64,7 +64,7 @@ void PaintProjectPropertyInspector::clear_grid_buttons() { } } -void PaintProjectPropertyInspector::_on_paint_node_selected(Node *p_paint_node) { +void PaintProjectPropertyInspector::_set_paint_node(Node *p_paint_node) { PaintNode *paint_node = Object::cast_to(p_paint_node); _current_paint_node = 0; diff --git a/modules/paint/ui/property_inspectors/paint_project_property_inspector.h b/modules/paint/ui/property_inspectors/paint_project_property_inspector.h index d58b81e49..903fad8d9 100644 --- a/modules/paint/ui/property_inspectors/paint_project_property_inspector.h +++ b/modules/paint/ui/property_inspectors/paint_project_property_inspector.h @@ -42,7 +42,7 @@ public: void create_grid_buttons(); void clear_grid_buttons(); - void _on_paint_node_selected(Node *paint_node); + void _set_paint_node(Node *paint_node); PaintProjectPropertyInspector(); ~PaintProjectPropertyInspector(); diff --git a/modules/paint/ui/property_inspectors/paint_project_tools_property_inspector.cpp b/modules/paint/ui/property_inspectors/paint_project_tools_property_inspector.cpp index 9dbb2c56e..249645689 100644 --- a/modules/paint/ui/property_inspectors/paint_project_tools_property_inspector.cpp +++ b/modules/paint/ui/property_inspectors/paint_project_tools_property_inspector.cpp @@ -60,7 +60,7 @@ void PaintProjectToolsPropertyInspector::add_action_button(const String &callbac _button_contianer->add_child(button); } -void PaintProjectToolsPropertyInspector::_on_paint_node_selected(Node *p_paint_node) { +void PaintProjectToolsPropertyInspector::_set_paint_node(Node *p_paint_node) { PaintNode *paint_node = Object::cast_to(p_paint_node); _current_paint_node = 0; diff --git a/modules/paint/ui/property_inspectors/paint_project_tools_property_inspector.h b/modules/paint/ui/property_inspectors/paint_project_tools_property_inspector.h index b348e54fa..a3be85518 100644 --- a/modules/paint/ui/property_inspectors/paint_project_tools_property_inspector.h +++ b/modules/paint/ui/property_inspectors/paint_project_tools_property_inspector.h @@ -41,7 +41,7 @@ class PaintProjectToolsPropertyInspector : public PaintCustomPropertyInspector { public: void add_action_button(const String &callback, const String &hint, const String &icon, const String &theme_type); - void _on_paint_node_selected(Node *paint_node); + void _set_paint_node(Node *paint_node); PaintProjectToolsPropertyInspector(); ~PaintProjectToolsPropertyInspector(); diff --git a/modules/paint/ui/property_inspectors/paint_tools_property_inspector.cpp b/modules/paint/ui/property_inspectors/paint_tools_property_inspector.cpp index ae04fa372..4f1720590 100644 --- a/modules/paint/ui/property_inspectors/paint_tools_property_inspector.cpp +++ b/modules/paint/ui/property_inspectors/paint_tools_property_inspector.cpp @@ -101,7 +101,7 @@ void PaintToolsPropertyInspector::add_brush_prefab(int id, const Ref &n _brush_prefabs->add_child(brush_button); } -void PaintToolsPropertyInspector::_on_paint_node_selected(Node *p_paint_node) { +void PaintToolsPropertyInspector::_set_paint_node(Node *p_paint_node) { PaintCanvas *paint_canvas = Object::cast_to(p_paint_node); _paint_canvas = 0; diff --git a/modules/paint/ui/property_inspectors/paint_tools_property_inspector.h b/modules/paint/ui/property_inspectors/paint_tools_property_inspector.h index 9b04acc97..32b4efe80 100644 --- a/modules/paint/ui/property_inspectors/paint_tools_property_inspector.h +++ b/modules/paint/ui/property_inspectors/paint_tools_property_inspector.h @@ -47,7 +47,7 @@ public: void add_action_button(const String &callback, const String &hint, const String &icon, const String &theme_type); void add_brush_prefab(int id, const Ref &normal_texture, const Ref &hover_texture); - void _on_paint_node_selected(Node *paint_node); + void _set_paint_node(Node *paint_node); PaintToolsPropertyInspector(); ~PaintToolsPropertyInspector();