heck
This commit is contained in:
@@ -2,6 +2,7 @@ package io.anuke.mindustry.mapeditor;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
import com.badlogic.gdx.Gdx;
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.graphics.Pixmap;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
@@ -67,6 +68,7 @@ public class MapEditorDialog extends Dialog{
|
||||
Vars.ui.showLoading();
|
||||
Timers.run(3f, () -> {
|
||||
try{
|
||||
Gdx.app.error("MINDUSTRYAAAAAAAAAA", "Saving to file: " + result.toString() + " " + result.type());
|
||||
Pixmaps.write(editor.pixmap(), result);
|
||||
}catch (Exception e){
|
||||
Vars.ui.showError("Error saving image file!");
|
||||
@@ -150,7 +152,7 @@ public class MapEditorDialog extends Dialog{
|
||||
public void build(){
|
||||
|
||||
new table(){{
|
||||
float isize = Unit.dp.inPixels(14*3f);
|
||||
float isize = Unit.dp.inPixels(16*2f);
|
||||
aleft();
|
||||
|
||||
new table(){{
|
||||
@@ -163,37 +165,37 @@ public class MapEditorDialog extends Dialog{
|
||||
|
||||
row();
|
||||
|
||||
new imagebutton("icon-cursor", 10f*3f, () -> {
|
||||
new imagebutton("icon-resize", isize, () -> {
|
||||
resizeDialog.show();
|
||||
}).text("resize").padTop(4f);
|
||||
|
||||
row();
|
||||
|
||||
new imagebutton("icon-load", isize, () -> {
|
||||
new imagebutton("icon-load-map", isize, () -> {
|
||||
loadDialog.show();
|
||||
}).text("load map");
|
||||
|
||||
row();
|
||||
|
||||
new imagebutton("icon-save", isize, ()->{
|
||||
new imagebutton("icon-save-map", isize, ()->{
|
||||
saveDialog.show();
|
||||
}).text("save map");
|
||||
|
||||
row();
|
||||
|
||||
new imagebutton("icon-load", isize, () -> {
|
||||
new imagebutton("icon-load-image", isize, () -> {
|
||||
openFile.show();
|
||||
}).text("load image");
|
||||
|
||||
row();
|
||||
|
||||
new imagebutton("icon-save", isize, () -> {
|
||||
new imagebutton("icon-save-image", isize, () -> {
|
||||
saveFile.show();
|
||||
}).text("save image");
|
||||
|
||||
row();
|
||||
|
||||
new imagebutton("icon-arrow-left", isize, () -> {
|
||||
new imagebutton("icon-back", isize, () -> {
|
||||
if(!saved){
|
||||
Vars.ui.showConfirm("Confirm Exit", "[scarlet]You have unsaved changes![]\nAre you sure you want to exit?", () -> hide());
|
||||
}else{
|
||||
|
||||
@@ -24,7 +24,7 @@ import io.anuke.ucore.scene.ui.layout.Unit;
|
||||
public class FileChooser extends FloatingDialog{
|
||||
|
||||
private Table files;
|
||||
private FileHandle homeDirectory = Gdx.files.local(Gdx.files.getExternalStoragePath());
|
||||
private FileHandle homeDirectory = Gdx.files.absolute(Gdx.files.getExternalStoragePath());
|
||||
private FileHandle directory = homeDirectory;
|
||||
private ScrollPane pane;
|
||||
private TextField navigation, filefield;
|
||||
|
||||
@@ -65,7 +65,7 @@ public class MenuFragment implements Fragment{
|
||||
|
||||
row();
|
||||
|
||||
new imagebutton("icon-terrain", isize, () -> ui.showEditor()).text("Editor").padTop(4f);
|
||||
new imagebutton("icon-editor", isize, () -> ui.showEditor()).text("Editor").padTop(4f);
|
||||
|
||||
new imagebutton("icon-tools", isize, () -> ui.showPrefs()).text("Settings").padTop(4f);
|
||||
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
import io.anuke.ucore.scene.Action;
|
||||
|
||||
public interface ActionProvider{
|
||||
public Action get();
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface BiConsumer<T, N>{
|
||||
public void accept(T t, N n);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
|
||||
public interface BoundingBoxProvider<T>{
|
||||
public void getBoundingBox(T type, Rectangle out);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
import io.anuke.ucore.scene.ui.TextButton;
|
||||
|
||||
public interface ButtonTweaker{
|
||||
public void tweak(TextButton button);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface Callable{
|
||||
public void run();
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface CheckListenable{
|
||||
public void listen(boolean checked);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
|
||||
public interface ColorListenable{
|
||||
public void changed(Color color);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface Consumer<T>{
|
||||
public void accept(T t);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
import com.badlogic.gdx.utils.Pool.Poolable;
|
||||
|
||||
public class DelayRun implements Poolable{
|
||||
public float delay;
|
||||
public Callable run;
|
||||
public Callable finish;
|
||||
|
||||
@Override
|
||||
public void reset(){
|
||||
delay = 0;
|
||||
run = finish = null;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
import com.badlogic.gdx.graphics.Color;
|
||||
|
||||
import io.anuke.ucore.core.Effects.Effect;
|
||||
|
||||
public interface EffectProvider{
|
||||
public void createEffect(Effect effect, Color color, float x, float y, float rotation);
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
import io.anuke.ucore.core.Effects.EffectContainer;
|
||||
|
||||
public interface EffectRenderer{
|
||||
public void render(EffectContainer effect);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface Event{
|
||||
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface FieldListenable{
|
||||
public void listen(String text);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface ISegmentConsumer{
|
||||
public void accept(int x, int y, int x2, int y2);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface KeyListenable{
|
||||
public void pressed(int key);
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
/**Listener lambda class.*/
|
||||
public interface Listenable{
|
||||
public void listen();
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface PositionConsumer{
|
||||
public void accept(float x, float y);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface Predicate<T>{
|
||||
public boolean test(T t);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface SegmentConsumer{
|
||||
public void accept(float x, float y, float x2, float y2);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface StringProcessor{
|
||||
public String get(int i);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface StringSupplier{
|
||||
public String get();
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface Supplier<T>{
|
||||
public T get();
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface TileCollider{
|
||||
public boolean solid(int x, int y);
|
||||
}
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
|
||||
public interface TileHitboxProvider{
|
||||
public void getHitbox(int x, int y, Rectangle out);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface TriPosConsumer{
|
||||
public void accept(int x, int y, int z);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface TypingListenable{
|
||||
public void typed(char c);
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package io.anuke.ucore.function;
|
||||
|
||||
public interface VisibilityProvider{
|
||||
public boolean visible();
|
||||
}
|
||||
Reference in New Issue
Block a user