Pane: Focus selected child first

This commit is contained in:
Luke Street
2026-05-01 00:56:53 -06:00
parent 0d973a497b
commit 1affefbbfc
6 changed files with 13 additions and 8 deletions
+6
View File
@@ -57,6 +57,12 @@ void Pane::update() {
}
bool Pane::focus() {
// If there's a selected child, focus that
for (const auto& child : mChildren) {
if (child->selected() && child->focus()) {
return true;
}
}
for (const auto& child : mChildren) {
if (child->focus()) {
return true;