mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
dark overlay is an ui element now
This commit is contained in:
parent
51ffb93230
commit
c6a2fc90a8
8 changed files with 25 additions and 24 deletions
|
|
@ -22,7 +22,9 @@ shared_ptr<UINode> Container::getAt(vec2 pos, shared_ptr<UINode> self) {
|
|||
return nullptr;
|
||||
}
|
||||
if (!isInside(pos)) return nullptr;
|
||||
for (auto node : nodes) {
|
||||
|
||||
for (int i = nodes.size()-1; i >= 0; i--) {
|
||||
auto& node = nodes[i];
|
||||
if (!node->visible())
|
||||
continue;
|
||||
auto hover = node->getAt(pos, node);
|
||||
|
|
@ -91,6 +93,12 @@ void Container::draw(Batch2D* batch, Assets* assets) {
|
|||
Window::popScissor();
|
||||
}
|
||||
|
||||
void Container::addBack(shared_ptr<UINode> node) {
|
||||
nodes.insert(nodes.begin(), node);
|
||||
node->setParent(this);
|
||||
refresh();
|
||||
}
|
||||
|
||||
void Container::add(shared_ptr<UINode> node) {
|
||||
nodes.push_back(node);
|
||||
node->setParent(this);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue