Update mappings

This commit is contained in:
Jonas Herzig
2017-06-15 14:37:18 +02:00
parent 6ecb87e8dd
commit bef5e41a8d
22 changed files with 44 additions and 44 deletions

View File

@@ -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;
}
}
}