Skip to content

Commit 3c22105

Browse files
committed
Fix scroll indicator position and terminal layout
Reverted terminal dimensions to balanced 40px margins after previous adjustment caused scroll indicator to appear outside borders. Changes: - Restored terminal margins to 40px (balanced layout) - Fixed scroll indicator position to Y-40 (above input field) - Scroll text now properly positioned inside terminal borders - Input field has proper spacing from bottom border The scroll indicator now appears above the input field in the bottom-right corner, well within the terminal boundaries.
1 parent ed7aaba commit 3c22105

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/main/java/com/opencode/minecraft/gui/OpenCodeGuiScreen.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,9 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia
238238
// Render dark background to prevent blur
239239
renderBackground(guiGraphics, mouseX, mouseY, partialTick);
240240

241-
// Calculate dimensions
241+
// Calculate dimensions with proper margins
242242
int terminalWidth = this.width - 40;
243-
int terminalHeight = this.height - 40;
243+
int terminalHeight = this.height - 40; // Balanced margins
244244
int terminalX = 20;
245245
int terminalY = 20;
246246

@@ -299,14 +299,14 @@ public void render(GuiGraphics guiGraphics, int mouseX, int mouseY, float partia
299299
// Render widgets (input field)
300300
super.render(guiGraphics, mouseX, mouseY, partialTick);
301301

302-
// Draw scroll indicator if needed (inside terminal, bottom right)
302+
// Draw scroll indicator if needed (inside terminal, above input field)
303303
if (messageHistory.size() > maxVisibleLines) {
304304
String scrollInfo = String.format("[↑↓ scroll %d/%d]",
305305
Math.max(0, messageHistory.size() - maxVisibleLines - scrollOffset),
306306
messageHistory.size() - maxVisibleLines);
307-
// Position inside bottom border
307+
// Position above input field, bottom right
308308
int scrollX = terminalX + terminalWidth - this.font.width(scrollInfo) - 12;
309-
int scrollY = terminalY + terminalHeight - 12;
309+
int scrollY = terminalY + terminalHeight - 40; // Above input, inside border
310310
guiGraphics.drawString(this.font, scrollInfo, scrollX, scrollY, 0xFFffbf00, false); // Amber
311311
}
312312
}

0 commit comments

Comments
 (0)