StartPlayingScreen.java add callback for renderingSettings button
import org.terasology.rendering.nui.CoreScreenLayer;
import org.terasology.rendering.nui.WidgetUtil;
import org.terasology.rendering.nui.animation.MenuAnimationSystems;
+import org.terasology.rendering.nui.layers.mainMenu.videoSettings.RenderingModuleSettingScreen;
import org.terasology.rendering.nui.widgets.UIImage;
import org.terasology.rendering.nui.widgets.UILabel;
import org.terasology.rendering.world.WorldSetupWrapper;
private List<WorldSetupWrapper> worldSetupWrappers;
private UniverseWrapper universeWrapper;
private WorldSetupWrapper targetWorld;
+ private Context subContext;
@Override
public void initialise() {
@@ -78,7 +80,6 @@ public void initialise() {
getManager().createScreen(MessagePopup.ASSET_URI, MessagePopup.class).setMessage("Error", "Can't create new game!");
}
-
SimpleUri uri;
WorldInfo worldInfo;
//gameManifest.addWorld(worldInfo);
@@ -101,6 +102,12 @@ public void initialise() {
WidgetUtil.trySubscribe(this, "mainMenu", button -> {
getManager().pushScreen("engine:mainMenuScreen");
});
+
+ WidgetUtil.trySubscribe(this, "renderingSettings", button -> {
+ final RenderingModuleSettingScreen renderingModuleSettingScreen = getManager().createScreen(RenderingModuleSettingScreen.ASSET_URI, RenderingModuleSettingScreen.class);
+ renderingModuleSettingScreen.setSubContext(this.subContext);
+ triggerForwardAnimation(renderingModuleSettingScreen);
+ });
}
@Override
@@ -125,6 +132,7 @@ public void setTargetWorld(List<WorldSetupWrapper> worldSetupWrapperList, WorldS
worldSetupWrappers = worldSetupWrapperList;
universeWrapper = context.get(UniverseWrapper.class);
targetWorld = spawnWorld;
+ subContext = context;
}
@Override
