dark overlay is an ui element now
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user