diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java b/src/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java index 278b19456..16149c09f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/effects/FloatingText.java @@ -92,7 +92,7 @@ public class FloatingText extends BitmapText { hardlight( color ); measure(); - this.x = PixelScene.align( x - width() / 2 ); + this.x = x - width() / 2; this.y = y - height(); timeLeft = LIFESPAN; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java index fc9d4344f..08897be3f 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java @@ -65,8 +65,8 @@ public class AboutScene extends PixelScene { final float wataOffset = ShatteredPixelDungeon.landscape() ? colWidth : 0; Image shpx = Icons.SHPX.get(); - shpx.x = align( (colWidth - shpx.width()) / 2 ); - shpx.y = align( colTop ); + shpx.x = (colWidth - shpx.width()) / 2; + shpx.y = colTop; add( shpx ); new Flare( 7, 64 ).color( 0x225511, true ).show( shpx, 0 ).angularSpeed = +20; @@ -77,16 +77,16 @@ public class AboutScene extends PixelScene { shpxtitle.hardlight( Window.SHPX_COLOR ); add( shpxtitle ); - shpxtitle.x = align( (colWidth - shpxtitle.width()) / 2 ); - shpxtitle.y = align( shpx.y + shpx.height + 5 ); + shpxtitle.x = (colWidth - shpxtitle.width()) / 2; + shpxtitle.y = shpx.y + shpx.height + 5; BitmapTextMultiline shpxtext = createMultiline( TXT_SHPX, 8 ); shpxtext.maxWidth = shpxtitle.maxWidth; shpxtext.measure(); add( shpxtext ); - shpxtext.x = align( (colWidth - shpxtext.width()) / 2 ); - shpxtext.y = align( shpxtitle.y + shpxtitle.height() + 12 ); + shpxtext.x = (colWidth - shpxtext.width()) / 2; + shpxtext.y = shpxtitle.y + shpxtitle.height() + 12; BitmapTextMultiline shpxlink = createMultiline( LNK_SHPX, 8 ); shpxlink.maxWidth = shpxtitle.maxWidth; @@ -107,10 +107,10 @@ public class AboutScene extends PixelScene { add( shpxhotArea ); Image wata = Icons.WATA.get(); - wata.x = align( wataOffset + (colWidth - wata.width()) / 2 ); - wata.y = align( ShatteredPixelDungeon.landscape() ? + wata.x = wataOffset + (colWidth - wata.width()) / 2; + wata.y = ShatteredPixelDungeon.landscape() ? colTop: - shpxlink.y + wata.height + 20); + shpxlink.y + wata.height + 20; add( wata ); new Flare( 7, 64 ).color( 0x112233, true ).show( wata, 0 ).angularSpeed = +20; @@ -121,16 +121,16 @@ public class AboutScene extends PixelScene { wataTitle.hardlight(Window.TITLE_COLOR); add( wataTitle ); - wataTitle.x = align( wataOffset + (colWidth - wataTitle.width()) / 2 ); - wataTitle.y = align( wata.y + wata.height + 11 ); + wataTitle.x = wataOffset + (colWidth - wataTitle.width()) / 2; + wataTitle.y = wata.y + wata.height + 11; BitmapTextMultiline wataText = createMultiline( TXT_WATA, 8 ); wataText.maxWidth = wataTitle.maxWidth; wataText.measure(); add( wataText ); - wataText.x = align( wataOffset + (colWidth - wataText.width()) / 2 ); - wataText.y = align( wataTitle.y + wataTitle.height() + 12 ); + wataText.x = wataOffset + (colWidth - wataText.width()) / 2; + wataText.y = wataTitle.y + wataTitle.height() + 12; BitmapTextMultiline wataLink = createMultiline( LNK_WATA, 8 ); wataLink.maxWidth = wataTitle.maxWidth; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java index 17e438117..b2ab6ec37 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/AmuletScene.java @@ -91,8 +91,8 @@ public class AmuletScene extends PixelScene { if (noText) { height = amulet.height + LARGE_GAP + btnExit.height() + SMALL_GAP + btnStay.height(); - amulet.x = align( (Camera.main.width - amulet.width) / 2 ); - amulet.y = align( (Camera.main.height - height) / 2 ); + amulet.x = (Camera.main.width - amulet.width) / 2; + amulet.y = (Camera.main.height - height) / 2; btnExit.setPos( (Camera.main.width - btnExit.width()) / 2, amulet.y + amulet.height + LARGE_GAP ); btnStay.setPos( btnExit.left(), btnExit.bottom() + SMALL_GAP ); @@ -100,10 +100,10 @@ public class AmuletScene extends PixelScene { } else { height = amulet.height + LARGE_GAP + text.height() + LARGE_GAP + btnExit.height() + SMALL_GAP + btnStay.height(); - amulet.x = align( (Camera.main.width - amulet.width) / 2 ); - amulet.y = align( (Camera.main.height - height) / 2 ); + amulet.x = (Camera.main.width - amulet.width) / 2; + amulet.y = (Camera.main.height - height) / 2; - text.x = align( (Camera.main.width - text.width()) / 2 ); + text.x = (Camera.main.width - text.width()) / 2; text.y = amulet.y + amulet.height + LARGE_GAP; btnExit.setPos( (Camera.main.width - btnExit.width()) / 2, text.y + text.height() + LARGE_GAP ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java index 716761ffe..7a8d4abcc 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/BadgesScene.java @@ -71,8 +71,8 @@ public class BadgesScene extends PixelScene { BitmapText title = PixelScene.createText( TXT_TITLE, 9 ); title.hardlight( Window.TITLE_COLOR ); title.measure(); - title.x = align( (w - title.width()) / 2 ); - title.y = align( (panel.y - title.baseLine()) / 2 ); + title.x = (w - title.width()) / 2; + title.y = (panel.y - title.baseLine()) / 2; add( title ); Badges.loadGlobal(); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java index 589f8cd18..7cf754abc 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/PixelScene.java @@ -188,11 +188,6 @@ public class PixelScene extends Scene { return result; } - // This one should be used for UI elements - public static float align( float pos ) { - return pos; - } - public static boolean noFade = false; protected void fadeIn() { if (noFade) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java index a54f6154e..49371b40c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/RankingsScene.java @@ -79,8 +79,8 @@ public class RankingsScene extends PixelScene { BitmapText title = PixelScene.createText(TXT_TITLE, 9); title.hardlight(Window.SHPX_COLOR); title.measure(); - title.x = align((w - title.width()) / 2); - title.y = align( GAP ); + title.x = (w - title.width()) / 2; + title.y = GAP; add(title); if (Rankings.INSTANCE.records.size() > 0) { @@ -89,7 +89,7 @@ public class RankingsScene extends PixelScene { float rowHeight = GameMath.gate(ROW_HEIGHT_MIN, (uiCamera.height - 26)/Rankings.INSTANCE.records.size(), ROW_HEIGHT_MAX); float left = (w - Math.min( MAX_ROW_WIDTH, w )) / 2 + GAP; - float top = align( (h - rowHeight * Rankings.INSTANCE.records.size()) / 2 ); + float top = (h - rowHeight * Rankings.INSTANCE.records.size()) / 2; int pos = 0; @@ -121,15 +121,15 @@ public class RankingsScene extends PixelScene { BitmapText total = PixelScene.createText( "/" + Rankings.INSTANCE.totalNumber, 8 ); total.hardlight( 0xCCCCCC ); total.measure(); - total.x = align( (w - total.width()) / 2 ); - total.y = align( top + pos * rowHeight + GAP ); + total.x = (w - total.width()) / 2; + total.y = top + pos * rowHeight + GAP; add( total ); float tw = label.width() + won.width() + total.width(); - label.x = align( (w - tw) / 2 ); + label.x = (w - tw) / 2; won.x = label.x + label.width(); total.x = won.x + won.width(); - label.y = won.y = total.y = align( h - label.height() - GAP ); + label.y = won.y = total.y = h - label.height() - GAP; } @@ -138,8 +138,8 @@ public class RankingsScene extends PixelScene { BitmapText noRec = PixelScene.createText(TXT_NO_GAMES, 8); noRec.hardlight( 0xCCCCCC ); noRec.measure(); - noRec.x = align((w - noRec.width()) / 2); - noRec.y = align((h - noRec.height()) / 2); + noRec.x = (w - noRec.width()) / 2; + noRec.y = (h - noRec.height()) / 2; add(noRec); } @@ -267,29 +267,29 @@ public class RankingsScene extends PixelScene { shield.x = x; shield.y = y + (height - shield.height) / 2; - position.x = align( shield.x + (shield.width - position.width()) / 2 ); - position.y = align( shield.y + (shield.height - position.height()) / 2 + 1 ); + position.x = shield.x + (shield.width - position.width()) / 2; + position.y = shield.y + (shield.height - position.height()) / 2 + 1; if (flare != null) { flare.point( shield.center() ); } - classIcon.x = align(x + width - classIcon.width); + classIcon.x = x + width - classIcon.width; classIcon.y = shield.y; - level.x = align( classIcon.x + (classIcon.width - level.width()) / 2 ); - level.y = align( classIcon.y + (classIcon.height - level.height()) / 2 + 1 ); + level.x = classIcon.x + (classIcon.width - level.width()) / 2; + level.y = classIcon.y + (classIcon.height - level.height()) / 2 + 1; - steps.x = align(x + width - steps.width - classIcon.width); + steps.x = x + width - steps.width - classIcon.width; steps.y = shield.y; - depth.x = align( steps.x + (steps.width - depth.width()) / 2 ); - depth.y = align( steps.y + (steps.height - depth.height()) / 2 + 1 ); + depth.x = steps.x + (steps.width - depth.width()) / 2; + depth.y = steps.y + (steps.height - depth.height()) / 2 + 1; desc.x = shield.x + shield.width + GAP; desc.maxWidth = (int)(steps.x - desc.x); desc.measure(); - desc.y = align( shield.y + (shield.height - desc.height()) / 2 + 1 ); + desc.y = shield.y + (shield.height - desc.height()) / 2 + 1; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java index 1bf7e17c6..456823432 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java @@ -121,8 +121,8 @@ public class StartScene extends PixelScene { add( archs ); Image title = BannerSprites.get( Type.SELECT_YOUR_HERO ); - title.x = align( (w - title.width()) / 2 ); - title.y = align( top ); + title.x = (w - title.width()) / 2; + title.y = top; add( title ); buttonX = left; @@ -215,8 +215,8 @@ public class StartScene extends PixelScene { for (BitmapText line : text.new LineSplitter().split()) { line.measure(); line.hardlight( 0xFFFF00 ); - line.x = PixelScene.align( w / 2 - line.width() / 2 ); - line.y = PixelScene.align( pos ); + line.x = w / 2 - line.width() / 2; + line.y = pos; unlock.add( line ); pos += line.height(); @@ -344,12 +344,12 @@ public class StartScene extends PixelScene { super.layout(); if (secondary.text().length() > 0) { - text.y = align( y + (height - text.height() - secondary.baseLine()) / 2 ); + text.y = y + (height - text.height() - secondary.baseLine()) / 2; - secondary.x = align( x + (width - secondary.width()) / 2 ); - secondary.y = align( text.y + text.height() ); + secondary.x = x + (width - secondary.width()) / 2; + secondary.y = text.y + text.height(); } else { - text.y = align( y + (height - text.baseLine()) / 2 ); + text.y = y + (height - text.baseLine()) / 2; } } @@ -430,10 +430,10 @@ public class StartScene extends PixelScene { super.layout(); - avatar.x = align( x + (width - avatar.width()) / 2 ); - avatar.y = align( y + (height - avatar.height() - name.height()) / 2 ); + avatar.x = x + (width - avatar.width()) / 2; + avatar.y = y + (height - avatar.height() - name.height()) / 2; - name.x = align( x + (width - name.width()) / 2 ); + name.x = x + (width - name.width()) / 2; name.y = avatar.y + avatar.height() + SCALE; emitter.pos( avatar.x, avatar.y, avatar.width(), avatar.height() ); @@ -505,8 +505,8 @@ public class StartScene extends PixelScene { super.layout(); - image.x = align( x ); - image.y = align( y ); + image.x = x; + image.y = y; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java index d4c61d03e..48203cf76 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/SurfaceScene.java @@ -84,8 +84,8 @@ public class SurfaceScene extends PixelScene { archs.setSize( w, h ); add( archs ); - float vx = align( (w - SKY_WIDTH) / 2 ); - float vy = align( (h - SKY_HEIGHT - BUTTON_HEIGHT) / 2 ); + float vx = (w - SKY_WIDTH) / 2; + float vy = (h - SKY_HEIGHT - BUTTON_HEIGHT) / 2; Point s = Camera.main.cameraToScreen( vx, vy ); viewport = new Camera( s.x, s.y, SKY_WIDTH, SKY_HEIGHT, defaultZoom ); @@ -129,7 +129,7 @@ public class SurfaceScene extends PixelScene { Avatar a = new Avatar( Dungeon.hero.heroClass ); // Removing semitransparent contour a.am = 2; a.aa = -1; - a.x = PixelScene.align( (SKY_WIDTH - a.width) / 2 ); + a.x = (SKY_WIDTH - a.width); a.y = SKY_HEIGHT - a.height; window.add( a ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java index ce1e2ae96..2efec2a87 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/TitleScene.java @@ -213,11 +213,11 @@ public class TitleScene extends PixelScene { protected void layout() { super.layout(); - image.x = align( x + (width - image.width()) / 2 ); - image.y = align( y ); + image.x = x + (width - image.width()) / 2; + image.y = y; - label.x = align( x + (width - label.width()) / 2 ); - label.y = align( image.y + image.height() +2 ); + label.x = x + (width - label.width()) / 2; + label.y = image.y + image.height() +2; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java index a9f9a8ff5..a114c876c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/scenes/WelcomeScene.java @@ -138,8 +138,8 @@ public class WelcomeScene extends PixelScene { title.measure(); title.hardlight(Window.SHPX_COLOR); - title.x = align( (w - title.width()) / 2 ); - title.y = align( 8 ); + title.x = (w - title.width()) / 2; + title.y = 8; add( title ); NinePatch panel = Chrome.get(Chrome.Type.WINDOW); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java index 356a37e1a..8a98561dc 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/BadgesList.java @@ -106,10 +106,10 @@ public class BadgesList extends ScrollPane { @Override protected void layout() { icon.x = x; - icon.y = PixelScene.align( y + (height - icon.height) / 2 ); + icon.y = y + (height - icon.height) / 2; label.x = icon.x + icon.width + 2; - label.y = PixelScene.align( y + (height - label.baseLine()) / 2 ); + label.y = y + (height - label.baseLine()) / 2; } public boolean onClick( float x, float y ) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java index 73d7a9e20..c72697c15 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/DangerIndicator.java @@ -69,7 +69,7 @@ public class DangerIndicator extends Tag { private void placeNumber() { number.x = right() - 11 - number.width(); - number.y = PixelScene.align( y + (height - number.baseLine()) / 2 ); + number.y = y + (height - number.baseLine()) / 2; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java index 072c6d7f8..75f0bdf0c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/QuickSlotButton.java @@ -124,8 +124,8 @@ public class QuickSlotButton extends Button implements WndBag.Listener { slot.fill( this ); - crossB.x = PixelScene.align( x + (width - crossB.width) / 2 ); - crossB.y = PixelScene.align( y + (height - crossB.height) / 2 ); + crossB.x = x + (width - crossB.width) / 2; + crossB.y = y + (height - crossB.height) / 2; } @Override @@ -177,8 +177,8 @@ public class QuickSlotButton extends Button implements WndBag.Listener { if (Actor.chars().contains( lastTarget )) { lastTarget.sprite.parent.add( crossM ); crossM.point( DungeonTilemap.tileToWorld( lastTarget.pos ) ); - crossB.x = PixelScene.align( x + (width - crossB.width) / 2 ); - crossB.y = PixelScene.align( y + (height - crossB.height) / 2 ); + crossB.x = x + (width - crossB.width) / 2; + crossB.y = y + (height - crossB.height) / 2; crossB.visible = true; } else { lastTarget = null; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java index c17444a2b..783345f37 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java @@ -185,8 +185,8 @@ public class StatusPane extends Component { lastLvl = Dungeon.hero.lvl; level.text( Integer.toString( lastLvl ) ); level.measure(); - level.x = PixelScene.align( 27.0f - level.width() / 2 ); - level.y = PixelScene.align( 27.5f - level.baseLine() / 2 ); + level.x = 27.0f - level.width() / 2; + level.y = 27.5f - level.baseLine() / 2; } int k = IronKey.curDepthQuantity; diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java index f6f32569c..8d89fa49d 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndBadge.java @@ -53,8 +53,8 @@ public class WndBadge extends Window { float pos = icon.y + icon.height() + MARGIN; for (BitmapText line : info.new LineSplitter().split()) { line.measure(); - line.x = PixelScene.align( (w - line.width()) / 2 ); - line.y = PixelScene.align( pos ); + line.x = (w - line.width()) / 2; + line.y = pos; add( line ); pos += line.height(); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndCatalogus.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndCatalogus.java index 1448083b1..a8991dcf9 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndCatalogus.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndCatalogus.java @@ -184,10 +184,10 @@ public class WndCatalogus extends WndTabbed { @Override protected void layout() { - sprite.y = PixelScene.align( y + (height - sprite.height) / 2 ); + sprite.y = y + (height - sprite.height) / 2; label.x = sprite.x + sprite.width; - label.y = PixelScene.align( y + (height - label.baseLine()) / 2 ); + label.y = y + (height - label.baseLine()) / 2; } public boolean onClick( float x, float y ) { diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java index a723878c5..fc5474fb8 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndHero.java @@ -160,7 +160,7 @@ public class WndHero extends WndTabbed { txt = PixelScene.createText( value, 8 ); txt.measure(); - txt.x = PixelScene.align( WIDTH * 0.65f ); + txt.x = 65; txt.y = pos; add( txt ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java index 0ae0800c7..d8d3058ee 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndJournal.java @@ -118,11 +118,11 @@ public class WndJournal extends Window { icon.x = width - icon.width; depth.x = icon.x - 1 - depth.width(); - depth.y = PixelScene.align( y + (height - depth.height()) / 2 ); + depth.y = y + (height - depth.height()) / 2; icon.y = depth.y - 1; - feature.y = PixelScene.align( depth.y + depth.baseLine() - feature.baseLine() ); + feature.y = depth.y + depth.baseLine() - feature.baseLine(); } } } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java index caa824817..b5ee717c1 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndRanking.java @@ -224,7 +224,7 @@ public class WndRanking extends WndTabbed { txt = PixelScene.createText( value, 7 ); txt.measure(); - txt.x = PixelScene.align( WIDTH * 0.65f ); + txt.x = WIDTH * 0.65f; txt.y = pos; parent.add( txt ); diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java index 045e9f0af..c8858a37c 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndTabbed.java @@ -214,8 +214,8 @@ public class WndTabbed extends Window { protected void layout() { super.layout(); - btLabel.x = PixelScene.align( x + (width - btLabel.width()) / 2 ); - btLabel.y = PixelScene.align( y + (height - btLabel.baseLine()) / 2 ) - 1; + btLabel.x = x + (width - btLabel.width()) / 2; + btLabel.y = y + (height - btLabel.baseLine()) / 2 - 1; if (!selected) { btLabel.y -= 2; }