-
Notifications
You must be signed in to change notification settings - Fork 86
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
Wishlist of Features and QOL Improvements #177
Comments
It's not easy to call out the bits I'd support as it's one big list but on the whole, for what it's worth, I think it's a pretty great list. Two biggies: |
Can this not be re-written as:
?
Having initial text/default text is a good idea. I guess it'd need also need an option for the different behaviour, because I'm sure someone else will want default text that stays set when the user starts to edit the text line. Multi-line text entry should be much more possible once I've finished refactoring & unifying the underlying text rendering code, something that is currently underway. The height of the line is slightly fiddly, I wanted the behaviour where the line just grows to the height of whatever font size is used by the line, so that's what it always does right now by default. Probably I should allow an override option so it respects the value set in the rect, even if it's is too short/too tall for the text. The other things sound fairly straightforward.
All this sounds fairly straightforward. The text box should get quite a few changes from the general text refactor anyway.
I believe the drop down used to work like this with separate button functionality but there was a request to combine them. It's slightly awkward to make it optional without adding ever more constructor parameters but I may fiddle with it at some point. What was the use case for having the main button not do a drop down/up action? Just aesthetics/preference?
I think this is a good idea and something that should be fairly straight forward to add as a global setter/getter function with some error handling. It it likely also possible to add a default, default manager for the cases where no manager is created, or set that just uses the default theming and the size of the screen/window. 👍
This works in the examples, so I'm not sure what issue you are having.
Yeah, this could likely be added to the html parser. I'd like to support multiple formatting parsers one day too, but finding the time :)
I believe the attribute for this is called
Sounds like a decent idea for a new element. |
Thanks for the reply!
uh, yes. Don't know how I missed that 😅.
Cool, I'll try that! |
Closing this now as all tasks have been completed, separated out into new issues or were currently unable to be implemented. Or I lost them along the way because there was a lot to digest in this issue. If you feel there is something missing after 0.6.5 is released (other than the UITable which won't make it yet), feel free to return and add these as separate issues. |
First off, thanks for making such a great library. 👍 This is one of, if not the most complete gui library for pygame I have seen. However, there are a few major and a couple minor issues that make the library rather unintuitive to use.
Issues
Long import statement
The import statement is huge, and, as you can't do multiple imports, requires a dedicated import for every element. The length also makes it virtually impossible (or at least incredibly irritating) to create an object without a dedicated import statement.
UITextEntryLine
.clear()
method to clear the text, the same as the current.set_text('')
. Add clear() to text box and text line #316home
andend
. Add HOME & END key support to text entry line #318UITextEntryLine
is empty. Add placeholder text input parameter to text entry line #315UITextBox
.clear()
method to clear the text, instead of calling.kill()
. Add clear() to text box and text line #316.set_text()
method to change the contents, rather than the current method.Implicitly initiate empty if no. - this is not possible without API breakhtml_text
parameter is provided.get_pos()
method to get position. - can do this withtext_box.get_abs_rect().topleft
etc is generally superior to just one get_pos() as you can get the.right
,.centerx
etc type attributes which should be familiar to users of pygame.UIDropDownMenu
Not sure what the reasoning is for these two. It used to work more like this but then somebody asked for it to work the other way.
Implicit
UIManager
__init__.py
you can 'register' a default manager with. Would need to raise an exception if you didn't supply a manager and also hadn't registered a default manager. I guess we could also just register the first manager created as the default manager... Add global default UIManager option #320Adding the same boilerplate
manager=manager
to every object gets tiring quickly. It would be nice to have an option to set a default manager that is used when no explicit manager is declared.html_text
\n
to<br>
would be nice. Add optional pre-parse step to UITextBox converting /n to <br> #319Special Effects
Table
ui_element
Let's say I was in the (not uncommon) situation of wanting to display multiple pieces of information to the user at one time. To keep it simple, let's say I wanted to display name, hp, xp, level, and mana. To do this the traditional way, this would require 5
UITextBox
es, 10 if I wanted to display what the value stood for next to it. Enter the (tentatively named)UITable
. With only oneui_element
it should be possible to keep track of all those pieces of information.The text was updated successfully, but these errors were encountered: