loading gui + converter
This commit is contained in:
parent
9df6406a93
commit
90de256e04
7 changed files with 259 additions and 178 deletions
|
@ -63,6 +63,7 @@ import game.gui.Gui;
|
|||
import game.gui.GuiConsole;
|
||||
import game.gui.GuiGameOver;
|
||||
import game.gui.GuiInfo;
|
||||
import game.gui.GuiLoading;
|
||||
import game.gui.GuiMenu;
|
||||
import game.gui.Style;
|
||||
import game.gui.container.GuiContainer;
|
||||
|
@ -933,6 +934,8 @@ public class Game implements IThreadListener {
|
|||
}
|
||||
if(this.open != null)
|
||||
this.open.render();
|
||||
else if(this.theWorld == null || this.theWorld.hasNoChunks())
|
||||
Drawing.drawScaledBackground(this, Gui.DIRT_BACKGROUND);
|
||||
if(Bind.INFO.isDown() && (this.open == null || !(this.open.selected instanceof Textbox)))
|
||||
this.drawInfo();
|
||||
if(this.hudOverlay && !(this.open instanceof GuiConsole))
|
||||
|
@ -958,7 +961,7 @@ public class Game implements IThreadListener {
|
|||
int y1 = 0;
|
||||
int y2 = this.fb_y;
|
||||
// int pos = 0;
|
||||
String str = this.getldebug();
|
||||
String str = this.getLeft(this.server);
|
||||
// if(jstr)
|
||||
// str = (*jsys.env)->GetStringUTFChars(jsys.env, jstr, NULL);
|
||||
// elem->r_dirty = 1;
|
||||
|
@ -2118,30 +2121,32 @@ public class Game implements IThreadListener {
|
|||
if(Bind.FULLSCREEN.isPressed()) {
|
||||
this.full(!this.fullscreen);
|
||||
}
|
||||
if(!(this.open instanceof GuiConsole) && Bind.COMMAND.isPressed()) {
|
||||
this.displayGuiScreen(GuiConsole.INSTANCE);
|
||||
}
|
||||
// if(this.theWorld != null && this.open == null && Bind.COMMAND.isPressed()) {
|
||||
// this.displayGuiScreen(GuiChat.INSTANCE);
|
||||
// }
|
||||
if(this.theWorld != null && Bind.MENU.isPressed()) {
|
||||
if(this.open != null)
|
||||
this.displayGuiScreen(null);
|
||||
else
|
||||
this.displayGuiScreen(GuiMenu.INSTANCE);
|
||||
}
|
||||
else if(this.theWorld == null && !(this.open instanceof GuiMenu) && Bind.MENU.isPressed()) {
|
||||
this.displayGuiScreen(GuiMenu.INSTANCE);
|
||||
}
|
||||
if(this.theWorld != null && Bind.INVENTORY.isPressed()) {
|
||||
if(this.open instanceof GuiContainer) {
|
||||
this.displayGuiScreen(null);
|
||||
if(!(this.open instanceof GuiLoading)) {
|
||||
if(!(this.open instanceof GuiConsole) && Bind.COMMAND.isPressed()) {
|
||||
this.displayGuiScreen(GuiConsole.INSTANCE);
|
||||
}
|
||||
else if(this.open == null) {
|
||||
if(this.thePlayer.isRiding() && this.thePlayer.vehicle instanceof EntityHorse)
|
||||
this.thePlayer.sendHorseInventory();
|
||||
else
|
||||
this.displayGuiScreen(/* this.itemCheat ? new GuiCheat() : */ new GuiInventory(this.thePlayer));
|
||||
// if(this.theWorld != null && this.open == null && Bind.COMMAND.isPressed()) {
|
||||
// this.displayGuiScreen(GuiChat.INSTANCE);
|
||||
// }
|
||||
if(this.theWorld != null && Bind.MENU.isPressed()) {
|
||||
if(this.open != null)
|
||||
this.displayGuiScreen(null);
|
||||
else
|
||||
this.displayGuiScreen(GuiMenu.INSTANCE);
|
||||
}
|
||||
else if(this.theWorld == null && !(this.open instanceof GuiMenu) && Bind.MENU.isPressed()) {
|
||||
this.displayGuiScreen(GuiMenu.INSTANCE);
|
||||
}
|
||||
if(this.theWorld != null && Bind.INVENTORY.isPressed()) {
|
||||
if(this.open instanceof GuiContainer) {
|
||||
this.displayGuiScreen(null);
|
||||
}
|
||||
else if(this.open == null) {
|
||||
if(this.thePlayer.isRiding() && this.thePlayer.vehicle instanceof EntityHorse)
|
||||
this.thePlayer.sendHorseInventory();
|
||||
else
|
||||
this.displayGuiScreen(/* this.itemCheat ? new GuiCheat() : */ new GuiInventory(this.thePlayer));
|
||||
}
|
||||
}
|
||||
}
|
||||
if(Bind.SHOW.isPressed()) {
|
||||
|
@ -2328,19 +2333,11 @@ public class Game implements IThreadListener {
|
|||
return ((double)rtime()) / 1000000.0;
|
||||
}
|
||||
|
||||
public void convert(File folder, String user) {
|
||||
Converter.convertMapFormat(folder, user);
|
||||
}
|
||||
|
||||
public void bind(int port) {
|
||||
if(server != null)
|
||||
server.bind(port);
|
||||
}
|
||||
|
||||
public String getldebug() {
|
||||
return this.getLeft(server);
|
||||
}
|
||||
|
||||
public void distance(int distance) {
|
||||
if(this.renderGlobal != null)
|
||||
this.renderGlobal.setDisplayListEntitiesDirty();
|
||||
|
@ -2531,7 +2528,8 @@ public class Game implements IThreadListener {
|
|||
DebugFunction func = this.debug.get(key);
|
||||
if(func != null) {
|
||||
Bind.disableInput(key);
|
||||
func.runner.execute(key);
|
||||
if(!(this.open instanceof GuiLoading))
|
||||
func.runner.execute(key);
|
||||
}
|
||||
return func != null;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue