-
Notifications
You must be signed in to change notification settings - Fork 9.9k
refactor(raylib): Move widgets to the widgets folder #35680
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
Conversation
Yes, we're sort of doing things in stages or as we touch them. Things should use Widget if possible. Scroller should be a widget, but scroll panel should not since it doesn't deal with rendering and instead handles mouse clicks. Can we keep that in lib/? Can you also see about making the classes you moved use Widget (and remove some code in the process by using the Widget class's helpers)? |
Sounds, good. I've updated it.
I'll see what I can do, but I also have a few other things I want to look at. |
I see they're functions right now, that's okay to do in a separate PR. I started here: #35571 |
I'm working on it! |
Summary and reason for change:
I've found the raylib code structure a bit random. There are several components that extend the
Widget
class (and some that don't but should) that aren't in the widgets folder, so I've moved them there and updated the imports (sorting as necessary).Also I moved the
Widget
class into the base file of the widgets module to make imports a bit less verbose.List of changes:
Moved files:
system/ui/lib/widget.py
→system/ui/widgets/__init__.py
system/ui/lib/button.py
→system/ui/widgets/button.py
(not aWidget
class but probably should be)system/ui/lib/inputbox.py
→system/ui/widgets/inputbox.py
system/ui/lib/label.py
→system/ui/widgets/label.py
(not aWidget
class but probably should be)system/ui/lib/list_view.py
→system/ui/widgets/list_view.py
system/ui/lib/scroller.py
→system/ui/widgets/scroller.py
system/ui/lib/toggle.py
→system/ui/widgets/toggle.py