diff --git a/core/src/main/assets/interfaces/status_pane.png b/core/src/main/assets/interfaces/status_pane.png index 18fa4b94d..30eb2b239 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/CellSelector.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java index 467b5fb9c..d0e4e0bb6 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/CellSelector.java @@ -300,6 +300,7 @@ public class CellSelector extends ScrollArea { Dungeon.observe(); heldTurns++; moveFromAction(heldAction); + Dungeon.hero.ready = false; } } diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/InventoryPane.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/InventoryPane.java index 68478b0d7..f50b5e244 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/InventoryPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/InventoryPane.java @@ -37,6 +37,7 @@ import com.shatteredpixel.shatteredpixeldungeon.items.bags.VelvetPouch; import com.shatteredpixel.shatteredpixeldungeon.items.wands.Wand; import com.shatteredpixel.shatteredpixeldungeon.scenes.PixelScene; import com.shatteredpixel.shatteredpixeldungeon.sprites.ItemSpriteSheet; +import com.shatteredpixel.shatteredpixeldungeon.utils.GLog; import com.shatteredpixel.shatteredpixeldungeon.windows.WndBag; import com.shatteredpixel.shatteredpixeldungeon.windows.WndUseItem; import com.watabou.gltextures.TextureCache; @@ -94,8 +95,6 @@ public class InventoryPane extends Component { @Override protected void createChildren() { - //TODO capture inputs tapped on BG - bg = Chrome.get(Chrome.Type.TOAST_TR); add(bg); @@ -156,6 +155,7 @@ public class InventoryPane extends Component { add(btn); } + lastEnabled = true; updateInventory(); width = WIDTH; @@ -274,6 +274,11 @@ public class InventoryPane extends Component { b.enable(lastEnabled); } + goldTxt.alpha( lastEnabled ? 1f : 0.3f ); + gold.alpha( lastEnabled ? 1f : 0.3f ); + energyTxt.alpha( lastEnabled ? 1f : 0.3f ); + energy.alpha( lastEnabled ? 1f : 0.3f ); + layout(); } @@ -293,6 +298,11 @@ public class InventoryPane extends Component { for (BagButton b : bags){ b.enable(lastEnabled); } + + goldTxt.alpha( lastEnabled ? 1f : 0.3f ); + gold.alpha( lastEnabled ? 1f : 0.3f ); + energyTxt.alpha( lastEnabled ? 1f : 0.3f ); + energy.alpha( lastEnabled ? 1f : 0.3f ); } } 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 c0766bd12..6ec12db96 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java @@ -65,6 +65,7 @@ public class StatusPane extends Component { private Image shieldedHP; private Image hp; private BitmapText hpText; + private Button heroInfoOnBar; private Image exp; private BitmapText expText; @@ -81,7 +82,6 @@ public class StatusPane extends Component { private static String asset = Assets.Interfaces.STATUS; - //TODO improve large mode texturing private boolean large; public StatusPane( boolean large ){ @@ -132,6 +132,15 @@ public class StatusPane extends Component { hpText.alpha(0.6f); add(hpText); + heroInfoOnBar = new Button(){ + @Override + protected void onClick () { + Camera.main.panTo( Dungeon.hero.sprite.center(), 5f ); + GameScene.show( new WndHero() ); + } + }; + add(heroInfoOnBar); + if (large) exp = new Image(asset, 0, 121, 128, 7); else exp = new Image(asset, 0, 44, 16, 1); add( exp ); @@ -172,7 +181,7 @@ public class StatusPane extends Component { avatar.y = bg.y - avatar.height / 2f + (large ? 15 : 16); PixelScene.align(avatar); - heroInfo.setRect( x, y+(large ? 0 : 1), 30, 30 ); + heroInfo.setRect( x, y+(large ? 0 : 1), 30, large ? 40 : 30 ); compass.x = avatar.x + avatar.width / 2f - compass.origin.x; compass.y = avatar.y + avatar.height / 2f - compass.origin.y; @@ -193,6 +202,8 @@ public class StatusPane extends Component { expText.y = exp.y; PixelScene.align(expText); + heroInfoOnBar.setRect(heroInfo.right(), y + 19, 130, 20); + buffs.setPos( x + 31, y ); busy.x = x + bg.width + 1; @@ -210,6 +221,8 @@ public class StatusPane extends Component { hpText.y -= 0.001f; //prefer to be slightly higher PixelScene.align(hpText); + heroInfoOnBar.setRect(heroInfo.right(), y, 50, 9); + buffs.setPos( x + 31, y + 9 ); busy.x = x + 1; @@ -305,7 +318,7 @@ public class StatusPane extends Component { public void showStarParticles(){ Emitter emitter = (Emitter)recycle( Emitter.class ); emitter.revive(); - emitter.pos( 27, 27 ); + emitter.pos( avatar.center() ); emitter.burst( Speck.factory( Speck.STAR ), 12 ); }