v0.6.1: fixed quickslots not updating properly when item glow changes

This commit is contained in:
Evan Debenham 2017-08-04 23:23:00 -04:00
parent 2dabf54a5d
commit 0588036643
2 changed files with 10 additions and 4 deletions

View File

@ -195,9 +195,7 @@ public class ItemSprite extends MovieClip {
if (this.emitter != null) this.emitter.killAndErase();
emitter = null;
frame( image );
if ((this.glowing = glowing) == null) {
resetColor();
}
glow( glowing );
return this;
}
@ -211,6 +209,11 @@ public class ItemSprite extends MovieClip {
}
}
public void glow( Glowing glowing ){
this.glowing = glowing;
if (glowing == null) resetColor();
}
@Override
public void kill() {
super.kill();

View File

@ -154,7 +154,10 @@ public class ItemSlot extends Button {
public void item( Item item ) {
if (this.item == item) {
if (item != null) icon.frame(item.image());
if (item != null) {
icon.frame(item.image());
icon.glow(item.glowing());
}
updateText();
return;
}