rename parent to m_parent and add floating panel class

This commit is contained in:
2019-03-20 22:28:44 +01:00
parent e635ad00a8
commit 929e80a218
14 changed files with 151 additions and 42 deletions

View File

@@ -577,7 +577,7 @@ void App::update(float dt)
if (n && n->m_display)
{
auto box = n->m_clip_uncut;
Node* p = n->parent;
Node* p = n->m_parent;
if (dynamic_cast<NodeBrushPresetItem*>(n))
p = p;
while (p)
@@ -590,7 +590,7 @@ void App::update(float dt)
glm::vec2 off_s(pr, pb);
glm::vec4 pclip = { xy(p->m_clip_uncut) + off_p, zw(p->m_clip_uncut) - off_s - off_p };
box = rect_intersection(box, pclip);
p = p->parent;
p = p->m_parent;
}
//auto box = n->m_clip;
//glm::ivec4 c = glm::vec4((int)box.x - 1, (int)(height / zoom - box.y - box.w) - 1, (int)box.z + 2, (int)box.w + 2) * zoom;