loading gui + converter
This commit is contained in:
parent
9df6406a93
commit
90de256e04
7 changed files with 259 additions and 178 deletions
|
@ -75,7 +75,7 @@ public class GuiEdit extends Gui implements ActButton.Callback, Textbox.Callback
|
|||
public void init(int width, int height) {
|
||||
this.actionButton = this.add(new ActButton(width / 2 - 100, height / 4 + 96 + 12, 200, 20, (ActButton.Callback)this, this.action));
|
||||
this.cancelButton = this.add(new ActButton(width / 2 - 100, height / 4 + 120 + 12, 200, 20, (ActButton.Callback)this, "Abbrechen"));
|
||||
this.nameField = this.add(new Textbox(width / 2 - 100, 60, 200, 20, this.player ? NetHandlerPlayServer.MAX_USER_LENGTH : 256, true, this, this.player ? NetHandlerPlayServer.VALID_USER : GuiWorlds.VALID_FILE, this.original == null ? "" : this.original));
|
||||
this.nameField = this.add(new Textbox(width / 2 - 200, 60, 400, 20, this.player ? NetHandlerPlayServer.MAX_USER_LENGTH : 256, true, this, this.player ? NetHandlerPlayServer.VALID_USER : GuiWorlds.VALID_FILE, this.original == null ? "" : this.original));
|
||||
this.nameField.setSelected();
|
||||
// if(this.player) {
|
||||
// this.nameField.setMaxStringLength(16);
|
||||
|
@ -96,7 +96,7 @@ public class GuiEdit extends Gui implements ActButton.Callback, Textbox.Callback
|
|||
// }
|
||||
// });
|
||||
// }
|
||||
this.actionLabel = this.add(new Label(width / 2 - 100, 20, 200, 24, this.getLabelDesc()));
|
||||
this.actionLabel = this.add(new Label(width / 2 - 250, 20, 500, 24, this.getLabelDesc()));
|
||||
// this.shift();
|
||||
// this.nameField.setText();
|
||||
this.actionButton.enabled = false;
|
||||
|
|
|
@ -12,6 +12,7 @@ import java.util.Set;
|
|||
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import game.Game;
|
||||
import game.color.TextColor;
|
||||
import game.dimension.Dimension;
|
||||
import game.gui.GuiConfirm;
|
||||
|
@ -487,8 +488,8 @@ public class GuiWorlds extends GuiList<GuiWorlds.SaveInfo> implements ActButton.
|
|||
}
|
||||
else {
|
||||
if(this.getSelected().mustConvert()) {
|
||||
this.gm.convert(folder, user);
|
||||
this.gm.displayGuiScreen(this);
|
||||
Game r = this.gm;
|
||||
Converter.convertMapFormat(folder, user);
|
||||
this.starting = false;
|
||||
}
|
||||
else {
|
||||
|
@ -607,9 +608,10 @@ public class GuiWorlds extends GuiList<GuiWorlds.SaveInfo> implements ActButton.
|
|||
{
|
||||
super.drawOverlays();
|
||||
if(this.warningMessage != null) {
|
||||
drawRect(this.gm.fb_x / 2 - 191, this.gm.fb_y - 82, this.gm.fb_x / 2 + 191, this.gm.fb_y - 66, 0xff808080);
|
||||
drawRect(this.gm.fb_x / 2 - 190, this.gm.fb_y - 81, this.gm.fb_x / 2 + 190, this.gm.fb_y - 67, 0xff000000);
|
||||
Drawing.drawText(this.warningMessage, this.gm.fb_x / 2, this.gm.fb_y - 78, 0xffff0000);
|
||||
Drawing.drawRectBorder(this.gm.fb_x / 2 - 200, this.gm.fb_y - 84, 400, 18, 0xff000000, 0xff808080);
|
||||
// drawRect(this.gm.fb_x / 2 - 191, this.gm.fb_y - 82, this.gm.fb_x / 2 + 191, this.gm.fb_y - 66, 0xff808080);
|
||||
// drawRect(this.gm.fb_x / 2 - 190, this.gm.fb_y - 81, this.gm.fb_x / 2 + 190, this.gm.fb_y - 67, 0xff000000);
|
||||
Drawing.drawTextCentered(this.warningMessage, this.gm.fb_x / 2, this.gm.fb_y - 84, 0xffff0000);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue