Widget for editing variables through their memory address


08-11-2010 00:15:39

Hi there!

First post MyGUI forums - I just need to say THANKS for this great library ;-)

I am looking for a way to quickly editing my game objects' attributes while debugging. I've used and known other dead-simple gui libraries that let you do something like this:
m_fieldsEditPanel->addEditableField( "Player's jump speed", EDIT_FIELD_FLOAT, &( m_player.jumpSpeed ) );
You see what I mean? You're simply telling the GUI system that you want a widget that lets you edit a variable. You pass the display name for the widget, the type of it and the memory address that will be modified. For example, the gui system would add a slider if it's an integer, a textfield if it's a string...

Now, I know this has a lot of caveats and it can get totally horrible in so many ways: no multithreading control, direct access to a memory address... But I'm just asking if MyGUI supports it, or if anyone has done it. I just need it for quick 'n dirty debugging.



08-11-2010 14:37:55

There is no such functionality in MyGUI, also I haven't seen such things before.
I think I'll try to implement something like that in the MyGUI demos, because it looks pretty useful.


08-11-2010 15:06:43

That would be great! I'll see if I can recall the name of a library I once used for this, and I'll tell you about it.

I think this would be a nice addition to MyGUI. It's good for fast prototyping :-)


08-11-2010 15:40:12

The library I was talking about was AntTweakBar.

If I had checked the name of the library before, I would have seen this post.

Edit: oh boy, I didn't know jacmoe and CaseyB did such a good work with this project called TwOgre. Maybe it's not necessary to do anything to MyGUI after all ;-)


09-11-2010 07:40:28

I had the chance to try TwOgre yesterday, and I found out it does not do what I thought it did. There's no such functionality as what I described, editing memory addresses directly.

So, there's still a good reason to implement the concept into MyGUI.