Bound some getter / setter methods in the paint module.

This commit is contained in:
Relintai 2022-11-14 17:11:38 +01:00
parent 5a36880691
commit e63a346cd3
5 changed files with 5 additions and 2 deletions

View File

@ -55,4 +55,6 @@ PaintCanvasBackground::~PaintCanvasBackground() {
} }
void PaintCanvasBackground::_bind_methods() { void PaintCanvasBackground::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_pixel_size"), &PaintCanvasBackground::get_pixel_size);
ClassDB::bind_method(D_METHOD("set_pixel_size"), &PaintCanvasBackground::set_pixel_size);
} }

View File

@ -69,4 +69,5 @@ PaintCanvasOutline::~PaintCanvasOutline() {
} }
void PaintCanvasOutline::_bind_methods() { void PaintCanvasOutline::_bind_methods() {
ClassDB::bind_method(D_METHOD("draw_outline_box", "pos", "size", "color", "width"), &PaintCanvasOutline::draw_outline_box);
} }

View File

@ -41,8 +41,6 @@ public:
protected: protected:
void _notification(int p_what); void _notification(int p_what);
static void _bind_methods(); static void _bind_methods();
}; };
#endif #endif

View File

@ -65,4 +65,5 @@ void PaintColorGrid::_bind_methods() {
ADD_SIGNAL(MethodInfo("color_change_request", PropertyInfo(Variant::COLOR, "color"))); ADD_SIGNAL(MethodInfo("color_change_request", PropertyInfo(Variant::COLOR, "color")));
ClassDB::bind_method(D_METHOD("change_color_to"), &PaintColorGrid::change_color_to); ClassDB::bind_method(D_METHOD("change_color_to"), &PaintColorGrid::change_color_to);
ClassDB::bind_method(D_METHOD("add_color_prefab"), &PaintColorGrid::add_color_prefab);
} }

View File

@ -109,4 +109,5 @@ PaintVisualGrid::~PaintVisualGrid() {
} }
void PaintVisualGrid::_bind_methods() { void PaintVisualGrid::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_grid_size", "size"), &PaintVisualGrid::set_grid_size);
} }