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);
|
list.scrollTo(0, 0);
|
||||||
|
|
||||||
ExitButton btnExit = new ExitButton();
|
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 );
|
add( btnExit );
|
||||||
|
|
||||||
//fadeIn();
|
//fadeIn();
|
||||||
|
|||||||
+10
-1
@@ -55,6 +55,7 @@ import com.watabou.noosa.Game;
|
|||||||
import com.watabou.noosa.Image;
|
import com.watabou.noosa.Image;
|
||||||
import com.watabou.noosa.NinePatch;
|
import com.watabou.noosa.NinePatch;
|
||||||
import com.watabou.noosa.PointerArea;
|
import com.watabou.noosa.PointerArea;
|
||||||
|
import com.watabou.noosa.SkinnedBlock;
|
||||||
import com.watabou.noosa.tweeners.Tweener;
|
import com.watabou.noosa.tweeners.Tweener;
|
||||||
import com.watabou.noosa.ui.Component;
|
import com.watabou.noosa.ui.Component;
|
||||||
import com.watabou.utils.DeviceCompat;
|
import com.watabou.utils.DeviceCompat;
|
||||||
@@ -330,6 +331,13 @@ public class HeroSelectScene extends PixelScene {
|
|||||||
curX += btnWidth;
|
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));
|
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);
|
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 = 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 );
|
add( btnExit );
|
||||||
btnExit.visible = btnExit.active = !SPDSettings.intro();
|
btnExit.visible = btnExit.active = !SPDSettings.intro();
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -266,7 +266,7 @@ public class InterlevelScene extends PixelScene {
|
|||||||
|
|
||||||
loadingText = PixelScene.renderTextBlock( text, 9 );
|
loadingText = PixelScene.renderTextBlock( text, 9 );
|
||||||
loadingText.setPos(
|
loadingText.setPos(
|
||||||
insets.left + w - loadingText.width() - 8,
|
insets.left + w - loadingText.width() - 12,
|
||||||
insets.top + h - loadingText.height() - 6
|
insets.top + h - loadingText.height() - 6
|
||||||
);
|
);
|
||||||
align(loadingText);
|
align(loadingText);
|
||||||
|
|||||||
+1
-1
@@ -150,7 +150,7 @@ public class RankingsScene extends PixelScene {
|
|||||||
btnExit.setPos( Camera.main.width - btnExit.width() - insets.right, insets.top );
|
btnExit.setPos( Camera.main.width - btnExit.width() - insets.right, insets.top );
|
||||||
add( btnExit );
|
add( btnExit );
|
||||||
|
|
||||||
float left = insets.left;
|
float left = insets.left + (PixelScene.landscape() ? 10 : 0);
|
||||||
|
|
||||||
if (Rankings.INSTANCE.latestDaily != null) {
|
if (Rankings.INSTANCE.latestDaily != null) {
|
||||||
IconButton btnDailies = new IconButton(Icons.CALENDAR.get()) {
|
IconButton btnDailies = new IconButton(Icons.CALENDAR.get()) {
|
||||||
|
|||||||
@@ -223,8 +223,8 @@ public class TitleScene extends PixelScene {
|
|||||||
version.measure();
|
version.measure();
|
||||||
version.hardlight( 0x888888 );
|
version.hardlight( 0x888888 );
|
||||||
//TODO perhaps extra check for Android top-right / top-left notches?
|
//TODO perhaps extra check for Android top-right / top-left notches?
|
||||||
version.x = insets.left + w - version.width() - 4;
|
version.x = insets.left + w - version.width() - 8;
|
||||||
version.y = insets.top + h - version.height() - 2;
|
version.y = insets.top + h - version.height() - 4;
|
||||||
add( version );
|
add( version );
|
||||||
|
|
||||||
if (DeviceCompat.isDesktop()) {
|
if (DeviceCompat.isDesktop()) {
|
||||||
|
|||||||
+6
-6
@@ -61,14 +61,14 @@ public class CurrencyIndicator extends Component {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void layout() {
|
protected void layout() {
|
||||||
energy.x = x + (width - energy.width()) / 2;
|
gold.x = x+1;
|
||||||
energy.y = bottom() - energy.height();
|
gold.y = top() + 1;
|
||||||
|
|
||||||
gold.x = x + (width - gold.width()) / 2;
|
energy.x = x+1;
|
||||||
if (energy.visible) {
|
if (gold.visible) {
|
||||||
gold.y = bottom() - gold.height()- gold.height() + 2;
|
energy.y = top() + energy.height() - 1;
|
||||||
} else {
|
} 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.ShatteredPixelDungeon;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||||
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene;
|
import com.shatteredpixel.shatteredpixeldungeon.scenes.TitleScene;
|
||||||
import com.shatteredpixel.shatteredpixeldungeon.windows.WndKeyBindings;
|
import com.shatteredpixel.shatteredpixeldungeon.windows.WndKeyBindings;
|
||||||
import com.watabou.input.GameAction;
|
import com.watabou.input.GameAction;
|
||||||
@@ -33,7 +34,7 @@ public class ExitButton extends IconButton {
|
|||||||
public ExitButton() {
|
public ExitButton() {
|
||||||
super(Icons.EXIT.get());
|
super(Icons.EXIT.get());
|
||||||
|
|
||||||
width = 20;
|
width = PixelScene.landscape() ? 40 : 20;
|
||||||
height = 20;
|
height = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user