[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Percentage sizing/positioning of GUI widgets
- To: pygame-users@xxxxxxxx
- Subject: [pygame] Percentage sizing/positioning of GUI widgets
- From: Sam Bull <sam.hacking@xxxxxxxx>
- Date: Thu, 26 Jul 2012 11:32:48 +0100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Thu, 26 Jul 2012 06:33:02 -0400
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=sent.com; h= message-id:subject:from:to:date:content-type:mime-version; s= mesmtp; bh=r7Rmp8eh4P3dkcXT6l3upGBk8WI=; b=h8v5gLvfpzJf7O5V45/YY eO/04cHnX5gIM6kH91RBcVMink0+p9c+Q6us0cAJpHyrHrneBsUCCokIaoCISCPP WC13bCrtWCq8FBZhJKeOpRoy2ZeJ3Tprx/42+oRxcDGll2c4aTynV0+2ZMsIAAZA eKKZy6RP6c+kHvA/m2PTmk=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=message-id:subject:from:to:date :content-type:mime-version; s=smtpout; bh=r7Rmp8eh4P3dkcXT6l3upG Bk8WI=; b=PwAiP9FEC5mEFbOo3KOr9S4CQ99G0ajpaL5t3t7fCg5f9HlSFF2mVa 0lK9xqFi3fCf0NXM4vJRCdqZwa/nn8KkEfo0Es2cSjqOxXiG4+x9WOeEGUcTnBTJ OJb0DW+BTNiR3co3nhrrBA7zOjqJwkGYrJtzzA3RU0zBoJQA/nc34=
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
I'd like to ask for your thoughts on relative positioning/sizing of
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
Description: This is a digitally signed message part