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

@@ -13,7 +13,9 @@ void NodeComboBox::clone_copy(Node* dest) const
NodeButton::clone_copy(dest);
NodeComboBox* n = static_cast<NodeComboBox*>(dest);
n->m_data = m_data;
n->m_items = m_items;
n->m_current_index = m_current_index;
n->m_selected_child_index = m_selected_child_index;
}
void NodeComboBox::loaded()
@@ -85,6 +87,9 @@ void NodeComboBox::parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute*
case kAttribute::ComboList:
{
m_data = split(attr->Value(), ',');
m_items.clear();
for (auto& i : m_data)
if (i != "-") m_items.push_back(i);
break;
}
case kAttribute::Default:
@@ -94,3 +99,12 @@ void NodeComboBox::parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute*
break;
}
}
void NodeComboBox::set_index(int index)
{
m_current_index = index;
m_selected_child_index = index;
m_text->set_text(m_items[index].c_str());
//if (on_select)
// on_select(this, index);
}