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:
2017-11-07 09:14:02 +00:00
parent 3e546affc9
commit 53062711fa
13 changed files with 79 additions and 89 deletions

View File

@@ -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);