Rob: There is a new variable config.NEW_SKIN which is true when you use my new skin. Just put "if config.NEW_SKIN" around parts you want to add in the freevo code. And I need a list of things you want to know from the skin settings. I'm thinking of background color, border color, border size, radius of a round box and font information for one or two different fonts. Maybe a button style too (color, font, border)?
Here are some things I think we need from the skin:
background color - self explanitory
foreground color - the color of anything to be drawn over the background if the other object doesn't have a specified color.
border color - could be set or default to the foreground color
border size - thickness of the border
border style - There is support for this in the Border class but one one style is implimented. This can be set to 'None' or something similar.
box radius - the radius for corners on popup boxes and other medium to large sized widgets. Button's radius could be a % of this since buttons are way smaller... this could be valid for other small widgets as well.
font information - At least one default font with an average size, a size fiar for displaying messages in popups. If there is no extra font info for other widgets their sizes will be set (+/-) based on this size. If there is no font color available then foreground color will be used.
For buttons and other small widgets (letter box, option box) could optionally have any one, combination, or all of their own:
foreground color, background color, border color/size/radius, font information
AND in adidtion should have properties for 'selected':
selected bg color - more neccessary than the others selected fg color - if not found use the normal fg color selected border color - default to selected fg color selected font color - default to selected fg color
If any information that is needed from the skin is not found then it will be substituted by dorky defaults :) or fall back to other skin properties (if no font color then use fg color etc).
I think that pretty much sums it up for what information the GUI objects need from the skin. If I think of any more I'll let you know, also if anyone else has some ideas I'd like to hear them.
And I need a way to know if there is any gui object visible. If the skin got a draw and there is a gui object, the skin should remember "I must redraw later". After the last gui object is gone, it should call a function inside the skin so it could redraw if necessary.
Well, the MenuWidget is a subclass of GUIObject so if we assume the menuw is the parent GUI object then we can use some GUI properties to find info about its childeren (any popups or overlays). Also we could consider the Skin object the parent GUI and keep track of its childeren, but right now using the MenuWidget to keep track of things is probably easiest. In the future we will most likely have another object to keep track of everything on the screen and running, an app manager, something similar to a window manager.
All GUIObjects have a childeren list which should get appended to when you create a gui sub-object. The easiest way right now to check for visible GUIObjects would be something like:
for child in menuw.childeren: if child.is_visible(): child_area = child.get_rect() # a tupple of left,top,width,height
Also, when I fix it, all existing GUIObjects' _draw() function will return if that object is not visible.
-Rob
------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel