add option to restore hbmenu when disabling "Replace hbmenu on exit".

fixes #66
This commit is contained in:
ITotalJustice
2024-12-31 18:13:30 +00:00
parent 87642e914e
commit 271fab66f5
3 changed files with 137 additions and 19 deletions

View File

@@ -118,6 +118,16 @@ auto OptionBox::Draw(NVGcontext* vg, Theme* theme) -> void {
}
}
auto OptionBox::OnFocusGained() noexcept -> void {
Widget::OnFocusGained();
SetHidden(false);
}
auto OptionBox::OnFocusLost() noexcept -> void {
Widget::OnFocusLost();
SetHidden(true);
}
auto OptionBox::Setup(std::size_t index) -> void {
m_index = std::min(m_entries.size() - 1, index);
m_entries[m_index].Selected(true);