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

Scalable UI #13

Open
budda opened this issue Aug 20, 2015 · 4 comments
Open

Scalable UI #13

budda opened this issue Aug 20, 2015 · 4 comments

Comments

@budda
Copy link
Contributor

budda commented Aug 20, 2015

How do I define a GUi that can scale to fill different screen sizes. Probably using percentages and maybe minimum / maximum sizes for some components in the UI ?

Example would be the App demo screen 2 with the item blocks in the List components could become a bigger area on a larger canvas size and leave other buttons the same sizes etc.

What I was looking for is something like the Amiga MagicUser Interface system did - where components weren't fixed to pixel positions.

"Elements are not placed directly to some fixed locations but are instead grouped in special containers which then dynamically control display and positioning" ...taken from http://www.sasg.com/mui/concepts.html

@budda
Copy link
Contributor Author

budda commented Aug 20, 2015

I suppose this may be possible by allowing child components in the JSON to use percentages for their width & height sizes maybe ?

@budda
Copy link
Contributor Author

budda commented Aug 20, 2015

Looks like the current "workaround" is to create the GUI definitions at run time as seen in the app demo phaser.html :-/

@alaa-eddine
Copy link
Contributor

unfortunately, relative sizes are still not implemented, they are in my todo list but I'm still looking for the best approach to handle them.
since mobile games are the ones which need EZGUI the most, I need a good way to handle both percentages AND devices DPI, without adding complexity layers to the GUI definitions (which are already quite complex)

@Shadowstep33
Copy link

well, this is rlly not my area but what if each element (or top lvl element at the least) were constantly listening for an on screen change. That way, the element itself would become responsive instead of having a different layer (presumably, with it's own set of elements). EventEmitter that pixi uses may be useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants