I applogize for being out of touch for so long. I once again have changed jobs. Anyhow, here’s a cleaned up version of what I have currently working. There’s still a lot to do, and I’m sure plenty of bugs. Please post any bugs, and I’ll get to them as quick as I can.
Review the TODO list within the project workspace.
This library extention requires Java 5.0.
There is deprecated information in the xml file and the corresponding code. I'll be removing that soon.
I really think that the GameState System should be modified to allow for more than one state active at a time. This would allow for a gui state over a 3D state.
[/list:u] What's Working
(This is all using the default Text object... no custom text yet)
XML Look and Feel Scheme Loading
Movable FrameWindows - Textured
Buttons - Textured & Drawn
EditBoxes - Textured & Drawn
Combo - Combination EditBoxes and Buttons
AbsoluteLayoutManager
[/list:u] What Still Needs Doing
Tutorial on how to create a new component - ProgressBar
Scroll Bars & Scrollable Regions
Drawable FrameWindows
Resizing
GridBagLayoutManager
Text Objects - Dynamic Texture, Multi-Quad (Like the current ui.UIText), and expanded Display List (Like the current scene.Text).
Non-Editable EditBox - TextBox.. or StaticTextBox
[/list:u] What You Can Make From What's There
From the example of the current components it should be straitforward to create these:
DropDown Menu Box - Just a Non-Editable EditBox in a Combo
ProgressBar - Basic UIWindow derivation
Tabs - Buttons with cullable sets of components
CheckBox / RadioButton - Just a UIButton with slight difference in state switching
Basic Static Image - I haven't tried it actually, but a stand alone instance of a UIWindow should work just fine.
[/list:u] Please try this out and tell me what you think.
Check out the files area listed above for two sets of patches that give new functionality:
0.11 - Non-Editable EditBoxes (Static Boxes) and Non-Editable Combos (Drop Down Menus).
0.12 - Fixed XML so that features are under texture sets, thus allowing more than one texture set per laf scheme. Also added a new component UIImagePanel which is a replacement for UIBillboard. And finally an updated Test State for showing off this new functionality.
I don’t think I was clear here, you’ll want both files.
This is great, but I’m getting errors from the zip file. Some data in the file may be damaged is what it’s saying. Bad CRC’s. That’s from the main source file btw.
I echo DP’s sentiments about Java 1.5 being required. Currently OS X 10.3, and even Tiger (10.4) don’t have it yet, in addition to the millions of Windows users who don’t upgrade their version of Java.
Looks great Guurk. I have yet to download it and try it, but the screenshots show a lot of promise.
I particularly like the idea of designing the GUI’s look and feel in a scriptable fashion to remove the need to compile GUI changes. What’s the chances of also defining the widget elements in this XML? Position, size, etc.
Have you taken a look at samskivert’s BUI stuff? Perhaps, you guys can bounce ideas off one another.
Doing xml based gui initialization would be straitforward. The use might be a little dubious when I think of how dynamic guis seem to be within a game. Could you maybe give me an example of how you’d use it?
One other question I have is about clipping. Could you maybe give some pointers about how I might set up scrollable subnodes that are clipped? I keep thinking there must be an easy way to do it and figure you’ve gotta have something in that treasure trove you call a mind.
But something that would allow you to define the components, appearance, heirarchy and position of the windows at runtime rather than compile time.
One other question I have is about clipping. Could you maybe give some pointers about how I might set up scrollable subnodes that are clipped? I keep thinking there must be an easy way to do it and figure you've gotta have something in that treasure trove you call a mind.
I would keep it simple as possible. Something like:
where contains is a method that simply determines if the scrollables position is within the boundaries of the panel that owns it. So as things scroll outside of the panels borders, you stop drawing them. If you are using the LWJGLRenderer to draw and as such are relying on the scenegraph for rendering, you can do:
Thanks Mojo… your thoughts will help with scrolling I’m sure. I’ll probably get to that next week.
Here’s what I’m implementing right now:
The xml would look like the following for the exact same test state that’s hard coded in the current test.
The interesting part of this is two fold.
One: allowing the user to then gain access to whatever components are available by name.
Two: doing the method linking so that you can define methods to get the events on components that are configured via xml.
I only have about an hour of time available right now until Monday… we’ll see how much I can get done :P.
I’m working from the premise that I’m extending my StandardUIGameState into a XMLUIGameState. Then you extend from that, pass in the state.xml filename to the super() constructor and then only implement the method callbacks.
Yes I am… what you don’t have a nano timer in 1.4 :D… sorry about that, I just set up Eclipse to use 1.4 compiler compliance… I’m still using 5.0 libraries underneath. I don’t even bother with 1.4 for the most part.
I’ve now released the ability to set up your initial gui state via xml. This new test example produces the exact same gui as the previous hard coded example which is still in the test area.
I’ve had to add a little bit of new functionality to allow the dynamic run-time registration for events. This needs to be somewhat expanded but I figured I’d get the stuff out there for test and feedback before finalizing.
One cool feature is that if you extend from UIWindow or a subcomponent and keep the exisiting constructor interface you can then put your new class within the xml for configuration.
As a side note. When are we going to support Java 5.0. I’m really missing the features I had to comment out. And I’d like to be using Annotations for some stuff too.
according to the apple site, it appears 1.5 sdk is available for Mac OSX… but only for Tiger. (see FAQ #1:http://developer.apple.com/java/faq/) And according to the above site, it’s only ever going to be on Tiger or above.