43 lines
1.5 KiB
C++
43 lines
1.5 KiB
C++
#pragma once
|
|
#include "node.h"
|
|
#include "node_button_custom.h"
|
|
#include "node_border.h"
|
|
#include "node_dialog_picker.h"
|
|
#include "brush.h"
|
|
#include "node_stroke_preview.h"
|
|
|
|
class NodePanelQuick : public NodeBorder
|
|
{
|
|
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;
|
|
NodeSliderV* m_slider_size;
|
|
NodeSliderV* m_slider_flow;
|
|
NodeButtonCustom* m_button_color1;
|
|
NodeButtonCustom* m_button_color2;
|
|
NodeButtonCustom* m_button_color3;
|
|
NodeButtonCustom* m_button_color_current;
|
|
NodeBorder* m_button_color_current_inner;
|
|
NodeButtonCustom* m_button_brush1;
|
|
NodeButtonCustom* m_button_brush2;
|
|
NodeButtonCustom* m_button_brush3;
|
|
NodeButtonCustom* m_button_brush_current;
|
|
NodeStrokePreview* m_button_brush_current_preview;
|
|
std::shared_ptr<NodeColorPicker> m_picker;
|
|
virtual Node* clone_instantiate() const override;
|
|
virtual void clone_finalize(Node* dest) const override;
|
|
virtual void init() override;
|
|
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);
|
|
};
|
|
|