forked from mirrors/kolyah35-minecraft-pe-0.6.1
Fix bottom settings overlapping with Credits button
This commit is contained in:
parent
4cfaa43d77
commit
162ec7adfa
1 changed files with 2 additions and 0 deletions
|
|
@ -28,6 +28,7 @@ OptionsGroup::OptionsGroup( std::string labelID )
|
||||||
|
|
||||||
void OptionsGroup::setupPositions() {
|
void OptionsGroup::setupPositions() {
|
||||||
const int labelHeight = 18;
|
const int labelHeight = 18;
|
||||||
|
const int bottomPadding = 36;
|
||||||
const float requestedScroll = scrollOffsetY;
|
const float requestedScroll = scrollOffsetY;
|
||||||
const int scrollOffset = (int)requestedScroll;
|
const int scrollOffset = (int)requestedScroll;
|
||||||
int curY = y + labelHeight - scrollOffset;
|
int curY = y + labelHeight - scrollOffset;
|
||||||
|
|
@ -42,6 +43,7 @@ void OptionsGroup::setupPositions() {
|
||||||
(*it)->setupPositions();
|
(*it)->setupPositions();
|
||||||
curY += (*it)->height + 3;
|
curY += (*it)->height + 3;
|
||||||
}
|
}
|
||||||
|
curY += bottomPadding;
|
||||||
contentHeight = std::max(0, curY - contentStartY + scrollOffset);
|
contentHeight = std::max(0, curY - contentStartY + scrollOffset);
|
||||||
maxScrollOffsetY = std::max(0, contentHeight - (height - labelHeight));
|
maxScrollOffsetY = std::max(0, contentHeight - (height - labelHeight));
|
||||||
const float clampedScroll = Mth::clamp(requestedScroll, 0.0f, maxScrollOffsetY);
|
const float clampedScroll = Mth::clamp(requestedScroll, 0.0f, maxScrollOffsetY);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue