Improved mask also work on erase. Improved shaders for layer opacity, now when drawing doesn't change opacity. Improved layers panel layout to be similar to PS. Added layer blending option and visibility. Added custom icons to checkboxes and fixed the combobox items.

This commit is contained in:
2019-01-05 12:41:21 +01:00
parent f823451546
commit e4fe0cffed
23 changed files with 255 additions and 93 deletions

View File

@@ -1,6 +1,7 @@
#pragma once
#include "node.h"
#include "node_border.h"
#include "node_image.h"
class NodeCheckBox : public Node
{
@@ -8,6 +9,8 @@ public:
std::function<void(Node* target, bool checked)> on_value_changed;
NodeBorder* m_outer;
NodeBorder* m_inner;
NodeImage* m_icon;
std::string m_icon_path;
bool checked = false;
virtual Node* clone_instantiate() const override;
virtual void clone_children(Node* dest) const override;
@@ -15,4 +18,8 @@ public:
virtual void create() override;
virtual kEventResult handle_event(Event* e) override;
virtual void draw() override;
virtual void parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr) override;
void set_icon(const std::string& icon_path);
void set_value(bool checked) { this->checked = checked; update_icon(); }
void update_icon();
};