world name appear when quick start game
@@ -285,8 +285,13 @@ private void setUpGameWorlds() {
gameWorlds.setItemRenderer(new AbstractItemRenderer<WorldInfo>() {
@Override
public void draw(WorldInfo value, Canvas canvas) {
+ if(value.getCustomTitle().isEmpty()==true) {
+ canvas.drawText(value.getTitle());
+ }
+ else {
canvas.drawText(value.getCustomTitle());
}
+ }
@Override
public Vector2i getPreferredSize(WorldInfo value, Canvas canvas) {
@@ -297,7 +302,14 @@ public Vector2i getPreferredSize(WorldInfo value, Canvas canvas) {
}
private String getWorldDescription(final WorldInfo worldInfo) {
- return translationSystem.translate("${engine:menu#game-details-game-title} ") + worldInfo.getCustomTitle() + '\n' + '\n' +
+ String game_title;
+ if(worldInfo.getCustomTitle().isEmpty()==true) {
+ game_title=worldInfo.getTitle();
+ }
+ else {
+ game_title=worldInfo.getCustomTitle();
+ }
+ return translationSystem.translate("${engine:menu#game-details-game-title} ") + game_title + '\n' + '\n' +
translationSystem.translate("${engine:menu#game-details-game-seed} ") + worldInfo.getSeed() + '\n' + '\n' +
translationSystem.translate("${engine:menu#game-details-world-generator}: ") + worldInfo.getWorldGenerator().toString() + '\n' + '\n' +
translationSystem.translate("${engine:menu#game-details-game-duration} ") + DateTimeHelper.getDeltaBetweenTimestamps(new Date(0).getTime(), worldInfo.getTime());
