mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-01-12 07:49:32 -05:00
Remove unfinished Widget last child focus code.
This commit is contained in:
parent
31499fea5d
commit
2b6bc03408
@ -49,9 +49,6 @@ void FocusManager::set_focus_widget(Widget* const new_focus_widget) {
|
|||||||
// return;
|
// return;
|
||||||
// }
|
// }
|
||||||
if( !new_focus_widget->focusable() ) {
|
if( !new_focus_widget->focusable() ) {
|
||||||
// New widget is not focusable. Does it have a preferred child that
|
|
||||||
// can receive focus?
|
|
||||||
set_focus_widget(new_focus_widget->last_child_focus());
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -67,7 +64,6 @@ void FocusManager::set_focus_widget(Widget* const new_focus_widget) {
|
|||||||
if( focus_widget() ) {
|
if( focus_widget() ) {
|
||||||
focus_widget()->on_focus();
|
focus_widget()->on_focus();
|
||||||
focus_widget()->set_dirty();
|
focus_widget()->set_dirty();
|
||||||
focus_widget()->parent()->set_last_child_focus(focus_widget());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -138,15 +138,6 @@ bool Widget::has_focus() {
|
|||||||
return (context().focus_manager().focus_widget() == this);
|
return (context().focus_manager().focus_widget() == this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Widget* Widget::last_child_focus() const {
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Widget::set_last_child_focus(Widget* const child) {
|
|
||||||
// Ignore.
|
|
||||||
(void)child;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool Widget::on_key(const KeyEvent event) {
|
bool Widget::on_key(const KeyEvent event) {
|
||||||
(void)event;
|
(void)event;
|
||||||
return false;
|
return false;
|
||||||
|
@ -85,8 +85,6 @@ public:
|
|||||||
bool focusable() const;
|
bool focusable() const;
|
||||||
void set_focusable(const bool value);
|
void set_focusable(const bool value);
|
||||||
bool has_focus();
|
bool has_focus();
|
||||||
virtual Widget* last_child_focus() const;
|
|
||||||
virtual void set_last_child_focus(Widget* const child);
|
|
||||||
|
|
||||||
virtual void paint(Painter& painter) = 0;
|
virtual void paint(Painter& painter) = 0;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user