ehh stuff isWidescreen
This commit is contained in:
parent
425860ca7c
commit
8d6e34faaf
|
@ -404,7 +404,7 @@ public class SongMenu extends ComplexOpsuState {
|
|||
|
||||
// selection buttons
|
||||
// TODO: the origin should be bottomleft or something
|
||||
float selectX = width * (displayContainer.isWidescreen() ? 0.164f : 0.1875f);
|
||||
float selectX = width * (isWidescreen ? 0.164f : 0.1875f);
|
||||
final float footerButtonWidth = footerHeight * 0.84f;
|
||||
selectModeButton = new MenuButton(SELECTION_MODE_OVERLAY, selectX, footerY);
|
||||
selectX += footerHeight + 2;
|
||||
|
|
|
@ -401,6 +401,7 @@ public class DisplayContainer implements ErrorDumpable, SkinChangedListener {
|
|||
height = displayMode.getHeight();
|
||||
width2 = width / 2;
|
||||
height2 = height / 2;
|
||||
isWidescreen = width * 1000 / height > 1500; // 1777 = 16:9, 1333 = 4:3
|
||||
|
||||
Display.setDisplayMode(displayMode);
|
||||
Display.setFullscreen(fullscreen);
|
||||
|
@ -460,10 +461,6 @@ public class DisplayContainer implements ErrorDumpable, SkinChangedListener {
|
|||
return (Sys.getTime() * 1000) / Sys.getTimerResolution();
|
||||
}
|
||||
|
||||
public boolean isWidescreen() {
|
||||
return width * 1000 / height > 1500; // 1777 = 16:9, 1333 = 4:3
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeErrorDump(StringWriter dump) {
|
||||
dump.append("> DisplayContainer dump\n");
|
||||
|
|
|
@ -79,6 +79,7 @@ public class InstanceContainer {
|
|||
public static GamePauseMenu pauseState;
|
||||
|
||||
public static int width, width2, height, height2;
|
||||
public static boolean isWidescreen;
|
||||
public static int mouseX, mouseY;
|
||||
public static int renderDelta;
|
||||
|
||||
|
|
|
@ -218,7 +218,6 @@ public class OptionsOverlay implements ResolutionChangedListener, SkinChangedLis
|
|||
public void revalidate() {
|
||||
this.dirty = false;
|
||||
|
||||
boolean isWidescreen = displayContainer.isWidescreen();
|
||||
targetWidth = (int) (width * (isWidescreen ? 0.4f : 0.5f));
|
||||
|
||||
// calculate positions
|
||||
|
|
Loading…
Reference in New Issue
Block a user