From 3436dde6cfe9fc74e9d0a4f78b57b913845a8b0e Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Fri, 25 Apr 2025 13:55:45 +0100 Subject: [PATCH] ui(raylib): start scroll at bottom of text window --- system/ui/text.py | 1 + 1 file changed, 1 insertion(+) diff --git a/system/ui/text.py b/system/ui/text.py index 53ea2333ce..d2e7a1e433 100755 --- a/system/ui/text.py +++ b/system/ui/text.py @@ -48,6 +48,7 @@ class TextWindow: self._wrapped_lines = wrap_text(text, FONT_SIZE, self._textarea_rect.width - 20) self._content_rect = rl.Rectangle(0, 0, self._textarea_rect.width - 20, len(self._wrapped_lines) * LINE_HEIGHT) self._scroll_panel = GuiScrollPanel(show_vertical_scroll_bar=True) + self._scroll_panel._offset.y = -max(self._content_rect.height - self._textarea_rect.height, 0) def render(self): scroll = self._scroll_panel.handle_scroll(self._textarea_rect, self._content_rect)