mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-26 14:19:38 -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