mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2025-01-24 01:57:18 +01:00
Renamed on_paint_node_selected to set_paint_node in PaintCustomPropertyInspectors.
This commit is contained in:
parent
8c98ec9883
commit
1d7ad33407
@ -35,18 +35,18 @@ void PaintInspectorPlugin::parse_begin(Object *p_object) {
|
|||||||
PaintNode *paint_node = Object::cast_to<PaintNode>(p_object);
|
PaintNode *paint_node = Object::cast_to<PaintNode>(p_object);
|
||||||
|
|
||||||
PaintProjectPropertyInspector *pc = memnew(PaintProjectPropertyInspector);
|
PaintProjectPropertyInspector *pc = memnew(PaintProjectPropertyInspector);
|
||||||
pc->on_paint_node_selected(paint_node);
|
pc->set_paint_node(paint_node);
|
||||||
add_custom_control(pc);
|
add_custom_control(pc);
|
||||||
|
|
||||||
if (p_object->is_class("PaintCanvas")) {
|
if (p_object->is_class("PaintCanvas")) {
|
||||||
PaintToolsPropertyInspector *ptool = memnew(PaintToolsPropertyInspector);
|
PaintToolsPropertyInspector *ptool = memnew(PaintToolsPropertyInspector);
|
||||||
ptool->on_paint_node_selected(paint_node);
|
ptool->set_paint_node(paint_node);
|
||||||
add_custom_control(ptool);
|
add_custom_control(ptool);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_object->is_class("PaintProject")) {
|
if (p_object->is_class("PaintProject")) {
|
||||||
PaintProjectToolsPropertyInspector *pct = memnew(PaintProjectToolsPropertyInspector);
|
PaintProjectToolsPropertyInspector *pct = memnew(PaintProjectToolsPropertyInspector);
|
||||||
pct->on_paint_node_selected(paint_node);
|
pct->set_paint_node(paint_node);
|
||||||
add_custom_control(pct);
|
add_custom_control(pct);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,13 @@ SOFTWARE.
|
|||||||
|
|
||||||
#include "../../nodes/paint_node.h"
|
#include "../../nodes/paint_node.h"
|
||||||
|
|
||||||
void PaintCustomPropertyInspector::on_paint_node_selected(PaintNode *paint_node) {
|
void PaintCustomPropertyInspector::set_paint_node(PaintNode *paint_node) {
|
||||||
call("_on_paint_node_selected", paint_node);
|
call("_set_paint_node", paint_node);
|
||||||
}
|
}
|
||||||
void PaintCustomPropertyInspector::on_paint_node_selected_bind(Node *paint_node) {
|
void PaintCustomPropertyInspector::set_paint_node_bind(Node *paint_node) {
|
||||||
call("_on_paint_node_selected", 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() {
|
PaintCustomPropertyInspector::PaintCustomPropertyInspector() {
|
||||||
@ -40,8 +40,8 @@ PaintCustomPropertyInspector::~PaintCustomPropertyInspector() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PaintCustomPropertyInspector::_bind_methods() {
|
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("set_paint_node", "paint_node"), &PaintCustomPropertyInspector::set_paint_node_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);
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,10 @@ class PaintCustomPropertyInspector : public PanelContainer {
|
|||||||
GDCLASS(PaintCustomPropertyInspector, PanelContainer);
|
GDCLASS(PaintCustomPropertyInspector, PanelContainer);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void on_paint_node_selected(PaintNode *paint_node);
|
void set_paint_node(PaintNode *paint_node);
|
||||||
void on_paint_node_selected_bind(Node *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();
|
||||||
~PaintCustomPropertyInspector();
|
~PaintCustomPropertyInspector();
|
||||||
|
@ -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<PaintNode>(p_paint_node);
|
PaintNode *paint_node = Object::cast_to<PaintNode>(p_paint_node);
|
||||||
|
|
||||||
_current_paint_node = 0;
|
_current_paint_node = 0;
|
||||||
|
@ -42,7 +42,7 @@ public:
|
|||||||
void create_grid_buttons();
|
void create_grid_buttons();
|
||||||
void clear_grid_buttons();
|
void clear_grid_buttons();
|
||||||
|
|
||||||
void _on_paint_node_selected(Node *paint_node);
|
void _set_paint_node(Node *paint_node);
|
||||||
|
|
||||||
PaintProjectPropertyInspector();
|
PaintProjectPropertyInspector();
|
||||||
~PaintProjectPropertyInspector();
|
~PaintProjectPropertyInspector();
|
||||||
|
@ -60,7 +60,7 @@ void PaintProjectToolsPropertyInspector::add_action_button(const String &callbac
|
|||||||
_button_contianer->add_child(button);
|
_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<PaintNode>(p_paint_node);
|
PaintNode *paint_node = Object::cast_to<PaintNode>(p_paint_node);
|
||||||
|
|
||||||
_current_paint_node = 0;
|
_current_paint_node = 0;
|
||||||
|
@ -41,7 +41,7 @@ class PaintProjectToolsPropertyInspector : public PaintCustomPropertyInspector {
|
|||||||
public:
|
public:
|
||||||
void add_action_button(const String &callback, const String &hint, const String &icon, const String &theme_type);
|
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();
|
||||||
~PaintProjectToolsPropertyInspector();
|
~PaintProjectToolsPropertyInspector();
|
||||||
|
@ -101,7 +101,7 @@ void PaintToolsPropertyInspector::add_brush_prefab(int id, const Ref<Texture> &n
|
|||||||
_brush_prefabs->add_child(brush_button);
|
_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<PaintCanvas>(p_paint_node);
|
PaintCanvas *paint_canvas = Object::cast_to<PaintCanvas>(p_paint_node);
|
||||||
|
|
||||||
_paint_canvas = 0;
|
_paint_canvas = 0;
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
void add_action_button(const String &callback, const String &hint, const String &icon, const String &theme_type);
|
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<Texture> &normal_texture, const Ref<Texture> &hover_texture);
|
void add_brush_prefab(int id, const Ref<Texture> &normal_texture, const Ref<Texture> &hover_texture);
|
||||||
|
|
||||||
void _on_paint_node_selected(Node *paint_node);
|
void _set_paint_node(Node *paint_node);
|
||||||
|
|
||||||
PaintToolsPropertyInspector();
|
PaintToolsPropertyInspector();
|
||||||
~PaintToolsPropertyInspector();
|
~PaintToolsPropertyInspector();
|
||||||
|
Loading…
Reference in New Issue
Block a user