refactor to have a single global current brush on Canvas::m_current_brush and make panels read from it for drawing instead of relying on their own copy
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
class NodePanelStroke : public Node
|
||||
{
|
||||
public:
|
||||
NodeStrokePreview* m_canvas;
|
||||
NodeStrokePreview* m_preview;
|
||||
NodeSliderH* m_tip_size;
|
||||
NodeSliderH* m_tip_spacing;
|
||||
NodeSliderH* m_tip_flow;
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
virtual void clone_finalize(Node* dest) const override;
|
||||
virtual void init() override;
|
||||
void init_controls();
|
||||
void set_params(const ui::Brush& b);
|
||||
void update_controls();
|
||||
|
||||
void init_slider(NodeSliderH*& slider, const char* id, float ui::Brush::* prop);
|
||||
void handle_slide(float ui::Brush::* prop, Node* target, float value);
|
||||
|
||||
Reference in New Issue
Block a user