Added dialog option to show line above options.

This commit is contained in:
Luis C.M committed 2022-06-09 03:51:27 -05:00
1 parent 84b7744023
commit 76106b1ea6
4 files changed
+16 -1

No files matched your search

@@ -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) {
@@ -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();
@@ -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;