v0.3.4a: re-added align methods pt.2
Also moved rendered text multiline into the core game
This commit is contained in:
committed by
Evan Debenham
parent
ac9c50f2ac
commit
b110c0db8c
@@ -20,17 +20,17 @@
|
||||
*/
|
||||
package com.shatteredpixel.shatteredpixeldungeon.scenes;
|
||||
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Assets;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.Dungeon;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Flare;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.effects.Speck;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.items.Amulet;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.messages.Messages;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RedButton;
|
||||
import com.watabou.noosa.RenderedTextMultiline;
|
||||
import com.shatteredpixel.shatteredpixeldungeon.ui.RenderedTextMultiline;
|
||||
import com.watabou.noosa.Camera;
|
||||
import com.watabou.noosa.Game;
|
||||
import com.watabou.noosa.Image;
|
||||
import com.watabou.utils.Random;
|
||||
|
||||
public class AmuletScene extends PixelScene {
|
||||
@@ -84,7 +84,8 @@ public class AmuletScene extends PixelScene {
|
||||
|
||||
amulet.x = (Camera.main.width - amulet.width) / 2;
|
||||
amulet.y = (Camera.main.height - height) / 2;
|
||||
|
||||
align(amulet);
|
||||
|
||||
btnExit.setPos( (Camera.main.width - btnExit.width()) / 2, amulet.y + amulet.height + LARGE_GAP );
|
||||
btnStay.setPos( btnExit.left(), btnExit.bottom() + SMALL_GAP );
|
||||
|
||||
@@ -93,8 +94,10 @@ public class AmuletScene extends PixelScene {
|
||||
|
||||
amulet.x = (Camera.main.width - amulet.width) / 2;
|
||||
amulet.y = (Camera.main.height - height) / 2;
|
||||
align(amulet);
|
||||
|
||||
text.setPos((Camera.main.width - text.width()) / 2, amulet.y + amulet.height + LARGE_GAP);
|
||||
align(text);
|
||||
|
||||
btnExit.setPos( (Camera.main.width - btnExit.width()) / 2, text.top() + text.height() + LARGE_GAP );
|
||||
btnStay.setPos( btnExit.left(), btnExit.bottom() + SMALL_GAP );
|
||||
|
||||
Reference in New Issue
Block a user