Author Topic: Scripting a GUI  (Read 835 times)

I am at a total loss as to how to script a GUI that i had "attempted" to make...
What I am wanting to happen is when you click a button on the GUI, it automatically enters something into the console. Like if i were to enter jump(1); into the console, only the button would do it for me. I got the .GUI, i Just don't understand the .cs, and how It all works. Any help would be appreciated.
I followed AGlassOfMilk's tutorial, trying to improv, like on the button, in the command box i put the console command. I have no idea if this is right or not.

 Thanks,
 Kyjus.

On the button's settings, set the command box to jump(1);

so then does that mean i don't need a .cs file in the zip folder?

Correct but I think that you can still do it with a cs file if you want.

I scripted GUIs a long time ago yet I forgot how to do most things.

You could make a function of some sort that toggles it.
And have the button call that.

Ok.. It works. I just gotta put in canvas.pushDialog(___);  into the console..
except the problem is i can't close it. anyone know the command to exit it?
The 'X' at the top won't close it.

i think it's canvas.popDialog(__);
or at least i think that's why my friend entered...

That worked! thanks everybody! locking topic.