mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-10 20:28:19 -04:00
Pane: Focus selected child first
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user