scrollable listboxes

This commit is contained in:
devZoGok
2024-06-29 11:16:09 +03:00
parent b1ae9d8a8c
commit 615fcd70c9
3 changed files with 11 additions and 1 deletions
+9
View File
@@ -107,4 +107,13 @@ namespace battleship{
} }
void GuiAppState::onAnalog(int bind, float strength) {} void GuiAppState::onAnalog(int bind, float strength) {}
void GuiAppState::onRawMouseWheelScroll(bool up){
Listbox *openListbox = getOpenListbox();
if(!openListbox) return;
if(up) openListbox->scrollUp();
else openListbox->scrollDown();
}
} }
+1
View File
@@ -30,6 +30,7 @@ namespace battleship{
virtual void onRawKeyPress(int); virtual void onRawKeyPress(int);
virtual void onRawCharPress(vb01::u32); virtual void onRawCharPress(vb01::u32);
virtual void onRawMousePress(int); virtual void onRawMousePress(int);
virtual void onRawMouseWheelScroll(bool);
vb01Gui::Textbox* getOpenTextbox(); vb01Gui::Textbox* getOpenTextbox();
vb01Gui::Listbox* getOpenListbox(); vb01Gui::Listbox* getOpenListbox();