Merge pull request 'fix-settings-scrolling' (#24) from Dram27/minecraft-pe-0.6.1:fix-settings-scrolling into main

Reviewed-on: Kolyah35/minecraft-pe-0.6.1#24
This commit is contained in:
2026-07-20 21:13:41 +02:00
6 changed files with 289 additions and 137 deletions

View File

@@ -121,6 +121,7 @@ void OptionsScreen::setupPositions() {
(*it)->x = categoryButtons[0]->width;
(*it)->y = bHeader->height;
(*it)->width = width - categoryButtons[0]->width;
(*it)->height = height - bHeader->height;
(*it)->setupPositions();
}
@@ -261,6 +262,12 @@ void OptionsScreen::mouseReleased(int x, int y, int buttonNum) {
super::mouseReleased(x, y, buttonNum);
}
void OptionsScreen::mouseWheel(int dx, int dy, int xm, int ym) {
if (currentOptionsGroup != NULL && currentOptionsGroup->pointInside(xm, ym) && dy != 0) {
currentOptionsGroup->scrollByPixels((float)dy * 18.0f);
}
}
void OptionsScreen::keyPressed(int eventKey) {
if (currentOptionsGroup != NULL)
currentOptionsGroup->keyPressed(minecraft, eventKey);