diff --git a/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java b/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java index 62db61c21..7c2cacdb6 100644 --- a/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java +++ b/src/main/java/noppes/npcs/client/gui/SubGuiNpcDialogVisual.java @@ -72,6 +72,9 @@ public class SubGuiNpcDialogVisual extends SubGuiInterface implements ISubGuiLis addLabel(new GuiNpcLabel(16, "dialog.textPitch", guiLeft + 4, y + 5)); getTextField(16).floatsOnly = true; } + + addButton(new GuiNpcButton(17, guiLeft + 120, y += 22, 50, 20, new String[]{"display.hide", "display.show"}, dialog.showOptionLine ? 1 : 0)); + addLabel(new GuiNpcLabel(17, "dialog.optionLine", guiLeft + 4, y + 5)); } else if (activeMenu == 2) { addTextField(new GuiNpcTextField(10, this, guiLeft + 120, y += 25, 40, 20, String.valueOf(dialog.textWidth))); addTextField(new GuiNpcTextField(11, this, guiLeft + 165, y, 40, 20, String.valueOf(dialog.textHeight))); @@ -264,6 +267,9 @@ public class SubGuiNpcDialogVisual extends SubGuiInterface implements ISubGuiLis if (button.id == 14) { dialog.showPreviousBlocks = button.getValue() == 1; } + if (button.id == 17) { + dialog.showOptionLine = button.getValue() == 1; + } } if (activeMenu == 3) { diff --git a/src/main/java/noppes/npcs/client/gui/player/GuiDialogInteract.java b/src/main/java/noppes/npcs/client/gui/player/GuiDialogInteract.java index 8a68dc873..b85638f51 100644 --- a/src/main/java/noppes/npcs/client/gui/player/GuiDialogInteract.java +++ b/src/main/java/noppes/npcs/client/gui/player/GuiDialogInteract.java @@ -431,7 +431,9 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose if(selected < 0) selected = 0; - drawHorizontalLine(guiLeft - 60, guiLeft + xSize + 120, offset, 0xFFFFFFFF); + if (dialog.showOptionLine) { + drawHorizontalLine(guiLeft - 60, guiLeft + xSize + 120, offset, 0xFFFFFFFF); + } for(int k = 0; k < options.size(); k++){ GL11.glPushMatrix(); diff --git a/src/main/java/noppes/npcs/controllers/data/Dialog.java b/src/main/java/noppes/npcs/controllers/data/Dialog.java index 438250582..ae753f1c2 100644 --- a/src/main/java/noppes/npcs/controllers/data/Dialog.java +++ b/src/main/java/noppes/npcs/controllers/data/Dialog.java @@ -33,6 +33,7 @@ public class Dialog implements ICompatibilty, IDialog { public boolean showWheel = false; public boolean disableEsc = false; public boolean darkenScreen = true; + public boolean showOptionLine = true; public boolean renderGradual = false; public boolean showPreviousBlocks = true; @@ -112,6 +113,7 @@ public class Dialog implements ICompatibilty, IDialog { renderGradual = compound.getBoolean("RenderGradual"); showPreviousBlocks = compound.getBoolean("PreviousBlocks"); + showOptionLine = compound.getBoolean("ShowOptionLine"); textSound = compound.getString("TextSound"); textPitch = compound.getFloat("TextPitch"); textWidth = compound.getInteger("TextWidth"); @@ -135,6 +137,8 @@ public class Dialog implements ICompatibilty, IDialog { textWidth = 300; if (!compound.hasKey("TextHeight")) textHeight = 400; + if (!compound.hasKey("ShowOptionLine")) + showOptionLine = true; availability.readFromNBT(compound); factionOptions.readFromNBT(compound); @@ -176,6 +180,7 @@ public class Dialog implements ICompatibilty, IDialog { compound.setBoolean("RenderGradual", renderGradual); compound.setBoolean("PreviousBlocks", showPreviousBlocks); + compound.setBoolean("ShowOptionLine", showOptionLine); compound.setString("TextSound", textSound); compound.setFloat("TextPitch", textPitch); compound.setInteger("TextWidth", textWidth); @@ -226,6 +231,7 @@ public class Dialog implements ICompatibilty, IDialog { dialog.darkenScreen = darkenScreen; dialog.renderGradual = renderGradual; dialog.showPreviousBlocks = showPreviousBlocks; + dialog.showOptionLine = showOptionLine; dialog.textSound = textSound; dialog.textPitch = textPitch; dialog.textWidth = textWidth; diff --git a/src/main/resources/assets/customnpcs/lang/en_US.lang b/src/main/resources/assets/customnpcs/lang/en_US.lang index aa52c7982..4913898ab 100644 --- a/src/main/resources/assets/customnpcs/lang/en_US.lang +++ b/src/main/resources/assets/customnpcs/lang/en_US.lang @@ -448,6 +448,7 @@ dialog.textPitch=Text Pitch dialog.textureOffset=Texture Offset dialog.selectedColor=Selected Color dialog.imageType=Image Type +dialog.optionLine=Option Line quest.quest=Quest quest.quests=Quests