mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 11:09:42 +00:00
Proper Reformating
This commit is contained in:
1 parent
ce75880aba
commit
180d257024
1179 files changed
+59847
-61583
No files matched your search
@@ -8,55 +8,50 @@ import noppes.npcs.constants.EnumOptionType;
|
||||
import noppes.npcs.controllers.data.Dialog;
|
||||
import noppes.npcs.controllers.data.DialogOption;
|
||||
|
||||
public class SubGuiNpcDialogOptions extends SubGuiInterface
|
||||
{
|
||||
private Dialog dialog;
|
||||
|
||||
public SubGuiNpcDialogOptions(Dialog dialog)
|
||||
{
|
||||
this.dialog = dialog;
|
||||
setBackground("menubg.png");
|
||||
xSize = 256;
|
||||
ySize = 216;
|
||||
closeOnEsc = true;
|
||||
public class SubGuiNpcDialogOptions extends SubGuiInterface {
|
||||
private Dialog dialog;
|
||||
|
||||
public SubGuiNpcDialogOptions(Dialog dialog) {
|
||||
this.dialog = dialog;
|
||||
setBackground("menubg.png");
|
||||
xSize = 256;
|
||||
ySize = 216;
|
||||
closeOnEsc = true;
|
||||
}
|
||||
|
||||
public void initGui()
|
||||
{
|
||||
public void initGui() {
|
||||
super.initGui();
|
||||
this.addLabel(new GuiNpcLabel(66, "dialog.options", guiLeft, guiTop + 4));
|
||||
this.getLabel(66).center(xSize);
|
||||
|
||||
for (int i = 0; i < 6; i++) {
|
||||
String optionString = "";
|
||||
DialogOption option = dialog.options.get(i);
|
||||
if(option != null && option.optionType != EnumOptionType.Disabled)
|
||||
optionString += option.title;
|
||||
|
||||
this.addLabel(new GuiNpcLabel(i + 10, i + 1 + ": ", guiLeft + 4, guiTop + 16 + i * 32));
|
||||
this.addLabel(new GuiNpcLabel(i, optionString, guiLeft + 14, guiTop + 12 + i * 32));
|
||||
this.addButton(new GuiNpcButton(i, guiLeft + 13, guiTop + 21 + i * 32, 60, 20, "selectServer.edit"));
|
||||
|
||||
}
|
||||
for (int i = 0; i < 6; i++) {
|
||||
String optionString = "";
|
||||
DialogOption option = dialog.options.get(i);
|
||||
if (option != null && option.optionType != EnumOptionType.Disabled)
|
||||
optionString += option.title;
|
||||
|
||||
this.addLabel(new GuiNpcLabel(i + 10, i + 1 + ": ", guiLeft + 4, guiTop + 16 + i * 32));
|
||||
this.addLabel(new GuiNpcLabel(i, optionString, guiLeft + 14, guiTop + 12 + i * 32));
|
||||
this.addButton(new GuiNpcButton(i, guiLeft + 13, guiTop + 21 + i * 32, 60, 20, "selectServer.edit"));
|
||||
|
||||
}
|
||||
|
||||
this.addButton(new GuiNpcButton(66, guiLeft + 82, guiTop + 194, 98, 20, "gui.done"));
|
||||
|
||||
this.addButton(new GuiNpcButton(66, guiLeft + 82, guiTop + 194,98, 20, "gui.done"));
|
||||
|
||||
}
|
||||
|
||||
protected void actionPerformed(GuiButton guibutton)
|
||||
{
|
||||
int id = guibutton.id;
|
||||
if(id < 6){
|
||||
DialogOption option = dialog.options.get(id);
|
||||
if(option == null){
|
||||
dialog.options.put(id, option = new DialogOption());
|
||||
option.optionColor = SubGuiNpcDialogOption.LastColor;
|
||||
}
|
||||
this.setSubGui(new SubGuiNpcDialogOption(option));
|
||||
protected void actionPerformed(GuiButton guibutton) {
|
||||
int id = guibutton.id;
|
||||
if (id < 6) {
|
||||
DialogOption option = dialog.options.get(id);
|
||||
if (option == null) {
|
||||
dialog.options.put(id, option = new DialogOption());
|
||||
option.optionColor = SubGuiNpcDialogOption.LastColor;
|
||||
}
|
||||
this.setSubGui(new SubGuiNpcDialogOption(option));
|
||||
}
|
||||
if(id == 66)
|
||||
{
|
||||
close();
|
||||
if (id == 66) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user