Fix bottom settings overlapping with Credits button
This commit is contained in:
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user