diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java index 41b9de2f6..3638c0064 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/windows/WndOptions.java @@ -39,18 +39,23 @@ public class WndOptions extends Window { int width = PixelScene.landscape() ? WIDTH_L : WIDTH_P; - RenderedTextBlock tfTitle = PixelScene.renderTextBlock( title, 9 ); - tfTitle.hardlight( TITLE_COLOR ); - tfTitle.setPos(MARGIN, MARGIN); - tfTitle.maxWidth(width - MARGIN * 2); - add( tfTitle ); + float pos = MARGIN; + if (title != null) { + RenderedTextBlock tfTitle = PixelScene.renderTextBlock(title, 9); + tfTitle.hardlight(TITLE_COLOR); + tfTitle.setPos(MARGIN, pos); + tfTitle.maxWidth(width - MARGIN * 2); + add(tfTitle); + + pos = tfTitle.bottom() + 3*MARGIN; + } RenderedTextBlock tfMesage = PixelScene.renderTextBlock( 6 ); tfMesage.text(message, width - MARGIN * 2); - tfMesage.setPos( MARGIN, tfTitle.bottom() + 3*MARGIN ); + tfMesage.setPos( MARGIN, pos ); add( tfMesage ); - float pos = tfMesage.bottom() + 2*MARGIN; + pos = tfMesage.bottom() + 2*MARGIN; for (int i=0; i < options.length; i++) { final int index = i;