[Bf-committers] User-defined Material Properties
gtmacdonald at gmail.com
Fri Oct 14 03:42:25 CEST 2005
> Using an improved version of the current system (see properties in Logic
> buttons win) fits well with this, since the button sets have fixed
> dimensions and new properties are simply added below the last addition.
That was my first instinct. We can make things fancy after basic
functionality is implemented. One thing I've noticed with the game
properties is that long names or values tend to become unreadable with the
fixed width. Then there's also the issue of panel height being set to a
fixed value. We could fix both these problems by resizing panels in either
direction, assuming its okay to do that. I know it's possible, but I've yet
to see anyone do it. That would probably be ugly.
Maybe we could resize just in the horizontal direction so long button
content can be displayed and then create new panels automatically for more
buttons. The alternative is to expose all gui functionality to python
scripters, and let them work it out.
I think I'd prefer the automatic panel generation with width resizing and
hints on where to start a new panel and what to name the new panel.
For more control over the layouts, though, either:
> 1) Python code (probably in callbacks) to create / place gui elements or
> 2) some simple xml format to define these guis
> would work well. The first option is more like things already are,
> besides being a way to have #2 easily, too -- using Python itself, to
> parse the xml data into py code.
I'm not sure what you mean by xml format. XML by definition isn't supposed
to have any formatting. Style sheets are supposed to take care of that. If
you're thinking of storing gui commands in xml, or a description of the gui,
that's a different story. QT does this. QT Designer outputs an xml gui
description and then a command line utility is run which converts the xml
gui to c++ code. And I think KParts uses xml to merge gui elements from
plugins into the main app. Its very slick because it looks as if it was
always there. I'm not sure how QT can do this without having formatting
information in the xml...
I'm a little fuzzy on what you get with xml other than a free parser,
validator, and editor. Which is big for file formats or web documents. Feel
free to take me to school. :)
So what would be the advantage to using xml descriptions instead of a
callback script with methods to create new panels and buttons?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Bf-committers