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 ebcfdaf8e..4a61e76b4 100644 --- a/src/main/java/noppes/npcs/client/gui/player/GuiDialogInteract.java +++ b/src/main/java/noppes/npcs/client/gui/player/GuiDialogInteract.java @@ -503,7 +503,7 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose int height = count - totalRows + lineOffset; int screenPos = optionStart; int y = (height * ClientProxy.Font.height()) + screenPos + scrollY; - if (!dialog.bottomAligned) { + if (dialog.alignment == 0) { height = count - totalRows + lineOffset + 1; screenPos = optionStart - dialog.textHeight + ClientProxy.Font.height() + (totalRows - lineOffset); @@ -515,7 +515,7 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose } if (block.titlePos == 0 || mainDialogText) { - if (!dialog.bottomAligned) { + if (dialog.alignment == 0) { if (y < optionStart - dialog.textHeight || y > optionStart - ClientProxy.Font.height()/2f) { return; } @@ -584,7 +584,7 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose textSoundEnabled = !textSoundEnabled; } - if (!dialog.bottomAligned && totalRows * ClientProxy.Font.height() > dialog.textHeight) { + if (dialog.alignment == 0 && totalRows * ClientProxy.Font.height() > dialog.textHeight) { if ((i == mc.gameSettings.keyBindBack.getKeyCode() || i == 201) && scrollY < totalRows * ClientProxy.Font.height()) {//Page up scrollY += ClientProxy.Font.height() * 2; } diff --git a/src/main/java/noppes/npcs/controllers/data/Dialog.java b/src/main/java/noppes/npcs/controllers/data/Dialog.java index 15760f7dd..3da2914e1 100644 --- a/src/main/java/noppes/npcs/controllers/data/Dialog.java +++ b/src/main/java/noppes/npcs/controllers/data/Dialog.java @@ -38,7 +38,9 @@ public class Dialog implements ICompatibilty, IDialog { public boolean disableEsc = false; public boolean darkenScreen = true; public boolean showOptionLine = true; - public boolean bottomAligned = false; + + //0 - Top, 1 - Bottom, 2 (Not implemented yet) - Center + public byte alignment = 0; public boolean renderGradual = false; public boolean showPreviousBlocks = true; @@ -97,7 +99,7 @@ public class Dialog implements ICompatibilty, IDialog { darkenScreen = true; } - bottomAligned = compound.getBoolean("DialogScrollUpwards"); + alignment = compound.getByte("DialogAlignment"); NBTTagList options = compound.getTagList("Options", 10); @@ -263,6 +265,7 @@ public class Dialog implements ICompatibilty, IDialog { dialog.renderGradual = renderGradual; dialog.showPreviousBlocks = showPreviousBlocks; dialog.showOptionLine = showOptionLine; + dialog.alignment = alignment; dialog.textSound = textSound; dialog.textPitch = textPitch; dialog.textWidth = textWidth;