move presets panel out of stroke panel, implement brush buttons in quick panel
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "node_button_custom.h"
|
||||
#include "node_border.h"
|
||||
#include "node_dialog_picker.h"
|
||||
#include "brush.h"
|
||||
|
||||
class NodePanelQuick : public NodeBorder
|
||||
{
|
||||
@@ -10,6 +11,7 @@ public:
|
||||
std::function<void(Node* target, glm::vec3 rgb)> on_color_change;
|
||||
std::function<void(Node* target, float value)> on_flow_change;
|
||||
std::function<void(Node* target, float value)> on_size_change;
|
||||
std::function<void(Node* target, std::shared_ptr<Brush> b)> on_brush_change;
|
||||
|
||||
using this_class = NodePanelQuick;
|
||||
using parent = NodeBorder;
|
||||
@@ -19,6 +21,10 @@ public:
|
||||
NodeButtonCustom* m_button_color2;
|
||||
NodeButtonCustom* m_button_color3;
|
||||
NodeButtonCustom* m_button_color_current;
|
||||
NodeButtonCustom* m_button_brush1;
|
||||
NodeButtonCustom* m_button_brush2;
|
||||
NodeButtonCustom* m_button_brush3;
|
||||
NodeButtonCustom* m_button_brush_current;
|
||||
std::shared_ptr<NodeColorPicker> m_picker;
|
||||
virtual Node* clone_instantiate() const override;
|
||||
virtual void clone_finalize(Node* dest) const override;
|
||||
@@ -26,6 +32,8 @@ public:
|
||||
void set_color(glm::vec3 color);
|
||||
private:
|
||||
void init_controls();
|
||||
NodeButtonCustom* init_button_brush(const std::string& name);
|
||||
void handle_button_brush_click(Node* target);
|
||||
void handle_button_color_click(Node* target);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user