v1.4.0: adjusted buff bar layout and added max width
This commit is contained in:
@@ -113,6 +113,7 @@ import com.watabou.utils.Random;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
public abstract class Char extends Actor {
|
||||
|
||||
@@ -143,7 +144,7 @@ public abstract class Char extends Actor {
|
||||
|
||||
public boolean[] fieldOfView = null;
|
||||
|
||||
private HashSet<Buff> buffs = new HashSet<>();
|
||||
private LinkedHashSet<Buff> buffs = new LinkedHashSet<>();
|
||||
|
||||
@Override
|
||||
protected boolean act() {
|
||||
@@ -715,8 +716,8 @@ public abstract class Char extends Actor {
|
||||
super.spend( time / timeScale );
|
||||
}
|
||||
|
||||
public synchronized HashSet<Buff> buffs() {
|
||||
return new HashSet<>(buffs);
|
||||
public synchronized LinkedHashSet<Buff> buffs() {
|
||||
return new LinkedHashSet<>(buffs);
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
||||
@@ -143,7 +143,7 @@ public class BossHealthBar extends Component {
|
||||
bossInfo.setRect(x, y, bar.width, bar.height);
|
||||
|
||||
if (buffs != null) {
|
||||
buffs.setRect(hp.x, hp.y + 5, 110, 7);
|
||||
buffs.setRect(hp.x, hp.y + 5, 47, 8);
|
||||
}
|
||||
|
||||
skull.x = bar.x+5;
|
||||
|
||||
@@ -203,9 +203,11 @@ public class BuffIndicator extends Component {
|
||||
for (BuffButton icon : buffButtons.values()){
|
||||
icon.updateIcon();
|
||||
//button areas are slightly oversized, especially on small buttons
|
||||
icon.setRect(x + pos * (size + (large ? 1 : 2)), y, size + (large ? 1 : 2), size + (large ? 0 : 5));
|
||||
icon.setRect(x + pos * (size + 1), y, size + 1, size + (large ? 0 : 5));
|
||||
PixelScene.align(icon);
|
||||
pos++;
|
||||
|
||||
icon.visible = icon.left() <= right();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ public class StatusPane extends Component {
|
||||
|
||||
heroInfoOnBar.setRect(heroInfo.right(), y + 19, 130, 20);
|
||||
|
||||
buffs.setPos( x + 31, y );
|
||||
buffs.setRect(x + 31, y, 128, 16);
|
||||
|
||||
busy.x = x + bg.width + 1;
|
||||
busy.y = y + bg.height - 9;
|
||||
@@ -226,7 +226,7 @@ public class StatusPane extends Component {
|
||||
|
||||
heroInfoOnBar.setRect(heroInfo.right(), y, 50, 9);
|
||||
|
||||
buffs.setPos( x + 31, y + 9 );
|
||||
buffs.setRect( x + 31, y + 9, 50, 8 );
|
||||
|
||||
busy.x = x + 1;
|
||||
busy.y = y + 33;
|
||||
|
||||
@@ -78,9 +78,11 @@ public class WndInfoMob extends WndTitledMessage {
|
||||
|
||||
health.setRect(image.width() + GAP, name.bottom() + GAP, w, health.height());
|
||||
|
||||
buffs.setPos(
|
||||
buffs.setRect(
|
||||
name.right() + GAP-1,
|
||||
name.bottom() - BuffIndicator.SIZE_SMALL-2
|
||||
name.bottom() - BuffIndicator.SIZE_SMALL-2,
|
||||
w,
|
||||
8
|
||||
);
|
||||
|
||||
height = health.bottom();
|
||||
|
||||
Reference in New Issue
Block a user