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

Add a minimize button to UIWindow #108

Open
void4 opened this issue Apr 29, 2020 · 6 comments
Open

Add a minimize button to UIWindow #108

void4 opened this issue Apr 29, 2020 · 6 comments
Labels
enhancement New feature or request
Milestone

Comments

@void4
Copy link

void4 commented Apr 29, 2020

Is your feature request related to a problem? Please describe.
Sometimes, a window is opened by a button, and should be hidden by clicking the same button.

Describe the solution you'd like
A function that makes the window and all components within it temporarily invisible and inactive.

Describe alternatives you've considered
It is possible to just move the window position out of the visible screen, it works, but that's not elegant.

@void4 void4 added the enhancement New feature or request label Apr 29, 2020
@MyreMylar
Copy link
Owner

I think I could probably add something like this.

It'd mostly just be wrapping pygame.sprite.kill() and then an 'unhide()' function to re-add it to whatever drawing group it's part of. I'll bundle it up with #95 when I get to that.

@void4
Copy link
Author

void4 commented Apr 29, 2020

It would great if one could also optionally disable/remove the "close" button on the window frame and replace it with/append a "minimize" button that would have the hiding functionality described above.

@ylenard
Copy link

ylenard commented Jun 10, 2020

Show and hide methods for UIWindow were implemented in Pull Request #136

@MyreMylar
Copy link
Owner

MyreMylar commented Jun 12, 2020

Think I might rename this to be about adding a 'minimize' button now that show/hide is in the master branch.

@MyreMylar MyreMylar changed the title Hide (not close/kill) UIWindow Add a minimize button to UIWindow Jun 12, 2020
@MyreMylar
Copy link
Owner

I guess the main difficulty with a minimize button is that without making a whole OS structure for windows there is no obvious way to unhide windows hidden in this way. I guess I could make a new element that works a bit like a taskbar for windows and you could include or not include it at your peril when using windows - or perhaps I should leave that up to users to figure out?

@ylenard
Copy link

ylenard commented Jun 18, 2020

I think minimize button won't make any sense without a task bar element.

Perhaps it should be possible to choose what happens when the "close" button is clicked - this way the user would be able to make use of the UIWindows and create them only once without altering existing UI structure.

I do believe that TaskBar element would be a useful addition to the module though, but I don't think it's the most important widget that's needed currently - I'd say Tabs > Spinner > TaskBar.

@MyreMylar MyreMylar added this to the Version 0.7.0 milestone Jul 17, 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

3 participants