fix nullptr when revalidating UI for the first time, because stuff only init in the splash screen, by moving said init call to the first subscriber of the resolution/skin changed event (displaycontainer). Basically it needs to be called before the UI gets revalidated.
This commit is contained in:
@@ -20,6 +20,7 @@ package yugecin.opsudance.core;
|
||||
import itdelatrisu.opsu.GameData;
|
||||
import itdelatrisu.opsu.GameImage;
|
||||
import itdelatrisu.opsu.Options;
|
||||
import itdelatrisu.opsu.Utils;
|
||||
import itdelatrisu.opsu.audio.MusicController;
|
||||
import itdelatrisu.opsu.beatmap.Beatmap;
|
||||
import itdelatrisu.opsu.downloads.DownloadList;
|
||||
@@ -146,6 +147,7 @@ public class DisplayContainer implements ErrorDumpable, KeyListener, MouseListen
|
||||
@Override
|
||||
public void onEvent(ResolutionOrSkinChangedEvent event) {
|
||||
destroyImages();
|
||||
Utils.init(DisplayContainer.this); // TODO this shouldn't be here
|
||||
UI.revalidate(); // TODO this shouldn't be here
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user