UI cleanup
This commit is contained in:
@@ -69,14 +69,14 @@ public class HudFragment extends Fragment{
|
||||
|
||||
//paused table
|
||||
parent.fill(t -> {
|
||||
t.top().visible(() -> state.isPaused() && !state.isOutOfTime()).touchable(Touchable.disabled);
|
||||
t.top().visible(() -> state.isPaused() && !state.isOutOfTime()).touchable = Touchable.disabled;
|
||||
t.table(Styles.black5, top -> top.add("$paused").style(Styles.outlineLabel).pad(8f)).growX();
|
||||
});
|
||||
|
||||
//TODO tear this all down
|
||||
//menu at top left
|
||||
parent.fill(cont -> {
|
||||
cont.setName("overlaymarker");
|
||||
cont.name = "overlaymarker";
|
||||
cont.top().left();
|
||||
|
||||
if(mobile){
|
||||
@@ -189,7 +189,7 @@ public class HudFragment extends Fragment{
|
||||
|
||||
//fps display
|
||||
cont.table(info -> {
|
||||
info.touchable(Touchable.disabled);
|
||||
info.touchable = Touchable.disabled;
|
||||
info.top().left().margin(4).visible(() -> Core.settings.getBool("fps") && shown);
|
||||
info.update(() -> info.setTranslation(state.rules.waves || state.isEditor() ? 0f : -Scl.scl(dsize * 4 + 3), 0));
|
||||
IntFormat fps = new IntFormat("fps");
|
||||
@@ -221,7 +221,7 @@ public class HudFragment extends Fragment{
|
||||
|
||||
//spawner warning
|
||||
parent.fill(t -> {
|
||||
t.touchable(Touchable.disabled);
|
||||
t.touchable = Touchable.disabled;
|
||||
t.table(Styles.black, c -> c.add("$nearpoint")
|
||||
.update(l -> l.setColor(Tmp.c1.set(Color.white).lerp(Color.scarlet, Mathf.absin(Time.time(), 10f, 1f))))
|
||||
.get().setAlignment(Align.center, Align.center))
|
||||
@@ -235,7 +235,7 @@ public class HudFragment extends Fragment{
|
||||
|
||||
//'core is under attack' table
|
||||
parent.fill(t -> {
|
||||
t.touchable(Touchable.disabled);
|
||||
t.touchable = Touchable.disabled;
|
||||
float notifDuration = 240f;
|
||||
float[] coreAttackTime = {0};
|
||||
float[] coreAttackOpacity = {0};
|
||||
@@ -250,7 +250,7 @@ public class HudFragment extends Fragment{
|
||||
return false;
|
||||
}
|
||||
|
||||
t.getColor().a = coreAttackOpacity[0];
|
||||
t.color.a = coreAttackOpacity[0];
|
||||
if(coreAttackTime[0] > 0){
|
||||
coreAttackOpacity[0] = Mathf.lerpDelta(coreAttackOpacity[0], 1f, 0.1f);
|
||||
}else{
|
||||
@@ -262,7 +262,7 @@ public class HudFragment extends Fragment{
|
||||
return coreAttackOpacity[0] > 0;
|
||||
});
|
||||
t.table(Tex.button, top -> top.add("$coreattack").pad(2)
|
||||
.update(label -> label.getColor().set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time(), 2f, 1f)))).touchable(Touchable.disabled);
|
||||
.update(label -> label.color.set(Color.orange).lerp(Color.scarlet, Mathf.absin(Time.time(), 2f, 1f)))).touchable(Touchable.disabled);
|
||||
});
|
||||
|
||||
//paused table for when the player is out of time
|
||||
@@ -324,7 +324,7 @@ public class HudFragment extends Fragment{
|
||||
showHudText = false;
|
||||
}
|
||||
});
|
||||
p.touchable(Touchable.disabled);
|
||||
p.touchable = Touchable.disabled;
|
||||
});
|
||||
|
||||
//TODO DEBUG: rate table
|
||||
@@ -519,7 +519,7 @@ public class HudFragment extends Fragment{
|
||||
|
||||
public void showLaunchDirect(){
|
||||
Image image = new Image();
|
||||
image.getColor().a = 0f;
|
||||
image.color.a = 0f;
|
||||
image.setFillParent(true);
|
||||
image.actions(Actions.fadeIn(launchDuration / 60f, Interp.pow2In), Actions.delay(8f / 60f), Actions.remove());
|
||||
Core.scene.add(image);
|
||||
@@ -527,7 +527,7 @@ public class HudFragment extends Fragment{
|
||||
|
||||
public void showLaunch(){
|
||||
Image image = new Image();
|
||||
image.getColor().a = 0f;
|
||||
image.color.a = 0f;
|
||||
image.setFillParent(true);
|
||||
image.actions(Actions.fadeIn(40f / 60f));
|
||||
image.update(() -> {
|
||||
@@ -540,8 +540,8 @@ public class HudFragment extends Fragment{
|
||||
|
||||
public void showLand(){
|
||||
Image image = new Image();
|
||||
image.getColor().a = 1f;
|
||||
image.touchable(Touchable.disabled);
|
||||
image.color.a = 1f;
|
||||
image.touchable = Touchable.disabled;
|
||||
image.setFillParent(true);
|
||||
image.actions(Actions.fadeOut(0.8f), Actions.remove());
|
||||
image.update(() -> {
|
||||
@@ -614,11 +614,11 @@ public class HudFragment extends Fragment{
|
||||
});
|
||||
|
||||
table.clearChildren();
|
||||
table.touchable(Touchable.enabled);
|
||||
table.touchable = Touchable.enabled;
|
||||
|
||||
StringBuilder builder = new StringBuilder();
|
||||
|
||||
table.setName("waves");
|
||||
table.name = "waves";
|
||||
table.labelWrap(() -> {
|
||||
builder.setLength(0);
|
||||
builder.append(wavef.get(state.wave));
|
||||
|
||||
Reference in New Issue
Block a user