diff --git a/core/src/main/assets/interfaces/menu_pane.png b/core/src/main/assets/interfaces/menu_pane.png index 83666e693..cc6d1d92f 100644 Binary files a/core/src/main/assets/interfaces/menu_pane.png and b/core/src/main/assets/interfaces/menu_pane.png differ diff --git a/core/src/main/assets/interfaces/status_pane.png b/core/src/main/assets/interfaces/status_pane.png index 17355fe16..cbe1ff000 100644 Binary files a/core/src/main/assets/interfaces/status_pane.png and b/core/src/main/assets/interfaces/status_pane.png differ diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java index b88cc431e..fb5c310c2 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/GameScene.java @@ -368,11 +368,6 @@ public class GameScene extends PixelScene { int uiSize = SPDSettings.interfaceSize(); - menu = new MenuPane(); - menu.camera = uiCamera; - menu.setPos( uiCamera.width-MenuPane.WIDTH-insets.right, largeInsetTop); - add(menu); - //TODO make top bar transparent and add 1px of top status and menu bar to it? //most cutouts supported by the game are small @@ -397,14 +392,24 @@ public class GameScene extends PixelScene { } } + float screentop = largeInsetTop; + if (screentop == 0 && uiSize == 0){ + screentop--; //on mobile UI, if we render in fullscreen, clip the top 1px; + } + + menu = new MenuPane(); + menu.camera = uiCamera; + menu.setPos( uiCamera.width-MenuPane.WIDTH-insets.right, screentop); + add(menu); + status = new StatusPane( SPDSettings.interfaceSize() > 0 ); status.camera = uiCamera; StatusPane.cutoutOffset = mediumCutoutOffset; - status.setRect(insets.left, uiSize > 0 ? uiCamera.height-39-insets.bottom : largeInsetTop, uiCamera.width - insets.left - insets.right, 0 ); + status.setRect(insets.left, uiSize > 0 ? uiCamera.height-39-insets.bottom : screentop, uiCamera.width - insets.left - insets.right, 0 ); add(status); if (uiSize < 2 && largeInsetTop != 0) { - SkinnedBlock bar = new SkinnedBlock(uiCamera.width, largeInsetTop, TextureCache.createSolid(0xFF1C1E18)); + SkinnedBlock bar = new SkinnedBlock(uiCamera.width, largeInsetTop, TextureCache.createSolid(0x88000000)); bar.camera = uiCamera; add(bar); @@ -415,7 +420,7 @@ public class GameScene extends PixelScene { boss = new BossHealthBar(); boss.camera = uiCamera; - boss.setPos( insets.left + 6 + (uiCamera.width - insets.left - insets.right - boss.width())/2, largeInsetTop + 21 + mediumCutoutOffset); + boss.setPos( (uiCamera.width - boss.width())/2, screentop + 26); add(boss); resume = new ResumeIndicator(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java index 829f36118..01c3b87d4 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/MenuPane.java @@ -75,10 +75,10 @@ public class MenuPane extends Component { protected void createChildren() { super.createChildren(); - bg = new Image(Assets.Interfaces.MENU, 1, 0, 31, 20); + bg = new Image(Assets.Interfaces.MENU, 1, 0, 31, 21); add(bg); - versionOverflowBG = new NinePatch(bg.texture, 1, 23, 6, 7, 3, 0, 2, 0); + versionOverflowBG = new NinePatch(bg.texture, 1, 22, 6, 8, 3, 0, 2, 0); add(versionOverflowBG); version = new BitmapText( "v" + Game.version , PixelScene.pixelFont); @@ -168,14 +168,14 @@ public class MenuPane extends Component { float overFlow = version.width()-(bg.width()-4-rightMargin); if (overFlow >= 1){ version.x = x + 2 - overFlow; - versionOverflowBG.size(overFlow+3, 7); + versionOverflowBG.size(overFlow+3, 8); versionOverflowBG.x = version.x-3; versionOverflowBG.y = y; } else { version.x = x + 3; versionOverflowBG.visible = false; } - version.y = y + 2 - (version.baseLine()*version.scale.y)/2f; + version.y = y + 3 - (version.baseLine()*version.scale.y)/2f; version.y -= .001f; PixelScene.align(version); @@ -184,7 +184,7 @@ public class MenuPane extends Component { btnJournal.setPos( btnMenu.left() - btnJournal.width() + 2, y ); depthIcon.x = btnJournal.left() - 7 + (7 - depthIcon.width())/2f - 0.1f; - depthIcon.y = y+7; + depthIcon.y = y+8; PixelScene.align(depthIcon); depthText.scale.set(PixelScene.align(0.67f)); @@ -239,7 +239,7 @@ public class MenuPane extends Component { super(); width = bg.width + 4; - height = bg.height + 9; + height = bg.height + 10; } @Override @@ -267,7 +267,7 @@ public class MenuPane extends Component { super.layout(); bg.x = x + 2; - bg.y = y + 7; + bg.y = y + 8; journalIcon.x = bg.x + (bg.width() - journalIcon.width())/2f; journalIcon.y = bg.y + (bg.height() - journalIcon.height())/2f; @@ -372,7 +372,7 @@ public class MenuPane extends Component { super(); width = image.width + 4; - height = image.height + 9; + height = image.height + 10; } @Override @@ -388,7 +388,7 @@ public class MenuPane extends Component { super.layout(); image.x = x + 2; - image.y = y + 7; + image.y = y + 8; } @Override diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java index e7aebe87a..5993b7efb 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java @@ -90,7 +90,7 @@ public class StatusPane extends Component { if (large) bg = new NinePatch( asset, 0, 64, 41, 39, 33, 0, 4, 0 ); //right part is transparent now so Ninepatching doesn't actually do anything - else bg = new NinePatch( asset, 0, 0, 128, 35, 85, 0, 45, 0 ); + else bg = new NinePatch( asset, 0, 0, 128, 38, 85, 0, 45, 0 ); add( bg ); heroInfo = new Button(){ @@ -121,16 +121,16 @@ public class StatusPane extends Component { add( compass ); if (large) rawShielding = new Image(asset, 0, 112, 128, 9); - else rawShielding = new Image(asset, 0, 40, 50, 4); + else rawShielding = new Image(asset, 0, 44, 50, 4); rawShielding.alpha(0.5f); add(rawShielding); if (large) shieldedHP = new Image(asset, 0, 112, 128, 9); - else shieldedHP = new Image(asset, 0, 40, 50, 4); + else shieldedHP = new Image(asset, 0, 44, 50, 4); add(shieldedHP); if (large) hp = new Image(asset, 0, 103, 128, 9); - else hp = new Image(asset, 0, 36, 50, 4); + else hp = new Image(asset, 0, 40, 50, 4); add( hp ); hpText = new BitmapText(PixelScene.pixelFont); @@ -147,7 +147,7 @@ public class StatusPane extends Component { add(heroInfoOnBar); if (large) exp = new Image(asset, 0, 121, 128, 7); - else exp = new Image(asset, 0, 44, 17, 4); + else exp = new Image(asset, 0, 48, 17, 4); add( exp ); expText = new BitmapText(PixelScene.pixelFont); @@ -173,7 +173,7 @@ public class StatusPane extends Component { @Override protected void layout() { - height = large ? 39 : 35; + height = large ? 39 : 38; bg.x = x; bg.y = y; @@ -181,10 +181,10 @@ public class StatusPane extends Component { else bg.size( width, bg.height ); avatar.x = bg.x - avatar.width / 2f + 15; - avatar.y = bg.y - avatar.height / 2f + (large ? 15 : 14); + avatar.y = bg.y - avatar.height / 2f + 16; PixelScene.align(avatar); - heroInfo.setRect( x, y, 30, large ? 40 : 35 ); + heroInfo.setRect( x, y, 30, large ? 40 : 36 ); compass.x = avatar.x + avatar.width / 2f - compass.origin.x; compass.y = avatar.y + avatar.height / 2f - compass.origin.y; @@ -213,10 +213,10 @@ public class StatusPane extends Component { busy.y = y + bg.height - 9; } else { exp.x = x+2; - exp.y = y+29; + exp.y = y+30; hp.x = shieldedHP.x = rawShielding.x = x + 30; - hp.y = shieldedHP.y = rawShielding.y = y + 1; + hp.y = shieldedHP.y = rawShielding.y = y + 2; hpText.scale.set(PixelScene.align(0.5f)); hpText.x = hp.x + 1; @@ -232,7 +232,7 @@ public class StatusPane extends Component { heroInfoOnBar.setRect(heroInfo.right(), y, 50, 9); - buffs.setRect( x + 31, y + 7 + cutoutOffset, 50, 8 ); + buffs.setRect( x + 31, y + 8 + cutoutOffset, 50, 8 ); busy.x = x + 1; busy.y = y + 37; @@ -320,7 +320,7 @@ public class StatusPane extends Component { level.text( Integer.toString( lastLvl ) ); level.measure(); level.x = x + 25.5f - level.width() / 2f; - level.y = y + 28.0f - level.baseLine() / 2f; + level.y = y + 31.0f - level.baseLine() / 2f; } PixelScene.align(level); }