textbutton xmaximum ignored
Posted: 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:
but if I try the same inside the button codes, it doesn't work (same button size):
xmaximum 100 is completely ignored. I don't understand then how I can change the xmaximum in preferences ? 
Code: Select all
style.pref_vbox.xfill = True
style.pref_button.size_group = "pref"
style.pref_button.xalign = 1.0
style.pref_button.xmaximum= 120Code: 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)