use of org.terasology.engine.rendering.nui.layers.mainMenu.MessagePopup in project Terasology by MovingBlocks.
the class GameDetailsScreen method onOpened.
@Override
public void onOpened() {
super.onOpened();
if (isScreenValid()) {
errors = new ArrayList<>();
loadGeneralInfo();
loadGameModules();
loadBlocks();
loadGameWorlds();
if (!errors.isEmpty()) {
showErrors();
}
tabs.select(0);
showErrors.setEnabled(!errors.isEmpty());
} else {
final MessagePopup popup = getManager().createScreen(MessagePopup.ASSET_URI, MessagePopup.class);
popup.setMessage(translationSystem.translate("${engine:menu#game-details-errors-message-title}"), translationSystem.translate("${engine:menu#game-details-errors-message-body}"));
popup.subscribeButton(e -> triggerBackAnimation());
getManager().pushScreen(popup);
// disable child widgets
setEnabled(false);
}
}
Aggregations