v2.0.2: further small improvements to action indicator for Monk
This commit is contained in:
+6
-2
@@ -261,14 +261,18 @@ public class MonkEnergy extends Buff implements ActionIndicator.Action {
|
|||||||
public Visual secondaryVisual() {
|
public Visual secondaryVisual() {
|
||||||
BitmapText txt = new BitmapText(PixelScene.pixelFont);
|
BitmapText txt = new BitmapText(PixelScene.pixelFont);
|
||||||
txt.text( Integer.toString((int)energy) );
|
txt.text( Integer.toString((int)energy) );
|
||||||
if (abilitiesEmpowered(Dungeon.hero)) txt.hardlight(CharSprite.POSITIVE);
|
txt.hardlight(CharSprite.POSITIVE);
|
||||||
txt.measure();
|
txt.measure();
|
||||||
return txt;
|
return txt;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int indicatorColor() {
|
public int indicatorColor() {
|
||||||
return 0xA08840;
|
if (abilitiesEmpowered(Dungeon.hero)){
|
||||||
|
return 0x99CC33;
|
||||||
|
} else {
|
||||||
|
return 0xA08840;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -285,6 +285,7 @@ public class BuffIndicator extends Component {
|
|||||||
//round up to the nearest pixel if <50% faded, otherwise round down
|
//round up to the nearest pixel if <50% faded, otherwise round down
|
||||||
if (!large || buff.iconTextDisplay().isEmpty()) {
|
if (!large || buff.iconTextDisplay().isEmpty()) {
|
||||||
text.visible = false;
|
text.visible = false;
|
||||||
|
grey.visible = true;
|
||||||
float fadeHeight = buff.iconFadePercent() * icon.height();
|
float fadeHeight = buff.iconFadePercent() * icon.height();
|
||||||
float zoom = (camera() != null) ? camera().zoom : 1;
|
float zoom = (camera() != null) ? camera().zoom : 1;
|
||||||
if (fadeHeight < icon.height() / 2f) {
|
if (fadeHeight < icon.height() / 2f) {
|
||||||
@@ -293,6 +294,7 @@ public class BuffIndicator extends Component {
|
|||||||
grey.scale.set(icon.width(), (float) Math.floor(zoom * fadeHeight) / zoom);
|
grey.scale.set(icon.width(), (float) Math.floor(zoom * fadeHeight) / zoom);
|
||||||
}
|
}
|
||||||
} else if (!buff.iconTextDisplay().isEmpty()) {
|
} else if (!buff.iconTextDisplay().isEmpty()) {
|
||||||
|
text.visible = true;
|
||||||
grey.visible = false;
|
grey.visible = false;
|
||||||
if (buff.type == Buff.buffType.POSITIVE) text.hardlight(CharSprite.POSITIVE);
|
if (buff.type == Buff.buffType.POSITIVE) text.hardlight(CharSprite.POSITIVE);
|
||||||
else if (buff.type == Buff.buffType.NEGATIVE) text.hardlight(CharSprite.NEGATIVE);
|
else if (buff.type == Buff.buffType.NEGATIVE) text.hardlight(CharSprite.NEGATIVE);
|
||||||
|
|||||||
Reference in New Issue
Block a user