I finished all the Javadocs for the UI API. That was quite some work, so you better read it! You can find it in the usual place. I suggest starting with Container to get to know how to do layouting, then read Skin then work through the rest of the classes in the ui package.
From just having a quick read through the api docs of the Container i gathered that it is not possible to apply Actions to an element in a container. How would you create UI animations?
You can animate the container. The reason for these limitations are:
– layouting takes away control over the size and position of a widget
– rotated widgets that need clipping are impossible to do without a stencil buffer. and that is a too severe limitation on an application imo.
Widgets outside of a container, directly added to a Stage can be animated, with some restrictions depending on the widget type.
Awesome stuff this UI API, congratz for shipping would say google 😉
I don’t know if there has been any improvement on the input management over what can be seen in the previous video, but you could facilitate the user inputs by not checking if the touch input were done inside a component area. On the contrary, for each touch event, compute what is the nearest component, and compare the distance against some kind of DPI threshold, like “0.5 cm”, depending on the overall area of the component.
Indeed, large components do not need an extra area for inputs, but you seem to have some trouble with checkboxes and comboboxes. this might resolve these problems.
I just tried this in HOMC (a simple game prototype that I’m working on) and may well find myself retrofitting it to that damned infernal robot game as it works rather well for my simple requirements and, yet again, saves me from having to reinvent the wheel. Thanks!
I just want to know how to use many Buttons in a stage.
The docs are awesome. Thanks!
I don’t suppose there is a fully functional skin xml and skin texture to use as an example is there? I’d really like to try this out and see if its going to meet my needs without having to generate a skin first.
Sure there is, see http://code.google.com/p/libgdx/source/browse/trunk/tests/gdx-tests-android/assets/data/uiskin.xml and http://code.google.com/p/libgdx/source/browse/trunk/tests/gdx-tests-android/assets/data/uiskin.png
For an example see http://code.google.com/p/libgdx/source/browse/trunk/tests/gdx-tests/src/com/badlogic/gdx/tests/UITest.java