Added TOOL_ prefix to the Tools enum's values in PaintCanvas.

This commit is contained in:
Relintai 2022-11-17 11:55:25 +01:00
parent 33c70f7a86
commit 8fc5633933
2 changed files with 22 additions and 22 deletions

View File

@ -415,15 +415,15 @@ void PaintCanvas::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_image_texture"), &PaintCanvas::get_image_texture); ClassDB::bind_method(D_METHOD("get_image_texture"), &PaintCanvas::get_image_texture);
ClassDB::bind_method(D_METHOD("get_preview_image_texture"), &PaintCanvas::get_preview_image_texture); ClassDB::bind_method(D_METHOD("get_preview_image_texture"), &PaintCanvas::get_preview_image_texture);
BIND_ENUM_CONSTANT(PAINT); BIND_ENUM_CONSTANT(TOOL_PENCIL);
BIND_ENUM_CONSTANT(BRUSH); BIND_ENUM_CONSTANT(TOOL_BRUSH);
BIND_ENUM_CONSTANT(BUCKET); BIND_ENUM_CONSTANT(TOOL_BUCKET);
BIND_ENUM_CONSTANT(RAINBOW); BIND_ENUM_CONSTANT(TOOL_RAINBOW);
BIND_ENUM_CONSTANT(LINE); BIND_ENUM_CONSTANT(TOOL_LINE);
BIND_ENUM_CONSTANT(RECT); BIND_ENUM_CONSTANT(TOOL_RECT);
BIND_ENUM_CONSTANT(DARKEN); BIND_ENUM_CONSTANT(TOOL_DARKEN);
BIND_ENUM_CONSTANT(BRIGHTEN); BIND_ENUM_CONSTANT(TOOL_BRIGHTEN);
BIND_ENUM_CONSTANT(COLORPICKER); BIND_ENUM_CONSTANT(TOOL_COLORPICKER);
BIND_ENUM_CONSTANT(CUT); BIND_ENUM_CONSTANT(TOOL_CUT);
BIND_ENUM_CONSTANT(PASTECUT); BIND_ENUM_CONSTANT(TOOL_PASTECUT);
} }

View File

@ -13,17 +13,17 @@ class PaintCanvas : public PaintNode {
public: public:
enum Tools { enum Tools {
PAINT = 0, TOOL_PENCIL = 0,
BRUSH, TOOL_BRUSH,
BUCKET, TOOL_BUCKET,
RAINBOW, TOOL_RAINBOW,
LINE, TOOL_LINE,
RECT, TOOL_RECT,
DARKEN, TOOL_DARKEN,
BRIGHTEN, TOOL_BRIGHTEN,
COLORPICKER, TOOL_COLORPICKER,
CUT, TOOL_CUT,
PASTECUT, TOOL_PASTECUT,
}; };
bool get_symmetry_x() const; bool get_symmetry_x() const;