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:
@@ -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();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user