v0.3.0: improved buff tapping for small screens
This commit is contained in:
@@ -117,7 +117,7 @@ public class BuffIndicator extends Component {
|
|||||||
for (Buff buff : ch.buffs()) {
|
for (Buff buff : ch.buffs()) {
|
||||||
if (buff.icon() != NONE) {
|
if (buff.icon() != NONE) {
|
||||||
BuffIcon icon = new BuffIcon( buff );
|
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);
|
add(icon);
|
||||||
newIcons.put( buff.icon(), icon );
|
newIcons.put( buff.icon(), icon );
|
||||||
}
|
}
|
||||||
@@ -159,8 +159,8 @@ public class BuffIndicator extends Component {
|
|||||||
@Override
|
@Override
|
||||||
protected void layout() {
|
protected void layout() {
|
||||||
super.layout();
|
super.layout();
|
||||||
icon.x = this.x;
|
icon.x = this.x+1;
|
||||||
icon.y = this.y;
|
icon.y = this.y+2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class StatusPane extends Component {
|
|||||||
shield = new NinePatch( Assets.STATUS, 80, 0, 30 + 18, 0 );
|
shield = new NinePatch( Assets.STATUS, 80, 0, 30 + 18, 0 );
|
||||||
add( shield );
|
add( shield );
|
||||||
|
|
||||||
add( new TouchArea( 0, 1, 30, 30 ) {
|
add( new TouchArea( 0, 1, 31, 31 ) {
|
||||||
@Override
|
@Override
|
||||||
protected void onClick( Touch touch ) {
|
protected void onClick( Touch touch ) {
|
||||||
Image sprite = Dungeon.hero.sprite;
|
Image sprite = Dungeon.hero.sprite;
|
||||||
@@ -145,7 +145,7 @@ public class StatusPane extends Component {
|
|||||||
|
|
||||||
danger.setPos( width - danger.width(), 18 );
|
danger.setPos( width - danger.width(), 18 );
|
||||||
|
|
||||||
buffs.setPos( 32, 11 );
|
buffs.setPos( 31, 9 );
|
||||||
|
|
||||||
btnMenu.setPos( width - btnMenu.width(), 1 );
|
btnMenu.setPos( width - btnMenu.width(), 1 );
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -84,8 +84,8 @@ public class WndInfoMob extends WndTitledMessage {
|
|||||||
health.setRect(image.width + GAP, image.height - health.height(), w, health.height());
|
health.setRect(image.width + GAP, image.height - health.height(), w, health.height());
|
||||||
|
|
||||||
buffs.setPos(
|
buffs.setPos(
|
||||||
name.x + name.width() + GAP,
|
name.x + name.width() + GAP-1,
|
||||||
name.y + name.baseLine() - BuffIndicator.SIZE );
|
name.y + name.baseLine() - BuffIndicator.SIZE-2 );
|
||||||
|
|
||||||
height = health.bottom();
|
height = health.bottom();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user