mirror of
https://gitea.sffnetwork.ru/Kolyah35/minecraft-pe-0.6.1.git
synced 2026-11-21 18:09:47 +00:00
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() {
|
||||
const int labelHeight = 18;
|
||||
const int bottomPadding = 36;
|
||||
const float requestedScroll = scrollOffsetY;
|
||||
const int scrollOffset = (int)requestedScroll;
|
||||
int curY = y + labelHeight - scrollOffset;
|
||||
|
|
@ -42,6 +43,7 @@ void OptionsGroup::setupPositions() {
|
|||
(*it)->setupPositions();
|
||||
curY += (*it)->height + 3;
|
||||
}
|
||||
curY += bottomPadding;
|
||||
contentHeight = std::max(0, curY - contentStartY + scrollOffset);
|
||||
maxScrollOffsetY = std::max(0, contentHeight - (height - labelHeight));
|
||||
const float clampedScroll = Mth::clamp(requestedScroll, 0.0f, maxScrollOffsetY);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue