<li><aclass="backlink"title="Click to do a full-text search for this title"href="./GUI_Parms?action=fullsearch&value=linkto%3A%22GUI+Parms%22&context=180">GUI Parms</a></li>
<spanclass="anchor"id="line-1"></span><pclass="line874">GUI Parms are a special type of gui variable used in many reuseable world GUIs. GUI parms are referenced within the GUI just like any other GUI variable. The difference is that GUI parms are defined in entities within a level. An example of a GUI that uses GUI parms are the numerous elevator and lift GUIs in a Quake 4 level. The floors that the lift moves between are defined in the level with GUI parms. Those parms are then used by the GUI to determine which animations to run or which information to show. <spanclass="anchor"id="line-2"></span><spanclass="anchor"id="line-3"></span><pclass="line867">
<h3id="head-180090a33eeea07b386d1d78b2bf600f4537f7ab">GUI Examples From Quake 4</h3>
<spanclass="anchor"id="line-4"></span><pclass="line867"><hr/><pclass="line874"><spanclass="anchor"id="line-5"></span>The best way to learn GUI scripting is by example, and there are many GUIs in Quake 4 that can be opened up in the GUI editor or in any text editor and used as references. The following is a list of sample GUIs found in the q4base/GUIs folder and what they demonstrate. <spanclass="anchor"id="line-6"></span><spanclass="anchor"id="line-7"></span><ul><li><pclass="line891"><strong>q4base/GUIs/movers/strogg/activate_lift.gui</strong> -- This gui is used in many places in Quake 4 as a lift or elevator GUI. It's a great example of the use of GUI parms to make a single GUI useable in many areas of the game. <spanclass="anchor"id="line-8"></span></li><li><pclass="line891"><strong>q4base/GUIs/mphud.gui</strong> -- This is the basic multiplayer HUD (which overlays on top of hud.gui). This demonstrates the use of GUI variables that are sent to the GUI from code. <spanclass="anchor"id="line-9"></span></li><li><pclass="line891"><strong>q4base/GUIs/mainmenu.gui</strong> -- Probably the most complex GUI in the game, the main menu. For mod authors interested in creating a custom menu for your mod, you'll want to look at this one closely and probably use it as a template for your own menu. <spanclass="anchor"id="line-10"></span></li><li><pclass="line891"><strong>q4base/GUIs/maps/hangar/fire_engine.gui</strong> -- This GUI is used in the hangar level as a puzzle element. It's a good example of a simple GUI that performs a simple action but has some animation. Look at the windowDef button and its script to see the use of a GUI Parm as a script name to run in the onAction. This script name is set in the entity/key value pairs within the <ahref="./LevelEditor.html">LevelEditor</a>. <spanclass="anchor"id="line-11"></span></li><li><pclass="line891"><strong>q4base/GUIs/maps/process2/rotate8.gui</strong> -- Another puzzle GUI, but more complex. This GUI illustrates the use of GUI parms, the rotate property in transitions, and running scripts. <spanclass="anchor"id="line-12"></span></li><li><pclass="line891"><strong>q4base/GUIs/scoreboard.gui</strong> -- A complex menu GUI that demonstrates using math to dynamically position GUI elements. <spanclass="anchor"id="line-13"></span></li></ul><spanclass="anchor"id="bottom"></span></div><pid="pageinfo"class="info"lang="en"dir="ltr">GUI Parms (last edited 2005-11-07 19:42:04 by <spantitle="MattVainio @ 67.129.250.254[67.129.250.254]"><aclass="nonexistent"href="./MattVainio.html"title="MattVainio @ 67.129.250.254[67.129.250.254]">MattVainio</a></span>)</p>
<li><ahref="http://moinmoin.wikiwikiweb.de/">MoinMoin Powered</a></li><li><ahref="http://www.python.org/">Python Powered</a></li><li><ahref="http://validator.w3.org/check?uri=referer">Valid HTML 4.01</a></li>