Basic deploy background
This commit is contained in:
|
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
|
Before Width: | Height: | Size: 22 KiB After Width: | Height: | Size: 22 KiB |
BIN
core/assets/sprites/backgrounds/planet-zero.png
Normal file
BIN
core/assets/sprites/backgrounds/planet-zero.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 266 KiB |
BIN
core/assets/sprites/backgrounds/stars.png
Normal file
BIN
core/assets/sprites/backgrounds/stars.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 77 KiB |
@@ -264,6 +264,12 @@
|
|||||||
titleFont: default-font,
|
titleFont: default-font,
|
||||||
background: window-empty,
|
background: window-empty,
|
||||||
titleFontColor: accent
|
titleFontColor: accent
|
||||||
|
},
|
||||||
|
fulldialog: {
|
||||||
|
stageBackground: dark,
|
||||||
|
titleFont: default-font,
|
||||||
|
background: window-empty,
|
||||||
|
titleFontColor: accent
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
KeybindDialogStyle: {
|
KeybindDialogStyle: {
|
||||||
|
|||||||
@@ -4,13 +4,16 @@ import io.anuke.arc.Core;
|
|||||||
import io.anuke.arc.collection.Array;
|
import io.anuke.arc.collection.Array;
|
||||||
import io.anuke.arc.collection.ObjectSet;
|
import io.anuke.arc.collection.ObjectSet;
|
||||||
import io.anuke.arc.collection.ObjectSet.ObjectSetIterator;
|
import io.anuke.arc.collection.ObjectSet.ObjectSetIterator;
|
||||||
|
import io.anuke.arc.graphics.Color;
|
||||||
|
import io.anuke.arc.graphics.Texture;
|
||||||
import io.anuke.arc.graphics.g2d.Draw;
|
import io.anuke.arc.graphics.g2d.Draw;
|
||||||
import io.anuke.arc.graphics.g2d.Lines;
|
import io.anuke.arc.graphics.g2d.Lines;
|
||||||
|
import io.anuke.arc.math.Mathf;
|
||||||
import io.anuke.arc.scene.Group;
|
import io.anuke.arc.scene.Group;
|
||||||
|
import io.anuke.arc.scene.ui.Image;
|
||||||
import io.anuke.arc.scene.ui.TextButton;
|
import io.anuke.arc.scene.ui.TextButton;
|
||||||
import io.anuke.arc.scene.ui.layout.*;
|
import io.anuke.arc.scene.ui.layout.*;
|
||||||
import io.anuke.arc.util.Align;
|
import io.anuke.arc.util.*;
|
||||||
import io.anuke.arc.util.Structs;
|
|
||||||
import io.anuke.mindustry.content.Zones;
|
import io.anuke.mindustry.content.Zones;
|
||||||
import io.anuke.mindustry.core.GameState.State;
|
import io.anuke.mindustry.core.GameState.State;
|
||||||
import io.anuke.mindustry.game.Saves.SaveSlot;
|
import io.anuke.mindustry.game.Saves.SaveSlot;
|
||||||
@@ -30,7 +33,7 @@ public class DeployDialog extends FloatingDialog{
|
|||||||
private ZoneInfoDialog info = new ZoneInfoDialog();
|
private ZoneInfoDialog info = new ZoneInfoDialog();
|
||||||
|
|
||||||
public DeployDialog(){
|
public DeployDialog(){
|
||||||
super("");
|
super("", "fulldialog");
|
||||||
|
|
||||||
ZoneNode root = new ZoneNode(Zones.groundZero, null);
|
ZoneNode root = new ZoneNode(Zones.groundZero, null);
|
||||||
|
|
||||||
@@ -58,6 +61,26 @@ public class DeployDialog extends FloatingDialog{
|
|||||||
|
|
||||||
Stack stack = new Stack();
|
Stack stack = new Stack();
|
||||||
|
|
||||||
|
stack.add(new Image(new Texture("sprites/backgrounds/stars.png"){{
|
||||||
|
setFilter(TextureFilter.Linear);
|
||||||
|
}}){{
|
||||||
|
//setColor(Color.fromGray(0.3f));
|
||||||
|
//setScale(3f);
|
||||||
|
}}.setScaling(Scaling.fill));
|
||||||
|
|
||||||
|
stack.add(new Image(new Texture("sprites/backgrounds/planet-zero.png"){{
|
||||||
|
setFilter(TextureFilter.Linear);
|
||||||
|
}}){{
|
||||||
|
float[] time = {0};
|
||||||
|
setColor(Color.fromGray(0.3f));
|
||||||
|
setScale(1.5f);
|
||||||
|
update(() -> {
|
||||||
|
setOrigin(Align.center);
|
||||||
|
time[0] += Core.graphics.getDeltaTime() * 10f;
|
||||||
|
setTranslation(Mathf.sin(time[0], 60f, 70f), Mathf.cos(time[0], 140f, 80f));
|
||||||
|
});
|
||||||
|
}}.setScaling(Scaling.fit));
|
||||||
|
|
||||||
if(control.saves.getZoneSlot() != null){
|
if(control.saves.getZoneSlot() != null){
|
||||||
stack.add(new Table(t -> {
|
stack.add(new Table(t -> {
|
||||||
SaveSlot slot = control.saves.getZoneSlot();
|
SaveSlot slot = control.saves.getZoneSlot();
|
||||||
|
|||||||
@@ -18,8 +18,8 @@ public class FloatingDialog extends Dialog{
|
|||||||
private boolean wasPaused;
|
private boolean wasPaused;
|
||||||
protected boolean shouldPause;
|
protected boolean shouldPause;
|
||||||
|
|
||||||
public FloatingDialog(String title){
|
public FloatingDialog(String title, String style){
|
||||||
super(title, "dialog");
|
super(title, style);
|
||||||
setFillParent(true);
|
setFillParent(true);
|
||||||
this.title.setAlignment(Align.center);
|
this.title.setAlignment(Align.center);
|
||||||
titleTable.row();
|
titleTable.row();
|
||||||
@@ -54,6 +54,10 @@ public class FloatingDialog extends Dialog{
|
|||||||
})));
|
})));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FloatingDialog(String title){
|
||||||
|
this(title, "dialog");
|
||||||
|
}
|
||||||
|
|
||||||
protected void onResize(Runnable run){
|
protected void onResize(Runnable run){
|
||||||
Events.on(ResizeEvent.class, event -> {
|
Events.on(ResizeEvent.class, event -> {
|
||||||
if(isShown()){
|
if(isShown()){
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ import com.badlogicgames.packr.Packr
|
|||||||
import com.badlogicgames.packr.PackrConfig
|
import com.badlogicgames.packr.PackrConfig
|
||||||
|
|
||||||
def JDK_DIR = "$System.env.PACKR_DIR"
|
def JDK_DIR = "$System.env.PACKR_DIR"
|
||||||
def ICON_DIR = new File("core/assets/sprites/icon.icns")
|
def ICON_DIR = new File("core/assets/icons/icon.icns")
|
||||||
|
|
||||||
ext.getPlatform = {
|
ext.getPlatform = {
|
||||||
def lc = project.hasProperty("platform") ? platform.toLowerCase() : ""
|
def lc = project.hasProperty("platform") ? platform.toLowerCase() : ""
|
||||||
|
|||||||
@@ -15,7 +15,7 @@ public class DesktopLauncher{
|
|||||||
config.setMaximized(true);
|
config.setMaximized(true);
|
||||||
config.setBackBufferConfig(8, 8, 8, 8, 0, 0, 0);
|
config.setBackBufferConfig(8, 8, 8, 8, 0, 0, 0);
|
||||||
config.setWindowedMode(900, 600);
|
config.setWindowedMode(900, 600);
|
||||||
config.setWindowIcon("sprites/icon.png");
|
config.setWindowIcon("icons/icon.png");
|
||||||
|
|
||||||
Platform.instance = new DesktopPlatform(arg);
|
Platform.instance = new DesktopPlatform(arg);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user