Pools replace with Pooling / Removed all core reflection
This commit is contained in:
@@ -5,7 +5,6 @@ import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import com.badlogic.gdx.utils.Array;
|
||||
import com.badlogic.gdx.utils.Pools;
|
||||
import io.anuke.mindustry.Vars;
|
||||
import io.anuke.mindustry.core.Platform;
|
||||
import io.anuke.ucore.core.Core;
|
||||
@@ -18,6 +17,7 @@ import io.anuke.ucore.scene.ui.layout.Table;
|
||||
import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
import io.anuke.ucore.scene.utils.UIUtils;
|
||||
import io.anuke.ucore.util.OS;
|
||||
import io.anuke.ucore.util.Pooling;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
@@ -186,7 +186,7 @@ public class FileChooser extends FloatingDialog{
|
||||
//if is mac, don't display extra info since you can only ever go to downloads
|
||||
navigation.setText(OS.isMac ? directory.name() : directory.toString());
|
||||
|
||||
GlyphLayout layout = Pools.obtain(GlyphLayout.class);
|
||||
GlyphLayout layout = Pooling.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||
|
||||
layout.setText(Core.font, navigation.getText());
|
||||
|
||||
@@ -196,7 +196,7 @@ public class FileChooser extends FloatingDialog{
|
||||
navigation.setCursorPosition(navigation.getText().length());
|
||||
}
|
||||
|
||||
Pools.free(layout);
|
||||
Pooling.free(layout);
|
||||
|
||||
files.clearChildren();
|
||||
files.top().left();
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import com.badlogic.gdx.utils.reflect.ClassReflection;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.game.Saves.SaveSlot;
|
||||
import io.anuke.ucore.core.Timers;
|
||||
@@ -55,7 +54,7 @@ public class SaveDialog extends LoadDialog{
|
||||
e.printStackTrace();
|
||||
e = (e.getCause() == null ? e : e.getCause());
|
||||
|
||||
ui.showError("[orange]" + Bundles.get("text.savefail") + "\n[white]" + ClassReflection.getSimpleName(e.getClass()) + ": " + e.getMessage() + "\n" + "at " + e.getStackTrace()[0].getFileName() + ":" + e.getStackTrace()[0].getLineNumber());
|
||||
ui.showError("[orange]" + Bundles.get("text.savefail"));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user