add/remove presets on all panels

This commit is contained in:
2019-09-06 23:59:49 +02:00
parent 17603bf468
commit 14a037e2d3
4 changed files with 72 additions and 49 deletions

View File

@@ -75,6 +75,7 @@ public:
class NodePanelBrushPreset : public Node
{
static std::vector<NodePanelBrushPreset*> s_panels;
bool m_interacted = false;
NodeBrushPresetItem* m_current = nullptr;
NodeButtonCustom* m_btn_add;
@@ -90,6 +91,8 @@ public:
Node* m_container;
std::function<void(Node* target, std::shared_ptr<Brush>& brush)> on_brush_changed;
std::function<void(Node* target)> on_popup_close;
NodePanelBrushPreset();
~NodePanelBrushPreset();
virtual Node* clone_instantiate() const override;
virtual void init() override;
virtual kEventResult handle_event(Event* e) override;
@@ -102,7 +105,6 @@ public:
bool import_ppbr(const std::string& path);
bool import_abr(const std::string& path);
bool import_brush(const std::string& path);
std::string replace_path(std::string path, std::string new_base);
void clear_brushes();
};