reorder tool icons, add popup auto-hide after interaction

This commit is contained in:
2019-03-06 18:43:38 +01:00
parent 99929dac39
commit 5eba9f1227
8 changed files with 74 additions and 13 deletions

View File

@@ -33,6 +33,7 @@ class NodePanelBrush : public Node
NodeButtonCustom* m_btn_up;
NodeButtonCustom* m_btn_down;
NodeButtonCustom* m_btn_remove;
bool m_interacted = false;
struct header_t {
char magic[5]{ 'P', 'P', 'B', 'R', 0 };
uint16_t version = 0;
@@ -55,6 +56,7 @@ public:
virtual Node* clone_instantiate() const override;
virtual void init() override;
virtual kEventResult handle_event(Event* e) override;
virtual void added(Node* parent) override;
void handle_click(Node* target);
int find_brush(const std::string& name) const;
std::string get_texture_path(int index) const;
@@ -82,6 +84,7 @@ public:
class NodePanelBrushPreset : public Node
{
bool m_interacted = false;
NodeBrushPresetItem* m_current = nullptr;
NodeButtonCustom* m_btn_add;
NodeButtonCustom* m_btn_up;
@@ -179,6 +182,7 @@ public:
virtual Node* clone_instantiate() const override;
virtual void init() override;
virtual kEventResult handle_event(Event* e) override;
virtual void added(Node* parent) override;
void handle_click(Node* target);
bool save();
bool restore();