In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
-
jack_norton
- Lemma-Class Veteran
- Posts: 4067
- Joined: Mon Jul 21, 2008 5:41 pm
- Completed: Too many! See my homepage
- Projects: A lot! See www.winterwolves.com
- Tumblr: winterwolvesgames
-
Contact:
#1
Post
by jack_norton » Thu Dec 30, 2010 4:19 am
I'm doing a custom preferences modifying the existing one, I wanted to add a "difficulty setting" option. I have found a bug (I think). If I set the buttons xmaximum, I can change the width of buttons:
Code: Select all
style.pref_vbox.xfill = True
style.pref_button.size_group = "pref"
style.pref_button.xalign = 1.0
style.pref_button.xmaximum= 120
but if I try the same inside the button codes, it doesn't work (same button size):
Code: Select all
frame:
style_group "pref"
has vbox
label _("Game Difficulty")
hbox:
for i in range(3):
textbutton ("{size=18}"+SDiff[i]+"{/size}") xmaximum 100 action SetDifficulty(i)
xmaximum 100 is completely ignored. I don't understand then how I can change the xmaximum in preferences ?

-
PyTom
- Ren'Py Creator
- Posts: 15893
- Joined: Mon Feb 02, 2004 10:58 am
- Completed: Moonlight Walks
- Projects: Ren'Py
- IRC Nick: renpytom
- Github: renpytom
- itch: renpytom
- Location: Kings Park, NY
-
Contact:
#2
Post
by PyTom » Thu Dec 30, 2010 10:29 am
xmaximum only takes affect if the button wants to be bigger than that. You might also want to set an xminimum on the button.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
"Silly and fun things are important." - Elon Musk
Software > Drama •
https://www.patreon.com/renpytom
Users browsing this forum: No registered users