implementing color wheel and new color picker
This commit is contained in:
@@ -28,6 +28,8 @@
|
||||
#include "node_dialog_browse.h"
|
||||
#include "node_dialog_cloud.h"
|
||||
#include "node_combobox.h"
|
||||
#include "node_colorwheel.h"
|
||||
#include "node_dialog_picker.h"
|
||||
|
||||
void Node::async_start()
|
||||
{
|
||||
@@ -381,6 +383,7 @@ Node::~Node()
|
||||
void Node::SetWidth(float value)
|
||||
{
|
||||
YGNodeStyleSetWidth(y_node, value);
|
||||
m_size.x = value;
|
||||
}
|
||||
|
||||
void Node::SetWidthP(float value)
|
||||
@@ -391,6 +394,7 @@ void Node::SetWidthP(float value)
|
||||
void Node::SetHeight(float value)
|
||||
{
|
||||
YGNodeStyleSetHeight(y_node, value);
|
||||
m_size.y = value;
|
||||
}
|
||||
|
||||
void Node::SetHeightP(float value)
|
||||
@@ -401,11 +405,13 @@ void Node::SetHeightP(float value)
|
||||
void Node::SetSize(float w, float h)
|
||||
{
|
||||
SetWidth(w); SetHeight(h);
|
||||
m_size = {w, h};
|
||||
}
|
||||
|
||||
void Node::SetSize(glm::vec2 value)
|
||||
{
|
||||
SetWidth(value.x); SetHeight(value.y);
|
||||
m_size = value;
|
||||
}
|
||||
|
||||
void Node::SetPadding(float t, float r, float b, float l)
|
||||
@@ -428,12 +434,14 @@ glm::vec4 Node::GetPadding() const
|
||||
void Node::SetPosition(const glm::vec2 pos)
|
||||
{
|
||||
SetPosition(pos.x, pos.y);
|
||||
m_pos = pos;
|
||||
}
|
||||
|
||||
void Node::SetPosition(float l, float t)
|
||||
{
|
||||
YGNodeStyleSetPosition(y_node, YGEdgeTop, t);
|
||||
YGNodeStyleSetPosition(y_node, YGEdgeLeft, l);
|
||||
m_pos = {l, t};
|
||||
}
|
||||
|
||||
void Node::SetPosition(float l, float t, float r, float b)
|
||||
@@ -818,6 +826,8 @@ void Node::load_internal(const tinyxml2::XMLElement* x_node)
|
||||
CASE(kWidget::DialogBrowseItem, NodeDialogBrowseItem);
|
||||
CASE(kWidget::DialogCloud, NodeDialogCloud);
|
||||
CASE(kWidget::DialogCloudItem, NodeDialogCloudItem);
|
||||
CASE(kWidget::ColorWheel, NodeColorWheel);
|
||||
CASE(kWidget::ColorPicker, NodeColorPicker);
|
||||
#undef CASE
|
||||
case kWidget::Ref:
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user