Cleanup
This commit is contained in:
@@ -268,7 +268,7 @@ public class NetClient implements ApplicationListener{
|
|||||||
|
|
||||||
@Remote(variants = Variant.both)
|
@Remote(variants = Variant.both)
|
||||||
public static void onInfoToast(String message, float duration){
|
public static void onInfoToast(String message, float duration){
|
||||||
ui.showInfoFadeBg(message, duration);
|
ui.showInfoToast(message, duration);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Remote(variants = Variant.both)
|
@Remote(variants = Variant.both)
|
||||||
|
|||||||
@@ -289,9 +289,14 @@ public class UI implements ApplicationListener, Loadable{
|
|||||||
Core.scene.add(table);
|
Core.scene.add(table);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showInfoFadeBg(String info, float duration){
|
public void showInfoToast(String info, float duration){
|
||||||
Table table = new Table();
|
Table table = new Table();
|
||||||
table.setFillParent(true);
|
table.setFillParent(true);
|
||||||
|
table.update(() -> {
|
||||||
|
if(state.is(State.menu)){
|
||||||
|
table.remove();
|
||||||
|
}
|
||||||
|
});
|
||||||
table.actions(Actions.delay(duration * 0.9f), Actions.fadeOut(duration * 0.1f, Interpolation.fade), Actions.remove());
|
table.actions(Actions.delay(duration * 0.9f), Actions.fadeOut(duration * 0.1f, Interpolation.fade), Actions.remove());
|
||||||
table.top().table(Styles.black3, t -> t.margin(4).add(info).style(Styles.outlineLabel)).padTop(10);
|
table.top().table(Styles.black3, t -> t.margin(4).add(info).style(Styles.outlineLabel)).padTop(10);
|
||||||
Core.scene.add(table);
|
Core.scene.add(table);
|
||||||
|
|||||||
Reference in New Issue
Block a user