mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-13 21:54:08 +00:00
Fixed dialogs with more options than the previous dialog being cut off.
This commit is contained in:
1 parent
1facfd133d
commit
7300cde833
1 file changed
+6
-3
@@ -87,10 +87,13 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose
|
||||
calculateRowHeight();
|
||||
this.scaledResolution = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
|
||||
this.drawDefaultBackground = dialog.darkenScreen;
|
||||
|
||||
optionStart = scaledResolution.getScaledHeight() - (options.size()) * (ClientProxy.Font.height() + dialog.optionSpaceY) - 20;
|
||||
setOptionOffset();
|
||||
}
|
||||
|
||||
public void setOptionOffset() {
|
||||
optionStart = scaledResolution.getScaledHeight() - (options.size()) * (ClientProxy.Font.height() + dialog.optionSpaceY) - 20;
|
||||
}
|
||||
|
||||
public void grabMouse(boolean grab){
|
||||
if(grab && !isGrabbed){
|
||||
Minecraft.getMinecraft().mouseHelper.grabMouseCursor();
|
||||
@@ -154,6 +157,7 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose
|
||||
OpenGlHelper.setActiveTexture(OpenGlHelper.defaultTexUnit);
|
||||
}
|
||||
super.drawScreen(i, j, f);
|
||||
setOptionOffset();
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
@@ -602,7 +606,6 @@ public class GuiDialogInteract extends GuiNPCInterface implements IGuiClose
|
||||
textPauseTime = 0;
|
||||
|
||||
NoppesUtil.clickSound();
|
||||
|
||||
}
|
||||
private void closed(){
|
||||
grabMouse(false);
|
||||
|
||||
Reference in new issue
Block a user