implementing color wheel and new color picker
This commit is contained in:
@@ -57,8 +57,11 @@ void NodeComboBox::loaded()
|
||||
float offset = 0;
|
||||
for (int i = 0; i <= m_selected_child_index; i++)
|
||||
offset += (m_data[i] == "-") ? 5.f : 30.f;
|
||||
|
||||
float height = m_items.size() * 30.f + (m_data.size() - m_items.size()) * 5.f; // add items and separators
|
||||
glm::vec2 pos = m_pos + glm::vec2(0, m_size.y - offset);
|
||||
auto screen = root()->m_size;
|
||||
if ((pos.y + height) > screen.y) pos.y = screen.y - height;
|
||||
if (pos.y < 0) pos.y = 0;
|
||||
popup->SetPositioning(YGPositionTypeAbsolute);
|
||||
popup->SetPosition(pos.x, pos.y);
|
||||
popup->SetSize(m_size.x, YGUndefined);
|
||||
|
||||
Reference in New Issue
Block a user