I fixed a bunch of little things and added a nice new bug that can't really be fixed. Here's a list of pretty much everything that's been done:
- Each main widget recieved a LoadSkinInfo() static function as well as some corresponding static variables. This function take's the skin directory, not an actual filename.
- WidgetManager gained a LoadSkinInfo() which calls all off the main widget's LoadSkinInfo()
- Faders now work correctly(meaning left is 0, not 10 and right is 255, not 245; this gives me hope for scrollbars.)
- ListBox buttons are now on the right side
- The DropDownList button is now on the right side
- The Tally's plus/increase button has been moved to the right side
- The Counter's plus/increase button has been moved to the right side
- Button recieved some overlay information (to allow for texture overlays)
- Each widget is now the EXACT size that you set it at (before some widgets were way off. For example, the buttons for the list boxes were at (Position - 28), the tally's display area was about 52 pixels longer due to the buttons, the counter was about 28 pixels longer, etc.)
- A file system was put into place (but is going to be replaced with a CSS like file system in the near future.)
- The Tally's bars are now textured
- The ListBox's buttons, DropDownList's button, Tally's buttons, and Counter's buttons were switched over to the overlay system.
- The CheckBox was switched over to a textured X.
- Modified some of the Set() funtions for some widget. The Fader is an example, I removed the Text parameter from it's Set() method since it doesn't have any text.
The bugs that I mentioned have to do with the Tally system. I tried to set a limit so that it would only display as many as it could fit, but my calculations are off or something because sometimes (depending on the size of the widget) it may display one to many.) Either way, if used properly it should work fine. I included this widget for use in a system like Baldur's Gate's weapon proficiency.
Anyway, screenshot time!
Textury
Here are a few of the files that it uses (the comments are added so you know what each value is):
Skins\Default\ListBox.txt
0 // X offset86 // Y offset12 // left side width12 // top height12 // right side width12 // botom height255 0 0 0 // inactive background argb color255 51 51 51 // hover background argb color255 51 51 51 // active background argb color255 204 153 0 // clicked background argb color255 255 255 255 // inactive text argb color255 255 255 255 // hover text argb color255 255 255 255 // active text argb color255 0 0 0 // clicked text argb color
Well actually, that's the only one that I'm going to show since the rest pretty much look exactly the same except without the color values.
When I get around to chopping apart my CSS loading code, the above file will look something like so:
button.MainMenu{ Offset: Point(0, 86); Sizes: 12; Background-Color: argb(255, 0, 0, 0); Hover-color: argb(255, 51, 51, 51);}
You get the idea. And yes, I am thinking about allowing different classes. All of the CSS loading code is done, I just have to add some pre-defined function parsers and chop into a library.
I'll upload a demo in the morning, I'm too tired right now.