Skip to content
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

Create a UITable element #317

Open
MyreMylar opened this issue Aug 14, 2022 · 0 comments
Open

Create a UITable element #317

MyreMylar opened this issue Aug 14, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@MyreMylar
Copy link
Owner

MyreMylar commented Aug 14, 2022

Originally suggested here. Pulled out into it's own issue for clarity because it is hard to handle large issues nested inside a multi issue chain.

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 UITextBoxes, 10 if I wanted to display what the value stood for next to it. Enter the (tentatively named) UITable. With only one ui_element it should be possible to keep track of all those pieces of information.

# Note that this is only an example implementation to show desired features
character_sheet = UITable(relative_rect=Rect(x, y, w, h), manager=manager)
character_sheet.title = 'Character Sheet'
character_sheet.add_column(header=None, rows=['name', 'hp', 'xp', 'level', 'mana'])
character_sheet.add_colum(header=None, rows=['Bob', 10, 0, 1, 10])
@MyreMylar MyreMylar added the enhancement New feature or request label Aug 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant