Better schematic previews, keep on game export
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
package io.anuke.mindustry.ui.dialogs;
|
||||
|
||||
import io.anuke.arc.graphics.g2d.*;
|
||||
import io.anuke.arc.scene.style.*;
|
||||
import io.anuke.arc.graphics.*;
|
||||
import io.anuke.arc.scene.ui.*;
|
||||
import io.anuke.mindustry.game.*;
|
||||
import io.anuke.mindustry.game.Schematics.*;
|
||||
import io.anuke.mindustry.ui.*;
|
||||
|
||||
import static io.anuke.mindustry.Vars.schematics;
|
||||
|
||||
@@ -21,7 +22,10 @@ public class SchematicsDialog extends FloatingDialog{
|
||||
cont.pane(t -> {
|
||||
int i = 0;
|
||||
for(Schematic s : schematics.all()){
|
||||
addImageButton(new TextureRegionDrawable(new TextureRegion(schematics.getPreview(s, PreviewRes.low))), 100f, () -> {
|
||||
addButton(b -> {
|
||||
Texture tex = schematics.getPreview(s, PreviewRes.low);
|
||||
b.stack(new Image(tex), new BorderImage(tex)).size(100f);
|
||||
}, () -> {
|
||||
|
||||
}).size(110f).pad(4);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user