[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[pygame] Percentage sizing/positioning of GUI widgets



I'd like to ask for your thoughts on relative positioning/sizing of
widgets.

So, I suppose the best case scenario is that you could assign a
percentage value to any rect attribute and it would automatically
resize/reposition when things change size.
	This might be too complicated, and actually rather unnecessary.

The key requirement is to keep widgets at a consistent size/position
when using different screen resolutions.

Do you think it would be acceptable to keep it limited to just setting
the pos attribute, without automatic repositioning?

So, you can set the pos attribute when creating the widget, or change it
later, and it will set it's position relative to the size of it's parent
or the screen. You can also set the size in the same way (though size
can only be set at creation time).

This would cover the use case of differing screen resolutions, using the
combination of percentage size and position.


My main question: what is the minimum requirements you would have for
relative positioning?

Attachment: signature.asc
Description: This is a digitally signed message part