on the fly resolution changing
This commit is contained in:
parent
d311f8bb95
commit
83df73fc04
|
@ -63,6 +63,7 @@ import yugecin.opsudance.core.DisplayContainer;
|
||||||
import yugecin.opsudance.core.errorhandling.ErrorHandler;
|
import yugecin.opsudance.core.errorhandling.ErrorHandler;
|
||||||
import yugecin.opsudance.core.events.EventBus;
|
import yugecin.opsudance.core.events.EventBus;
|
||||||
import yugecin.opsudance.events.BubbleNotificationEvent;
|
import yugecin.opsudance.events.BubbleNotificationEvent;
|
||||||
|
import yugecin.opsudance.events.ResolutionChangedEvent;
|
||||||
import yugecin.opsudance.movers.factories.ExgonMoverFactory;
|
import yugecin.opsudance.movers.factories.ExgonMoverFactory;
|
||||||
import yugecin.opsudance.movers.factories.QuadraticBezierMoverFactory;
|
import yugecin.opsudance.movers.factories.QuadraticBezierMoverFactory;
|
||||||
import yugecin.opsudance.movers.slidermovers.DefaultSliderMoverController;
|
import yugecin.opsudance.movers.slidermovers.DefaultSliderMoverController;
|
||||||
|
@ -346,6 +347,7 @@ public class Options {
|
||||||
@Override
|
@Override
|
||||||
public void clickListItem(int index) {
|
public void clickListItem(int index) {
|
||||||
resolutionIdx = index;
|
resolutionIdx = index;
|
||||||
|
setDisplayMode(DisplayContainer.instance);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -59,6 +59,9 @@ import static yugecin.opsudance.core.Entrypoint.sout;
|
||||||
*/
|
*/
|
||||||
public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListener {
|
public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListener {
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
|
public static DisplayContainer instance; // TODO d remove this
|
||||||
|
|
||||||
private static SGL GL = Renderer.get();
|
private static SGL GL = Renderer.get();
|
||||||
|
|
||||||
public final EventBus eventBus;
|
public final EventBus eventBus;
|
||||||
|
@ -117,6 +120,7 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
|
||||||
this.eventBus = eventBus;
|
this.eventBus = eventBus;
|
||||||
this.cursor = new Cursor();
|
this.cursor = new Cursor();
|
||||||
drawCursor = true;
|
drawCursor = true;
|
||||||
|
instance = this;
|
||||||
|
|
||||||
outTransitionListener = new TransitionFinishedListener() {
|
outTransitionListener = new TransitionFinishedListener() {
|
||||||
@Override
|
@Override
|
||||||
|
@ -317,6 +321,11 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
|
||||||
}
|
}
|
||||||
|
|
||||||
private void initGL() throws Exception {
|
private void initGL() throws Exception {
|
||||||
|
InternalTextureLoader.get().clear();
|
||||||
|
GameImage.destroyImages();
|
||||||
|
GameData.Grade.destroyImages();
|
||||||
|
Beatmap.destroyBackgroundImageCache();
|
||||||
|
|
||||||
GL.initDisplay(width, height);
|
GL.initDisplay(width, height);
|
||||||
GL.enterOrtho(width, height);
|
GL.enterOrtho(width, height);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user