v0.8.2c: added an option for WndOptions to not have a title

This commit is contained in:
Evan Debenham 2020-08-19 20:34:20 -04:00
parent 554a843f74
commit 210c96c02c

View File

@ -39,18 +39,23 @@ public class WndOptions extends Window {
int width = PixelScene.landscape() ? WIDTH_L : WIDTH_P;
float pos = MARGIN;
if (title != null) {
RenderedTextBlock tfTitle = PixelScene.renderTextBlock(title, 9);
tfTitle.hardlight(TITLE_COLOR);
tfTitle.setPos(MARGIN, MARGIN);
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;