add xml attributes for combobox node and add resolution selection for new doc
This commit is contained in:
@@ -8,11 +8,18 @@ Node* NodeComboBox::clone_instantiate() const
|
||||
return new NodeComboBox;
|
||||
}
|
||||
|
||||
void NodeComboBox::clone_copy(Node* dest) const
|
||||
{
|
||||
NodeButton::clone_copy(dest);
|
||||
NodeComboBox* n = static_cast<NodeComboBox*>(dest);
|
||||
n->labels = labels;
|
||||
n->m_current_index = m_current_index;
|
||||
}
|
||||
|
||||
void NodeComboBox::loaded()
|
||||
{
|
||||
NodeButton::loaded();
|
||||
on_click = [this](Node* target) {
|
||||
LOG("ComboBox");
|
||||
NodePopupMenu* popup = new NodePopupMenu;
|
||||
popup->init();
|
||||
popup->create();
|
||||
@@ -51,8 +58,19 @@ void NodeComboBox::loaded()
|
||||
popup->m_capture_children = false;
|
||||
};
|
||||
}
|
||||
void NodeComboBox::clone_copy(Node* dest) const
|
||||
|
||||
void NodeComboBox::parse_attributes(kAttribute ka, const tinyxml2::XMLAttribute* attr)
|
||||
{
|
||||
NodeButton::clone_copy(dest);
|
||||
NodeComboBox* n = static_cast<NodeComboBox*>(dest);
|
||||
}
|
||||
NodeButton::parse_attributes(ka, attr);
|
||||
switch (ka)
|
||||
{
|
||||
case kAttribute::ComboList:
|
||||
{
|
||||
labels = split(attr->Value(), ',');
|
||||
break;
|
||||
}
|
||||
case kAttribute::Default:
|
||||
m_current_index = attr->IntValue();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user