This commit is contained in:
Anuken
2017-12-19 19:17:17 -05:00
parent ed59e7c7cb
commit 9e298bde03
96 changed files with 498 additions and 620 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 202 B

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

Before

Width:  |  Height:  |  Size: 198 B

After

Width:  |  Height:  |  Size: 198 B

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 191 B

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 B

Before

Width:  |  Height:  |  Size: 265 B

After

Width:  |  Height:  |  Size: 265 B

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

Before

Width:  |  Height:  |  Size: 321 B

After

Width:  |  Height:  |  Size: 321 B

Before

Width:  |  Height:  |  Size: 316 B

After

Width:  |  Height:  |  Size: 316 B

Before

Width:  |  Height:  |  Size: 319 B

After

Width:  |  Height:  |  Size: 319 B

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 185 B

Before

Width:  |  Height:  |  Size: 186 B

After

Width:  |  Height:  |  Size: 186 B

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 177 B

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 161 B

Before

Width:  |  Height:  |  Size: 223 B

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 225 B

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

Before

Width:  |  Height:  |  Size: 255 B

After

Width:  |  Height:  |  Size: 255 B

Before

Width:  |  Height:  |  Size: 231 B

After

Width:  |  Height:  |  Size: 231 B

Before

Width:  |  Height:  |  Size: 214 B

After

Width:  |  Height:  |  Size: 214 B

Before

Width:  |  Height:  |  Size: 197 B

After

Width:  |  Height:  |  Size: 197 B

Before

Width:  |  Height:  |  Size: 203 B

After

Width:  |  Height:  |  Size: 203 B

Before

Width:  |  Height:  |  Size: 220 B

After

Width:  |  Height:  |  Size: 220 B

Before

Width:  |  Height:  |  Size: 185 B

After

Width:  |  Height:  |  Size: 185 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 196 B

Before

Width:  |  Height:  |  Size: 195 B

After

Width:  |  Height:  |  Size: 195 B

Before

Width:  |  Height:  |  Size: 252 B

After

Width:  |  Height:  |  Size: 252 B

Before

Width:  |  Height:  |  Size: 191 B

After

Width:  |  Height:  |  Size: 191 B

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

Before

Width:  |  Height:  |  Size: 175 B

After

Width:  |  Height:  |  Size: 175 B

Before

Width:  |  Height:  |  Size: 247 B

After

Width:  |  Height:  |  Size: 247 B

Before

Width:  |  Height:  |  Size: 236 B

After

Width:  |  Height:  |  Size: 236 B

Before

Width:  |  Height:  |  Size: 208 B

After

Width:  |  Height:  |  Size: 208 B

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 169 B

Before

Width:  |  Height:  |  Size: 151 B

After

Width:  |  Height:  |  Size: 151 B

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 164 B

Before

Width:  |  Height:  |  Size: 199 B

After

Width:  |  Height:  |  Size: 199 B

Before

Width:  |  Height:  |  Size: 245 B

After

Width:  |  Height:  |  Size: 245 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Before

Width:  |  Height:  |  Size: 177 B

After

Width:  |  Height:  |  Size: 177 B

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 202 B

Before

Width:  |  Height:  |  Size: 202 B

After

Width:  |  Height:  |  Size: 202 B

Before

Width:  |  Height:  |  Size: 190 B

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 206 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 192 B

Before

Width:  |  Height:  |  Size: 160 B

After

Width:  |  Height:  |  Size: 160 B

Before

Width:  |  Height:  |  Size: 213 B

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Before

Width:  |  Height:  |  Size: 216 B

After

Width:  |  Height:  |  Size: 216 B

Before

Width:  |  Height:  |  Size: 188 B

After

Width:  |  Height:  |  Size: 188 B

Before

Width:  |  Height:  |  Size: 209 B

After

Width:  |  Height:  |  Size: 209 B

Before

Width:  |  Height:  |  Size: 222 B

After

Width:  |  Height:  |  Size: 222 B

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

Before

Width:  |  Height:  |  Size: 200 B

After

Width:  |  Height:  |  Size: 200 B

Before

Width:  |  Height:  |  Size: 244 B

After

Width:  |  Height:  |  Size: 244 B

File diff suppressed because it is too large Load Diff
Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

@@ -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();
}