mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 21:20:04 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -9,41 +9,44 @@ import noppes.npcs.client.gui.util.GuiNpcButton;
|
||||
import noppes.npcs.client.gui.util.GuiNpcTextField;
|
||||
import noppes.npcs.entity.data.ModelData;
|
||||
|
||||
public class GuiPresetSave extends GuiNPCInterface{
|
||||
private ModelData data;
|
||||
private GuiScreen parent;
|
||||
public class GuiPresetSave extends GuiNPCInterface {
|
||||
private ModelData data;
|
||||
private GuiScreen parent;
|
||||
|
||||
public GuiPresetSave(GuiScreen parent, ModelData data) {
|
||||
this.data = data;
|
||||
this.parent = parent;
|
||||
xSize = 200;
|
||||
this.drawDefaultBackground = true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.addTextField(new GuiNpcTextField(0, this, guiLeft, guiTop + 70, 200, 20, ""));
|
||||
this.addButton(new GuiNpcButton(0, guiLeft, guiTop + 100, 98, 20, "Save"));
|
||||
this.addButton(new GuiNpcButton(1, guiLeft + 100, guiTop + 100, 98, 20, "Cancel"));
|
||||
}
|
||||
|
||||
public GuiPresetSave(GuiScreen parent, ModelData data){
|
||||
this.data = data;
|
||||
this.parent = parent;
|
||||
xSize = 200;
|
||||
this.drawDefaultBackground = true;
|
||||
}
|
||||
@Override
|
||||
public void initGui(){
|
||||
super.initGui();
|
||||
this.addTextField(new GuiNpcTextField(0, this, guiLeft, guiTop + 70,200, 20, ""));
|
||||
this.addButton(new GuiNpcButton(0,guiLeft, guiTop + 100,98, 20, "Save"));
|
||||
this.addButton(new GuiNpcButton(1,guiLeft + 100, guiTop + 100, 98, 20, "Cancel"));
|
||||
}
|
||||
@Override
|
||||
protected void actionPerformed(GuiButton btn) {
|
||||
super.actionPerformed(btn);
|
||||
GuiNpcButton button = (GuiNpcButton) btn;
|
||||
if(button.id == 0){
|
||||
String name = this.getTextField(0).getText().trim();
|
||||
if(name.isEmpty())
|
||||
return;
|
||||
Preset preset = new Preset();
|
||||
preset.name = name;
|
||||
preset.data = data.copy();
|
||||
PresetController.instance.addPreset(preset);
|
||||
}
|
||||
mc.displayGuiScreen(parent);
|
||||
super.actionPerformed(btn);
|
||||
GuiNpcButton button = (GuiNpcButton) btn;
|
||||
if (button.id == 0) {
|
||||
String name = this.getTextField(0).getText().trim();
|
||||
if (name.isEmpty())
|
||||
return;
|
||||
Preset preset = new Preset();
|
||||
preset.name = name;
|
||||
preset.data = data.copy();
|
||||
PresetController.instance.addPreset(preset);
|
||||
}
|
||||
mc.displayGuiScreen(parent);
|
||||
}
|
||||
@Override
|
||||
public void save() {
|
||||
|
||||
@Override
|
||||
public void save() {
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user