v0.7.4: adjusted elements at scene corners to accommodate curved displays
This commit is contained in:
parent
3841f593f8
commit
1c4603d6e4
|
@ -117,7 +117,7 @@ public class AlchemyScene extends PixelScene {
|
|||
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.x = (Camera.main.width - title.width()) / 2f;
|
||||
title.y = (16 - title.baseLine()) / 2f;
|
||||
title.y = (20 - title.baseLine()) / 2f;
|
||||
align(title);
|
||||
add(title);
|
||||
|
||||
|
@ -270,7 +270,7 @@ public class AlchemyScene extends PixelScene {
|
|||
});
|
||||
}
|
||||
};
|
||||
btnGuide.setRect(0, 0, 16, 16);
|
||||
btnGuide.setRect(0, 0, 20, 20);
|
||||
add(btnGuide);
|
||||
|
||||
energyLeft = PixelScene.renderText(Messages.get(AlchemyScene.class, "energy", availableEnergy()), 9);
|
||||
|
|
|
@ -62,7 +62,7 @@ public class BadgesScene extends PixelScene {
|
|||
add( archs );
|
||||
|
||||
float left = 5;
|
||||
float top = 16;
|
||||
float top = 20;
|
||||
|
||||
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
|
|
|
@ -58,7 +58,7 @@ public class ChangesScene extends PixelScene {
|
|||
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9 );
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.x = (w - title.width()) / 2f;
|
||||
title.y = (16 - title.baseLine()) / 2f;
|
||||
title.y = (20 - title.baseLine()) / 2f;
|
||||
align(title);
|
||||
add(title);
|
||||
|
||||
|
@ -69,7 +69,7 @@ public class ChangesScene extends PixelScene {
|
|||
NinePatch panel = Chrome.get(Chrome.Type.TOAST);
|
||||
|
||||
int pw = 135 + panel.marginLeft() + panel.marginRight() - 2;
|
||||
int ph = h - 32;
|
||||
int ph = h - 35;
|
||||
|
||||
panel.size( pw, ph );
|
||||
panel.x = (w - pw) / 2f;
|
||||
|
|
|
@ -75,7 +75,7 @@ public class RankingsScene extends PixelScene {
|
|||
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9);
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.x = (w - title.width()) / 2f;
|
||||
title.y = (16 - title.baseLine()) / 2f;
|
||||
title.y = (20 - title.baseLine()) / 2f;
|
||||
align(title);
|
||||
add(title);
|
||||
|
||||
|
|
|
@ -72,7 +72,7 @@ public class StartScene extends PixelScene {
|
|||
RenderedText title = PixelScene.renderText( Messages.get(this, "title"), 9);
|
||||
title.hardlight(Window.TITLE_COLOR);
|
||||
title.x = (w - title.width()) / 2f;
|
||||
title.y = (16 - title.baseLine()) / 2f;
|
||||
title.y = (20 - title.baseLine()) / 2f;
|
||||
align(title);
|
||||
add(title);
|
||||
|
||||
|
|
|
@ -66,13 +66,14 @@ public class TitleScene extends PixelScene {
|
|||
Image title = BannerSprites.get( BannerSprites.Type.PIXEL_DUNGEON );
|
||||
add( title );
|
||||
|
||||
float topRegion = Math.max(95f, h*0.45f);
|
||||
float topRegion = Math.max(title.height, h*0.45f);
|
||||
|
||||
title.x = (w - title.width()) / 2f;
|
||||
if (SPDSettings.landscape())
|
||||
if (SPDSettings.landscape()) {
|
||||
title.y = (topRegion - title.height()) / 2f;
|
||||
else
|
||||
title.y = 16 + (topRegion - title.height() - 16) / 2f;
|
||||
} else {
|
||||
title.y = 20 + (topRegion - title.height() - 20) / 2f;
|
||||
}
|
||||
|
||||
align(title);
|
||||
|
||||
|
@ -159,24 +160,25 @@ public class TitleScene extends PixelScene {
|
|||
BitmapText version = new BitmapText( "v " + Game.version + "", pixelFont);
|
||||
version.measure();
|
||||
version.hardlight( 0x888888 );
|
||||
version.x = w - version.width();
|
||||
version.y = h - version.height();
|
||||
version.x = w - version.width() - 4;
|
||||
version.y = h - version.height() - 2;
|
||||
add( version );
|
||||
|
||||
Button changes = new ChangesButton();
|
||||
changes.setPos( w-changes.width(), h - version.height() - changes.height());
|
||||
changes.setPos( version.x + version.width() - changes.width(),
|
||||
version.y - changes.height());
|
||||
add( changes );
|
||||
|
||||
int pos = 0;
|
||||
int pos = 2;
|
||||
|
||||
PrefsButton btnPrefs = new PrefsButton();
|
||||
btnPrefs.setRect( pos, 0, 16, 16 );
|
||||
btnPrefs.setRect( pos, 0, 16, 20 );
|
||||
add( btnPrefs );
|
||||
|
||||
pos += btnPrefs.width();
|
||||
|
||||
LanguageButton btnLang = new LanguageButton();
|
||||
btnLang.setRect(pos, 0, 14, 16);
|
||||
btnLang.setRect(pos, 0, 16, 20);
|
||||
add( btnLang );
|
||||
|
||||
ExitButton btnExit = new ExitButton();
|
||||
|
|
|
@ -66,14 +66,15 @@ public class WelcomeScene extends PixelScene {
|
|||
Image title = BannerSprites.get( BannerSprites.Type.PIXEL_DUNGEON );
|
||||
title.brightness(0.6f);
|
||||
add( title );
|
||||
|
||||
float topRegion = Math.max(95f, h*0.45f);
|
||||
|
||||
|
||||
float topRegion = Math.max(title.height, h*0.45f);
|
||||
|
||||
title.x = (w - title.width()) / 2f;
|
||||
if (SPDSettings.landscape())
|
||||
if (SPDSettings.landscape()) {
|
||||
title.y = (topRegion - title.height()) / 2f;
|
||||
else
|
||||
title.y = 16 + (topRegion - title.height() - 16) / 2f;
|
||||
} else {
|
||||
title.y = 20 + (topRegion - title.height() - 20) / 2f;
|
||||
}
|
||||
|
||||
align(title);
|
||||
|
||||
|
|
|
@ -36,8 +36,8 @@ public class ExitButton extends Button {
|
|||
public ExitButton() {
|
||||
super();
|
||||
|
||||
width = image.width;
|
||||
height = image.height;
|
||||
width = image.width+4;
|
||||
height = image.height+4;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -52,8 +52,8 @@ public class ExitButton extends Button {
|
|||
protected void layout() {
|
||||
super.layout();
|
||||
|
||||
image.x = x;
|
||||
image.y = y;
|
||||
image.x = x+2;
|
||||
image.y = y+2;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user