Description
::UPDATED::
I've got all of the widgets using textures now. I also have the skinning system in place, but I'm planning on modifying it a little.
Now that I've got the system to a point where it won't be modified very much (the interface that is), I'm going to be releasing it within a week or two. I need to fix the rendering system and make some sort of documentation first though. Sadly, it will only be for Direct3D9/Windows since I have no OpenGL or cross platform experience. Maybe in version 2.
Very few features remain to be implemented. Here's a list of what I have planned:
- Allow multiple selection
- Add event messaging
- Add a console system
Switch ListBox mouse-wheel scrolling to hovering instead of active - done
- Add CSS-esque skin system
Add text color values to the skin files for almost all widgets - done
- Add horizontal scrolling to the textbox
- Add multiple cursors
- Add animated cursors
- Add size values to Counter, ListBox, DropDownList, Fader, and Tally
The forum software totally raped my screenshots, so if you want to see the un-raped versions, here they are:
DevShot3
DevShot4
DevShot5
DevShot6
DevShot7
DevShot8
DevShot9
DevShot10
DevShot13
DevShot14
DevShot15
DevShot16
DevShot17
DevShot18
DevShot19
DevShot20
These are from start to finish.
(DevShot1 & DevShot2 are from before the GUI system and DevShot11 is a screenshot of my map system; that's why they aren't included.)
::UPDATE:: (8/04/06)
Ok, I took Metorical's advise and coded up a different example, but it isn't any more pleasing than the other example.
DevShot24
And the source:
Widget* pWidget = m_WidgetMgr.AddWidget(new Image(0, "Graphics\\Backdrop.png", 0, 0, 800, 600, BackdropImageID));
pWidget = m_WidgetMgr.AddWidget(new TextBox(0, "Ho there wanderer!\n\nBefore you can pass into the city, I\nneed to record some of your information.", 15 + 200, 8, 357, 115, MessageBoxID));
((TextBox*)pWidget)->EnableReadOnly(true);
pWidget = m_WidgetMgr.AddWidget(new Label(0, "Name: ", 15 + 215, 140, LabelID));
pWidget = m_WidgetMgr.AddWidget(new TextBox(0, "", 15 + 215, 155, 150, 24, NameTextBoxID, 32));
pWidget = m_WidgetMgr.AddWidget(new Label(0, "Gender: ", 196 + 215, 130, LabelID));
pWidget = m_WidgetMgr.AddWidget(new ListBox(0, 196 + 215, 145, 176, 70, GenderListBoxID));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Male", 24));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Female", 24));
pWidget = m_WidgetMgr.AddWidget(new Label(0, "Race: ", 15 + 215, 230, LabelID));
pWidget = m_WidgetMgr.AddWidget(new ListBox(0, 15 + 215, 245, 176, 150, RaceListBoxID));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Human", 24));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Elf", 24));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Dwarf", 24));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Ogre", 24));
pWidget = m_WidgetMgr.AddWidget(new Label(0, "Class: ", 196 + 215, 230, LabelID));
pWidget = m_WidgetMgr.AddWidget(new ListBox(0, 196 + 215, 245, 176, 150, ClassListBoxID));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Fighter", 24));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Ranger", 24));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Mage", 24));
pWidget->AddChild(new ListBox::ListBoxItem(pWidget, "Theif", 24));
m_WidgetMgr.Render();
int nResults = m_WidgetMgr.EventHandler(Event);
LabelID is an auto-incrementing macro. Each widget has to have a unique ID since I'm using a map that stores widgets (by said ID.)
Sorry for the crappy background, I just threw it in to test out the new Image class.
I modified a few things, like the ListBox class doesn't render it's scrollbars unless it has too (i.e. there are too many items to display) and the TextBox now has a read-only flag.
In DevShot24, the text at the top is in a read-only TextBox, name is a TextBox, and everything else is a ListBox.
On Monday I plan on coding up one of the systems for my 4E5 entry, so I'll post a screenshot of that, which should be a lot better. I might update the demo as well.
System Requirements
Direct3D9
Screenshots
|