From b2f5fd612341807615ed993c337d44287b4431a3 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 8 Apr 2015 00:23:12 -0400 Subject: [PATCH] v0.3.0: improved buff tapping for small screens --- .../shatteredpixeldungeon/ui/BuffIndicator.java | 6 +++--- .../shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java | 4 ++-- .../shatteredpixeldungeon/windows/WndInfoMob.java | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java index 274d94a31..26b198ced 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/BuffIndicator.java @@ -117,7 +117,7 @@ public class BuffIndicator extends Component { for (Buff buff : ch.buffs()) { if (buff.icon() != NONE) { BuffIcon icon = new BuffIcon( buff ); - icon.setRect(x + members.size() * (SIZE + 2), y, 7, 7); + icon.setRect(x + members.size() * (SIZE + 2), y, 9, 12); add(icon); newIcons.put( buff.icon(), icon ); } @@ -159,8 +159,8 @@ public class BuffIndicator extends Component { @Override protected void layout() { super.layout(); - icon.x = this.x; - icon.y = this.y; + icon.x = this.x+1; + icon.y = this.y+2; } @Override diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java b/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java index 2336f7e0b..b9b028bbc 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/ui/StatusPane.java @@ -68,7 +68,7 @@ public class StatusPane extends Component { shield = new NinePatch( Assets.STATUS, 80, 0, 30 + 18, 0 ); add( shield ); - add( new TouchArea( 0, 1, 30, 30 ) { + add( new TouchArea( 0, 1, 31, 31 ) { @Override protected void onClick( Touch touch ) { Image sprite = Dungeon.hero.sprite; @@ -145,7 +145,7 @@ public class StatusPane extends Component { danger.setPos( width - danger.width(), 18 ); - buffs.setPos( 32, 11 ); + buffs.setPos( 31, 9 ); btnMenu.setPos( width - btnMenu.width(), 1 ); } diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java index 91ccec53f..882266df0 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/WndInfoMob.java @@ -84,8 +84,8 @@ public class WndInfoMob extends WndTitledMessage { health.setRect(image.width + GAP, image.height - health.height(), w, health.height()); buffs.setPos( - name.x + name.width() + GAP, - name.y + name.baseLine() - BuffIndicator.SIZE ); + name.x + name.width() + GAP-1, + name.y + name.baseLine() - BuffIndicator.SIZE-2 ); height = health.bottom(); }