Hi there!
I'm playing around with soya3D, using the debian version 0.14-2_i386.
I have some problems understanding how to use the soya.gui widgets.
Perhaps someone can help me with some of my questions:
- Are there any options to use an absolute layout for positioning widgets?
- Can I set a fixed width for buttons instead of the calculated one?
- How can I add an image to a button or simply add an image to a container?
Regrading the image I've tried the following:
class CharSelector(soya.gui.Window):
def __init__(self, parent, title = u"Characters", closable = False):
soya.gui.Window.__init__(self, parent, title, closable)
table = soya.gui.VTable(self, 4)
soya.gui.Image(table, soya.Material(
soya.Image.get("selector.png")))
soya.gui.Image(table, soya.Material(
soya.Image.get("selector.png")))
soya.gui.Image(table, soya.Material(
soya.Image.get("selector.png")))
soya.gui.Image(table, soya.Material(
soya.Image.get("selector.png")))
soya.gui.Button(table, u"Logout", self.on_logout_click)
soya.gui.Button(table, u"New", self.on_new_char_click)
soya.gui.Button(table, u"Delete", self.on_delete_char_click)
soya.gui.Button(table, u"Select", self.on_select_char_click)
I've also tried so write my own ImageBox but it didn't work:
class ImageBox(soya.gui.Layer):
def __init__(self, parent, material = None, size = (64, 64)):
self.image = soya.gui.Image(self, material)
self.image.allocate(1, 1, size[0]-2, size[1]-2)
Either way no widget is drawn at the positions where the images should be :(
Hope someone can help...
greetz Andreas
_______________________________________________
Soya-user mailing list
[email protected]
https://mail.gna.org/listinfo/soya-user