Optimize wait/message (#9086)
* add `IExecutor.yield` to optimize `wait` * add MessageType.label. and add outSuccess * remove `MessageType.label` in support `marks` * amend * amend
This commit is contained in:
@@ -1425,7 +1425,7 @@ public class LStatements{
|
||||
@RegisterStatement("message")
|
||||
public static class FlushMessageStatement extends LStatement{
|
||||
public MessageType type = MessageType.announce;
|
||||
public String duration = "3";
|
||||
public String duration = "3", outSuccess = "success";
|
||||
|
||||
@Override
|
||||
public void build(Table table){
|
||||
@@ -1444,12 +1444,14 @@ public class LStatements{
|
||||
}, Styles.logict, () -> {}).size(160f, 40f).padLeft(2).color(table.color);
|
||||
|
||||
switch(type){
|
||||
case announce, toast -> {
|
||||
case announce, toast -> {
|
||||
table.add(" for ");
|
||||
fields(table, duration, str -> duration = str);
|
||||
table.add(" secs ");
|
||||
}
|
||||
}
|
||||
table.add(" success ");
|
||||
fields(table, outSuccess, str -> outSuccess = str);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1459,7 +1461,7 @@ public class LStatements{
|
||||
|
||||
@Override
|
||||
public LInstruction build(LAssembler builder){
|
||||
return new FlushMessageI(type, builder.var(duration));
|
||||
return new FlushMessageI(type, builder.var(duration), builder.var(outSuccess));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user