mirror of
https://github.com/jokerx3/HeatUp
synced 2026-07-27 10:19:46 +02:00
Bugfix Config, setGamePanelWidth(int width);
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package de.heatup.cfg;
|
||||
|
||||
import de.heatup.logging.Logger;
|
||||
|
||||
/*
|
||||
* Bitte hier eure Magicnumbers eintragen
|
||||
*/
|
||||
@@ -13,6 +15,10 @@ public class Config {
|
||||
public static int gamePanelWidth = 800;
|
||||
public static int singleTilePixels = gamePanelWidth/mapMaxTilesWidth;
|
||||
public static void setGamePanelWidth(int width) {
|
||||
// Wir wollen hier keine Reste!
|
||||
while (width % mapMaxTilesHeight != 0) {
|
||||
width--;
|
||||
}
|
||||
gamePanelWidth = width;
|
||||
updateSingleTilePixels();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user