2022-11-15 13:17:37 +01:00
|
|
|
#ifndef PAINT_PROJECT_H
|
|
|
|
#define PAINT_PROJECT_H
|
|
|
|
|
2022-11-17 23:32:09 +01:00
|
|
|
#include "core/containers/pool_vector.h"
|
|
|
|
|
2022-11-15 13:17:37 +01:00
|
|
|
#include "paint_node.h"
|
|
|
|
|
|
|
|
class PaintProject : public PaintNode {
|
|
|
|
GDCLASS(PaintProject, PaintNode);
|
|
|
|
|
|
|
|
public:
|
2022-11-19 13:45:14 +01:00
|
|
|
String get_save_file_name();
|
|
|
|
void set_save_file_name(const String &fn);
|
|
|
|
|
2022-11-15 23:11:38 +01:00
|
|
|
Color get_current_color();
|
|
|
|
void set_current_color(const Color &color);
|
|
|
|
|
2022-11-17 23:55:36 +01:00
|
|
|
void add_preset_color(const Color &color);
|
|
|
|
void remove_preset_color(const int index);
|
|
|
|
Color get_preset_color(const int index);
|
|
|
|
void set_preset_color(const int index, const Color &color);
|
|
|
|
int get_preset_color_count();
|
|
|
|
|
2022-11-17 23:32:09 +01:00
|
|
|
PoolColorArray get_color_presets();
|
|
|
|
void set_color_presets(const PoolColorArray &colors);
|
|
|
|
|
|
|
|
void set_colors_as_default();
|
|
|
|
|
2022-11-19 23:06:56 +01:00
|
|
|
void save_image_to_file();
|
2022-11-19 13:45:14 +01:00
|
|
|
|
2022-11-19 12:22:10 +01:00
|
|
|
void add_paint_canvas_backgorund();
|
|
|
|
void add_paint_visual_grid();
|
|
|
|
|
2022-11-19 23:19:41 +01:00
|
|
|
bool _render_should_evaluate_children();
|
|
|
|
|
2022-11-15 13:17:37 +01:00
|
|
|
PaintProject();
|
|
|
|
~PaintProject();
|
|
|
|
|
|
|
|
protected:
|
2022-11-17 23:32:09 +01:00
|
|
|
void _notification(int p_what);
|
|
|
|
|
2022-11-15 13:17:37 +01:00
|
|
|
static void _bind_methods();
|
2022-11-15 23:11:38 +01:00
|
|
|
|
2022-11-19 13:45:14 +01:00
|
|
|
String _save_file_name;
|
2022-11-15 23:11:38 +01:00
|
|
|
Color _current_color;
|
2022-11-17 23:32:09 +01:00
|
|
|
PoolColorArray _color_presets;
|
2022-11-15 13:17:37 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|