Hi everyone !
I just wanted to notify you of the existence of a wonderful tool (admittedly, since I had the idea

) : WidgetManipulator.
Did it happen to you that you had 150 widgets to lay out on a Xith3D HUD and you shighed that you had no HUD editor ? Those time are (nearly) finished.
WidgetManipulator is used like this :
Widget anyWidget = new AnyWidget(10f, 10f, "blaah");
new WidgetManipulator(anyWidget);
THEN, in your game you should see little handles at each corner of your widget : north-west, north-east, south-east and south-west. These handles can be used to
resize your widget.
Moreover, the now "manipulatable" component is draggable, you can then
relocate it.
Now a small practical example. Let's say I want to add a Xith3D semi-transparent logo to Digibots (as if the interface wasn't bloated enough

).
I'd go to the Xith3D homepage, steal the logo, convert the white into alpha using the Gimp, then add it to my resource bag and finally ADD it to my HUD :
Widget xithLogo = new Image(100f, 100f, ResBag.getTexture(ResourceNames.XITH3DLOGO));
hud.addWidget(xithLogo);
Then here's what it gives :

Not really fancy, heh ?
So I add this line :
new WidgetManipulator(xithLogo);
And here's what I get :

Now you'll discover the real power of this tool.
After I've resized then dragged my component, a stack trace is automatically dumped to the console. It's not the current stack trace : it's the stack trace of when you called WidgetManipulator :

Then you just have to click on the third entry, which is from where you instanced the WidgetManipulator, and Eclipse brings you to the right place :

And then and THAT IS THE GREATEST MAGIC ! Just do : Ctrl + V (or paste, if you prefer

) and here's what it gives you :

Now just rename "image" to xithLogo and you're done ! (Note : if anyone has a hack so that I can guess the name of the variable the WidgetManipulator is passed, I'd be pleased to know that

)

And now the Xith3D logo is well/better positionned :

Now, a few things :
- Draggability of objects is somewhat bugged. It's up to Marvin to fix that. Now he's informed so no excuses

Especially, widgets stop moving when the mouse is moved so fast that it gets out of the widget in a render step and they don't stop dragging when the left button is released.
- If anyone has a knowledge of stack traces and now how to filter them so that it displays only the third line, please tell me (I haven't even searched, though, it's functional as it is).
- As I said, if there's a mean to guess a variable name which has been passed as a parameter to a constructor/function, please tell me.
ENJOY !
PS : Maybe i'll expand that to a "real" HUD editor, but it wouldn't be the same approach... It would be xml-based.