mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-03-13 03:20:32 +07:00
autoclip
This commit is contained in:
parent
b360a39fcf
commit
0d8748a6ce
@ -48,8 +48,6 @@ public class DesktopPlatform extends Platform{
|
||||
}
|
||||
|
||||
if(useSteam){
|
||||
|
||||
|
||||
Events.on(GameLoadEvent.class, event -> {
|
||||
Label[] label = {null};
|
||||
Core.scene.table(t -> {
|
||||
@ -65,12 +63,17 @@ public class DesktopPlatform extends Platform{
|
||||
public void print(String text, Object... args){
|
||||
super.print(text, args);
|
||||
String out = Log.format(text, false, args);
|
||||
|
||||
int maxlen = 2048;
|
||||
|
||||
if(label[0].getText().length() > maxlen){
|
||||
label[0].setText(label[0].getText().substring(label[0].getText().length() - maxlen));
|
||||
}
|
||||
|
||||
label[0].getText().append(out).append("\n");
|
||||
label[0].invalidateHierarchy();
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
Vars.steam = true;
|
||||
|
Loading…
Reference in New Issue
Block a user