> I reply to myself, just to notice that I upload a working version with
> pudding (no textured buttons yet) but fully functional, place a harbour
> to see the change in the behaviour of the button bar (ok its a silly
> thing :D )
got it, why no light?
#from your file
#...
scene = soya.World()
# Creates a new landscape in the scene.
# make some light
sun = soya.Light(scene)
sun.directional = 1
sun.diffuse = (1.0, 0.8, 0.4, 1.0)
sun.rotate_vertical(-45.0)
land = soya.Land(scene)
#....
> Two other things, one is the resize proportion, Im working with
> 1280x1024 but the app is going for 1024x768 if I maximize the window,
> the resize didnt seems to be proportional, I resize from 1024 to 1280
> and the buttons are almos 2 times or 3 times size for only a small
> change (1024->1280)
> Also happens the same if I make the window smaller, the buttons
> dissapear really fast.
yea im trying to work out exactly what the behaviour should be for this.
i think something like this is most suitable for your app at the moment:
class gui_zone:
def __init__(self):
#Pudding the new gui
self.gui_container = pudding.core.RootWidget(width = 1024,height = 768)
self.button_bar = pudding.container.HorizontalContainer(
self.gui_container, left=10, width=384, height=64)
self.button_bar.set_pos_bottom_right(bottom=10)
self.button_bar.anchors = pudding.ANCHOR_BOTTOM | pudding.ANCHOR_LEFT
self.d = self.button_bar.add_child(pudding.control.Button(label = 'Palms'),
1 )
self.d.background_color = (0.3, 0.3, 0.3, 1.)
self.d.on_click = lambda: self.menu_exec(0)
# ...
I think to create buttons that resize proportionally the only way is to
use a container without anchoring.
Perhaps subclassing container would be a good way to go for you..
> And the other thing is the missing FPS widget, any change to bring it
> back ? ;)
sure, when i get round to it. read soya/widget.py and maybe implement it
yourself.
I will put pudding into soya-contrib today so please check there for
further updates.
cheers
dunk