v0.3.5: fixes for action indicator
This commit is contained in:
parent
83711cc836
commit
1882bd4640
|
@ -20,6 +20,13 @@ public class ActionIndicator extends Tag {
|
||||||
visible = false;
|
visible = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void destroy() {
|
||||||
|
super.destroy();
|
||||||
|
instance = null;
|
||||||
|
action = null;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void layout() {
|
protected void layout() {
|
||||||
super.layout();
|
super.layout();
|
||||||
|
@ -28,6 +35,8 @@ public class ActionIndicator extends Tag {
|
||||||
icon.x = x + (width - icon.width()) / 2;
|
icon.x = x + (width - icon.width()) / 2;
|
||||||
icon.y = y + (height - icon.height()) / 2;
|
icon.y = y + (height - icon.height()) / 2;
|
||||||
PixelScene.align(icon);
|
PixelScene.align(icon);
|
||||||
|
if (!members.contains(icon))
|
||||||
|
add(icon);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -43,6 +52,7 @@ public class ActionIndicator extends Tag {
|
||||||
|
|
||||||
if (!visible && action != null){
|
if (!visible && action != null){
|
||||||
visible = true;
|
visible = true;
|
||||||
|
updateIcon();
|
||||||
flash();
|
flash();
|
||||||
} else {
|
} else {
|
||||||
visible = action != null;
|
visible = action != null;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user