-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ui: Initial UI rewrite using pyray (spinner and text window) #34583
Conversation
1d63cd9
to
49ec688
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose we structure it like this:
system/ui/
spinner.py
text.py
lib/
application.py
resolved |
self._view = rl.Rectangle() | ||
self._show_vertical_scroll_bar: bool = show_vertical_scroll_bar | ||
|
||
def handle_scroll(self)-> rl.Vector2: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
scrolling with a wheel doesn't feel natural
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rl.begin_scissor_mode(int(textarea_rect.x), int(textarea_rect.y), int(textarea_rect.width), int(textarea_rect.height)) | ||
for i, line in enumerate(wrapped_lines): | ||
position = rl.Vector2(textarea_rect.x + scroll.x, textarea_rect.y + scroll.y + i * LINE_HEIGHT) | ||
rl.draw_text_ex(gui_app.font(), line.strip(), position, FONT_SIZE, 0, rl.WHITE) | ||
rl.end_scissor_mode() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the text area tears while scrolling
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@maxime-desroches I propose switching to the official raylib library instead of our custom-built wheel on PC. This should help avoid the version 'GLIBC_2.38' not found issue. |
Already done - 9ccfecb |
3a302ae
to
e265911
Compare
The styles still need refinement, and additional improvements are required. However, this should be sufficient as an initial version to start with.