Page 1 of 2

GUI Menus Tutorial

Posted: June 7th, 2010, 1:18 pm
by Leo_V117
Heres a tutuorial planned by me and Arc (arcones) to assist you guys in creating your own GUI menus.

Heres a list of Functuions that allow you to create/open the menu:

newgui - Format:

Code: Select all

newgui "Name" [
- Function: Creates the Menu.

showgui - Format:

Code: Select all

[showgui "Name"]
- Function: Works well with "guibutton" as the function to open the menu.

cleargui - Format:

Code: Select all

cleargui
- Function: Works well with guibutton to close the menu.


Heres a list of known and used commands and what they do:

guitext - Format:

Code: Select all

guitext "text"
- Function: Creates a text area for information to be added.

guibutton - Format:

Code: Select all

guibutton "name" [function] icon
- Function: Creates a Button that allows other options in the menu.

guibar - Format:

Code: Select all

guibar
- Function: Creates a bar that splits options and text within menus.

guilist - Format:

Code: Select all

guilist [
]
- Function: Allows a list to be created in a Menu.

guitab - Format:

Code: Select all

guitab "Title"
- Function: Allows Tabs to be used in menus.

guistayopen - Format:

Code: Select all

guistayopen [
- Function: Allows options to be selected in a menu without closing the menu.

guititle - Format:

Code: Select all

guititle "Title"
- Function: Creates the Title of the menu above the menu content.

guiimage - Format:

Code: Select all

guiimage "location" *size*
- Function: Allows an image to be placed in the menu.

guicheckbox - Format:

Code: Select all

guicheckbox "name" *function*
- Function: Creates a Checkbox that Toggles effects on/off.

guilistslider - Format:

Code: Select all

guilistslider *function* "range"
- Function: Creates a scroll slider in the menu that allows you to change Volume/Frames/MapSize etc.

guifield - Format:

Code: Select all

guifield *function* -"textrange"
- Function: Creates a Text Box in the menu that allows data to be added.


Heres a list of commands that allow certain functions to be used:

sp - Format:

Code: Select all

[sp "mapname"]
- Function: Works well with guibutton to load a map with the name set.

exec - Format:

Code: Select all

[exec "*code_location/code_name*.cfg"]
- Function: Works well with guibutton to execute a code.

movie - Format

Code: Select all

[movie $movname]
- Function: Works well with guibutton and guikeyfield to start/stop recording a movie.

*continue list*

Re: GUI Menus Tutorial

Posted: June 9th, 2010, 7:58 am
by Leo_V117
*Reseved for Examples*

Re: GUI Menus Tutorial

Posted: June 9th, 2010, 7:59 am
by Leo_V117
*Reserved for Used Codes*

Re: GUI Menus Tutorial

Posted: September 16th, 2010, 2:56 pm
by PizzaLover101
Can you have it all in one so that we can copy/paste it?

Re: GUI Menus Tutorial

Posted: September 16th, 2010, 5:30 pm
by chocolatepie33
Are you gonna update this soon?

Re: GUI Menus Tutorial

Posted: September 17th, 2010, 12:30 pm
by Leo_V117
Yeah... Now...

Re: GUI Menus Tutorial

Posted: September 17th, 2010, 2:52 pm
by daltonds1
Wrong Section?
Shouldn't this be in tuts

Any way nice job

Re: GUI Menus Tutorial

Posted: September 17th, 2010, 6:45 pm
by chocolatepie33
Well, maybe people go here cuz support q's get answered here faster, so it'd just be easier...

Leo, on Sandbox, when I start a map, it says "unknown command: ]" three times. Three ] in a row. I think it has to do with my autoexec.cfg.
I added the Recorder (B button), Easy Edit (I button) and Crosshairs (O button).
Can you try to fix up a new file for me so it doesn't say that?

(We are in support, and it is about scripting commands.)

Re: GUI Menus Tutorial

Posted: September 20th, 2010, 6:03 am
by Leo_V117
Send me the file and ill fix it up for you. And a quick update for the rest of you... Theres a very long example code coming up for the new recorder system of mine. Its a very clever piece of code, so chocolatepie33: you may want to take that one instead, I managed to stop all the errors.

Re: GUI Menus Tutorial

Posted: September 20th, 2010, 9:11 pm
by chocolatepie33
alright, as long as I can keep my crosshairs and easy edit apps too.