2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-09 09:47:43 +00:00

Deadlock fix and toolbar shading

This commit is contained in:
Jack Andersen
2015-12-03 15:35:01 -10:00
parent bd0becc9c0
commit f53127290d
11 changed files with 128 additions and 53 deletions

View File

@@ -38,16 +38,32 @@ void Space::resetResources(ViewResources& res)
{
if (m_contentView)
m_contentView->resetResources(res);
m_toolbar->resetResources(res);
}
void Space::resized(const boo::SWindowRect& root, const boo::SWindowRect& sub)
{
View::resized(root, sub);
boo::SWindowRect tbRect = sub;
tbRect.size[1] = m_toolbar->gauge();
m_toolbar->resized(root, tbRect);
if (m_contentView)
{
tbRect.location[1] += tbRect.size[1];
tbRect.size[1] = sub.size[1] - tbRect.size[1];
tbRect.size[1] = std::max(tbRect.size[1], 0);
m_contentView->resized(root, tbRect);
}
}
void Space::draw(boo::IGraphicsCommandQueue* gfxQ)
{
View::draw(gfxQ);
if (m_contentView)
m_contentView->draw(gfxQ);
m_toolbar->draw(gfxQ);
}
}