mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 01:57:45 +00:00
GameOfLife: Show status tips in Statusbar
This commit is contained in:
parent
f3b08ffc8a
commit
2dc96155f7
1 changed files with 6 additions and 0 deletions
|
@ -66,6 +66,12 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
auto& statusbar = *main_widget->find_descendant_of_type_named<GUI::Statusbar>("statusbar");
|
||||
statusbar.set_text(click_tip);
|
||||
GUI::Application::the()->on_action_enter = [&statusbar](GUI::Action& action) {
|
||||
statusbar.set_override_text(action.status_tip());
|
||||
};
|
||||
GUI::Application::the()->on_action_leave = [&statusbar](GUI::Action&) {
|
||||
statusbar.set_override_text({});
|
||||
};
|
||||
|
||||
auto& columns_spinbox = *main_widget->find_descendant_of_type_named<GUI::SpinBox>("columns_spinbox");
|
||||
auto& rows_spinbox = *main_widget->find_descendant_of_type_named<GUI::SpinBox>("rows_spinbox");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue