Add categories for control bindings

This commit is contained in:
Henrik Rydgård committed 2023-12-20 16:20:26 +01:00
1 parent 2d4e59eb62
commit 9cb3d03098
7 files changed
+70 -14

No files matched your search

+10
View File
@@ -182,6 +182,16 @@ Point View::GetFocusPosition(FocusDirection dir) const {
}
}
Point CollapsibleHeader::GetFocusPosition(FocusDirection dir) const {
// Bias the focus position to the left.
switch (dir) {
case FOCUS_UP: return Point(bounds_.x + 50, bounds_.y + 2);
case FOCUS_DOWN: return Point(bounds_.x + 50, bounds_.y2() - 2);
default:
return View::GetFocusPosition(dir);
}
}
bool View::SetFocus() {
if (IsFocusMovementEnabled()) {
if (CanBeFocused()) {