mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-08 23:07:33 +07:00
autoclip
This commit is contained in:
@ -48,8 +48,6 @@ public class DesktopPlatform extends Platform{
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(useSteam){
|
if(useSteam){
|
||||||
|
|
||||||
|
|
||||||
Events.on(GameLoadEvent.class, event -> {
|
Events.on(GameLoadEvent.class, event -> {
|
||||||
Label[] label = {null};
|
Label[] label = {null};
|
||||||
Core.scene.table(t -> {
|
Core.scene.table(t -> {
|
||||||
@ -65,12 +63,17 @@ public class DesktopPlatform extends Platform{
|
|||||||
public void print(String text, Object... args){
|
public void print(String text, Object... args){
|
||||||
super.print(text, args);
|
super.print(text, args);
|
||||||
String out = Log.format(text, false, 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].getText().append(out).append("\n");
|
||||||
label[0].invalidateHierarchy();
|
label[0].invalidateHierarchy();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Vars.steam = true;
|
Vars.steam = true;
|
||||||
|
Reference in New Issue
Block a user