v3.2.3: various UI tweaks to accommodate iPhones (curves mainly)
This commit is contained in:
committed by
Evan Debenham
parent
09f5948aa2
commit
0a6a93ec47
@@ -241,7 +241,8 @@ public class AboutScene extends PixelScene {
|
||||
list.scrollTo(0, 0);
|
||||
|
||||
ExitButton btnExit = new ExitButton();
|
||||
btnExit.setPos( Camera.main.width - btnExit.width(), 0 );
|
||||
int ofs = PixelScene.landscape() ? 0 : 4;
|
||||
btnExit.setPos( Camera.main.width - btnExit.width() - ofs, ofs );
|
||||
add( btnExit );
|
||||
|
||||
//fadeIn();
|
||||
|
||||
@@ -55,6 +55,7 @@ import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.noosa.NinePatch;
|
||||
import com.watabou.noosa.PointerArea;
|
||||
import com.watabou.noosa.SkinnedBlock;
|
||||
import com.watabou.noosa.tweeners.Tweener;
|
||||
import com.watabou.noosa.ui.Component;
|
||||
import com.watabou.utils.DeviceCompat;
|
||||
@@ -330,6 +331,13 @@ public class HeroSelectScene extends PixelScene {
|
||||
curX += btnWidth;
|
||||
}
|
||||
|
||||
//add a black bar along bottom
|
||||
if (insets.bottom > 0){
|
||||
SkinnedBlock bar = new SkinnedBlock(Camera.main.width, insets.bottom, TextureCache.createSolid(0xFF000000));
|
||||
bar.y = h + insets.top;
|
||||
add(bar);
|
||||
}
|
||||
|
||||
title.setPos(insets.left + (w - title.width()) / 2f, insets.top + (h - HeroBtn.HEIGHT - title.height() - 4));
|
||||
|
||||
btnOptions.setRect(heroBtns.get(0).left() + 16, Camera.main.height-HeroBtn.HEIGHT-16, 20, 21);
|
||||
@@ -337,7 +345,8 @@ public class HeroSelectScene extends PixelScene {
|
||||
}
|
||||
|
||||
btnExit = new ExitButton();
|
||||
btnExit.setPos( Camera.main.width - btnExit.width(), 0 );
|
||||
int ofs = PixelScene.landscape() ? 0 : 4;
|
||||
btnExit.setPos( Camera.main.width - btnExit.width() - ofs, ofs );
|
||||
add( btnExit );
|
||||
btnExit.visible = btnExit.active = !SPDSettings.intro();
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ public class InterlevelScene extends PixelScene {
|
||||
|
||||
loadingText = PixelScene.renderTextBlock( text, 9 );
|
||||
loadingText.setPos(
|
||||
insets.left + w - loadingText.width() - 8,
|
||||
insets.left + w - loadingText.width() - 12,
|
||||
insets.top + h - loadingText.height() - 6
|
||||
);
|
||||
align(loadingText);
|
||||
|
||||
@@ -150,7 +150,7 @@ public class RankingsScene extends PixelScene {
|
||||
btnExit.setPos( Camera.main.width - btnExit.width() - insets.right, insets.top );
|
||||
add( btnExit );
|
||||
|
||||
float left = insets.left;
|
||||
float left = insets.left + (PixelScene.landscape() ? 10 : 0);
|
||||
|
||||
if (Rankings.INSTANCE.latestDaily != null) {
|
||||
IconButton btnDailies = new IconButton(Icons.CALENDAR.get()) {
|
||||
|
||||
@@ -223,8 +223,8 @@ public class TitleScene extends PixelScene {
|
||||
version.measure();
|
||||
version.hardlight( 0x888888 );
|
||||
//TODO perhaps extra check for Android top-right / top-left notches?
|
||||
version.x = insets.left + w - version.width() - 4;
|
||||
version.y = insets.top + h - version.height() - 2;
|
||||
version.x = insets.left + w - version.width() - 8;
|
||||
version.y = insets.top + h - version.height() - 4;
|
||||
add( version );
|
||||
|
||||
if (DeviceCompat.isDesktop()) {
|
||||
|
||||
@@ -61,14 +61,14 @@ public class CurrencyIndicator extends Component {
|
||||
|
||||
@Override
|
||||
protected void layout() {
|
||||
energy.x = x + (width - energy.width()) / 2;
|
||||
energy.y = bottom() - energy.height();
|
||||
gold.x = x+1;
|
||||
gold.y = top() + 1;
|
||||
|
||||
gold.x = x + (width - gold.width()) / 2;
|
||||
if (energy.visible) {
|
||||
gold.y = bottom() - gold.height()- gold.height() + 2;
|
||||
energy.x = x+1;
|
||||
if (gold.visible) {
|
||||
energy.y = top() + energy.height() - 1;
|
||||
} else {
|
||||
gold.y = bottom() - gold.height();
|
||||
energy.y = top() + 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ package com.shatteredpixel.shatteredpixeldungeon.ui;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ShatteredPixelDungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndKeyBindings;
|
||||
import com.watabou.input.GameAction;
|
||||
@@ -33,7 +34,7 @@ public class ExitButton extends IconButton {
|
||||
public ExitButton() {
|
||||
super(Icons.EXIT.get());
|
||||
|
||||
width = 20;
|
||||
width = PixelScene.landscape() ? 40 : 20;
|
||||
height = 20;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user