Update mappings
This commit is contained in:
@@ -68,12 +68,12 @@ public class GuiHandler {
|
||||
}
|
||||
}
|
||||
if (achievements != null && stats != null) {
|
||||
moveAllButtonsDirectlyBelowUpwards(buttonList, achievements.yPosition,
|
||||
achievements.xPosition, stats.xPosition + stats.width);
|
||||
moveAllButtonsDirectlyBelowUpwards(buttonList, achievements.y,
|
||||
achievements.x, stats.x + stats.width);
|
||||
}
|
||||
if (openToLan != null) {
|
||||
moveAllButtonsDirectlyBelowUpwards(buttonList, openToLan.yPosition,
|
||||
openToLan.xPosition, openToLan.xPosition + openToLan.width);
|
||||
moveAllButtonsDirectlyBelowUpwards(buttonList, openToLan.y,
|
||||
openToLan.x, openToLan.x + openToLan.width);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -87,8 +87,8 @@ public class GuiHandler {
|
||||
*/
|
||||
private void moveAllButtonsDirectlyBelowUpwards(List<GuiButton> buttons, int belowY, int xStart, int xEnd) {
|
||||
for (GuiButton button : buttons) {
|
||||
if (button.yPosition >= belowY && button.xPosition <= xEnd && button.xPosition + button.width >= xStart) {
|
||||
button.yPosition -= 24;
|
||||
if (button.y >= belowY && button.x <= xEnd && button.x + button.width >= xStart) {
|
||||
button.y -= 24;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user