Display flags in a graphical table (GUI?) [SOLVED]

Started by Jess, Fri 11/04/2008 11:24:16

Previous topic - Next topic

Jess

I'm new to the board but have been using AGS for a while now. I want to thank everyone for being so helpful and so thorough- every time I've been stumped, the answer's been in a thread.

Now I need some specific help and I haven't been able to find a close enough example in the forums:

I'm trying to make my life easier in debugging and a lot of it has to do with checking to see if all the flags I've set are happening when they're supposed to. I'd really like to be able to call up a debug window that could tell me what the values were of a bunch of the ints I'd said up.

Since it's being tested by people with some unfamiliarity, I thought it would be super helpful to have it show up in a table that was easy to read. I'm pretty sure this is a GUI thing and probably involves the ListBox, I can't for the life of me decipher how to bend it to that purpose.

So for example, if I have ints fBox, fDoom, fHelp, and fThanks and they fell in two categories, RED and BLUE,

I'd want the tester to hit a debug key and see:
------------
RED
-----------
fBox 3
fDoom 0
-----------
BLUE
---------
fHelp 4
fThanks 10
-----------
all nice and neat and in rows.

Help?

TwinMoon

What I usually do is make a GUI with a lot of labels on it.

Be sure to give the labels a name (which you can refer to in the script).
Then, in the repeatedly_execute in the global script, put:

Code: ags
lblfBox.Text = String.Format("fBox %d", value);


where lblfBox is the name of the label and value is the value you're checking.

Jess

Oh, I could kiss you!

That was much easier than the junk I was going to attempt. I didn't know you could muck with the labels themselves like that.

In case worse newbs than me are looking at this thread, the "value" part confused me for five minutes. I put the name of the int in there and it worked like a charm.

Thanks, TwinMoon!

SSH

The Dengvat module has a built in GUI for this kind of thing...
12

SMF spam blocked by CleanTalk