<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://wiki.splashdamage.com/index.php?action=history&amp;feed=atom&amp;title=UserInterfaceLocal</id>
	<title>UserInterfaceLocal - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.splashdamage.com/index.php?action=history&amp;feed=atom&amp;title=UserInterfaceLocal"/>
	<link rel="alternate" type="text/html" href="https://wiki.splashdamage.com/index.php?title=UserInterfaceLocal&amp;action=history"/>
	<updated>2026-04-07T17:05:47Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.31.0</generator>
	<entry>
		<id>https://wiki.splashdamage.com/index.php?title=UserInterfaceLocal&amp;diff=3278&amp;oldid=prev</id>
		<title>JRAD at 12:09, 21 November 2007</title>
		<link rel="alternate" type="text/html" href="https://wiki.splashdamage.com/index.php?title=UserInterfaceLocal&amp;diff=3278&amp;oldid=prev"/>
		<updated>2007-11-21T12:09:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;__NOEDITSECTION__&lt;br /&gt;
== Class Tree ==&lt;br /&gt;
* [[:UserInterfaceLocal]]&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
This is the GUI itself, all window defs must be inside it. You may set properties, flags, cache materials, cache sounds, set atmospheres and add events directly on the GUI. GUI script functions may be called from any event or timeline by using a &amp;quot;gui.&amp;quot; prefix to the function name.&lt;br /&gt;
&lt;br /&gt;
'''Example:'''&lt;br /&gt;
 gui guis/vehicles/edf_titan {&lt;br /&gt;
 	// Properties for the GUI.&lt;br /&gt;
 	properties {&lt;br /&gt;
 		float flags = immediate( flags ) | GUI_FULLSCREEN;&lt;br /&gt;
 	}&lt;br /&gt;
 	_class_icons&lt;br /&gt;
 &lt;br /&gt;
 	// Cache the titan icon material.&lt;br /&gt;
 	materials {&lt;br /&gt;
 		&amp;quot;icon&amp;quot;		&amp;quot;guis/assets/hud/gdf/vehicles/titan&amp;quot;&lt;br /&gt;
 	}&lt;br /&gt;
 &lt;br /&gt;
 	_base_icon // Template: setup background material, player list, etc.&lt;br /&gt;
 	_hud_materials // Template: Cache all materials used in the HUD.&lt;br /&gt;
 	_position( 0, 2, 10 ) // Template: Setup icon for player position 0&lt;br /&gt;
 	_position( 1, 2, 24 ) // Template: Setup icon for player position 1&lt;br /&gt;
 &lt;br /&gt;
 	// Template: Draw a generic GDF missile sight.&lt;br /&gt;
 	_gdf_generic_missile_sight( &amp;quot;dontshowlines&amp;quot;, &amp;quot;0,0,0,1&amp;quot;, &amp;quot;0,0,0,1&amp;quot; )&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
== Properties ==&lt;br /&gt;
{{:UserInterfaceLocal Properties}}&lt;br /&gt;
&lt;br /&gt;
== Flags ==&lt;br /&gt;
{{:UserInterfaceLocal Flags}}&lt;br /&gt;
&lt;br /&gt;
== Functions ==&lt;br /&gt;
=== Evaluator Functions ===&lt;br /&gt;
 [[UserInterfaceLocal:compare|compare]]                            String comparison.&lt;br /&gt;
 [[UserInterfaceLocal:icompare|icompare]]                           Case insensitive string comparison.&lt;br /&gt;
 [[UserInterfaceLocal:wcompare|wcompare]]                           Wide string comparison.&lt;br /&gt;
 [[UserInterfaceLocal:iwcompare|iwcompare]]                          Case insensitive string comparison. Ignores color codes.&lt;br /&gt;
 [[UserInterfaceLocal:hcompare|hcompare]]                           Compare handles.&lt;br /&gt;
 [[UserInterfaceLocal:toString|toString]]                           Float to string conversion.&lt;br /&gt;
 [[UserInterfaceLocal:toWString|toWString]]                          Float to wide string conversion.&lt;br /&gt;
 [[UserInterfaceLocal:toFloat|toFloat]]                            String value converted to a float.&lt;br /&gt;
 [[UserInterfaceLocal:localizeArgs|localizeArgs]]                       Localize text with additional string arguments.&lt;br /&gt;
 [[UserInterfaceLocal:localizeHandle|localizeHandle]]                     Localize text given a text declaration handle.&lt;br /&gt;
 [[UserInterfaceLocal:localize|localize]]                           Localize text.&lt;br /&gt;
 [[UserInterfaceLocal:square|square]]                             Squares the input value.&lt;br /&gt;
 [[UserInterfaceLocal:vec2Length|vec2Length]]                         Length of a 2D vector.&lt;br /&gt;
 [[UserInterfaceLocal:vec2Normalize|vec2Normalize]]                      Normalize a 2D vector.&lt;br /&gt;
 [[UserInterfaceLocal:abs|abs]]                                Absolute value of a float.&lt;br /&gt;
 [[UserInterfaceLocal:min|min]]                                Returns the minimum of two values.&lt;br /&gt;
 [[UserInterfaceLocal:max|max]]                                Returns the maximum of two values.&lt;br /&gt;
 [[UserInterfaceLocal:clamp|clamp]]                              Clamp value between min and max.&lt;br /&gt;
 [[UserInterfaceLocal:msToHMS|msToHMS]]                            Converts from milliseconds to hours, minutes, seconds.&lt;br /&gt;
 [[UserInterfaceLocal:sToHMS|sToHMS]]                             Converts from seconds to hours, minutes, seconds.&lt;br /&gt;
 [[UserInterfaceLocal:toggle|toggle]]                             Returns the opposite boolean value of the input value.&lt;br /&gt;
 [[UserInterfaceLocal:floor|floor]]                              The floor of the input value.&lt;br /&gt;
 [[UserInterfaceLocal:ceil|ceil]]                               The ceiling of the input value.&lt;br /&gt;
 [[UserInterfaceLocal:toUpper|toUpper]]                            Convert a string to upper case.&lt;br /&gt;
 [[UserInterfaceLocal:toLower|toLower]]                            Convert a string to lower case.&lt;br /&gt;
 [[UserInterfaceLocal:toWStr|toWStr]]                             Convert a string to a wide string.&lt;br /&gt;
 [[UserInterfaceLocal:toStr|toStr]]                              Convert a wide string to a string.&lt;br /&gt;
 [[UserInterfaceLocal:isValidHandle|isValidHandle]]                      Check if handle is valid.&lt;br /&gt;
 [[UserInterfaceLocal:floatToHandle|floatToHandle]]                      Convert a float to a handle.&lt;br /&gt;
 [[UserInterfaceLocal:color|color]]                              Convert a string to a color.&lt;br /&gt;
 [[UserInterfaceLocal:strLen|strLen]]                             Length of the string.&lt;br /&gt;
 [[UserInterfaceLocal:wstrLen|wstrLen]]                            Length of the wide string.&lt;br /&gt;
 [[UserInterfaceLocal:sin|sin]]                                Sine of the input value.&lt;br /&gt;
 [[UserInterfaceLocal:cos|cos]]                                Cosine of the input value.&lt;br /&gt;
 [[UserInterfaceLocal:colorForIndex|colorForIndex]]                      Color for the index where the index is between 0 and 31.&lt;br /&gt;
 [[UserInterfaceLocal:stringToVec4|stringToVec4]]                       Convert a string to a 4D vector.&lt;br /&gt;
=== Utility Functions ===&lt;br /&gt;
 [[UserInterfaceLocal:consoleCommand|consoleCommand]]                     Exectue a console command, append to the command buffer.&lt;br /&gt;
 [[UserInterfaceLocal:consoleCommandImmediate|consoleCommandImmediate]]            Exectue a console command, immediate execution of the command.&lt;br /&gt;
 [[UserInterfaceLocal:playSound|playSound]]                          Play a sound in the current sound world.&lt;br /&gt;
 [[UserInterfaceLocal:playGameSound|playGameSound]]                      Play a sound in the game sound world.&lt;br /&gt;
 [[UserInterfaceLocal:playMusic|playMusic]]                          Play a sound on the music channel.&lt;br /&gt;
 [[UserInterfaceLocal:stopMusic|stopMusic]]                          Stop any sound on the music channel.&lt;br /&gt;
 [[UserInterfaceLocal:querySpeakers|querySpeakers]]                      Desired number of speakers.&lt;br /&gt;
 [[UserInterfaceLocal:fadeSoundClass|fadeSoundClass]]                     Fade a sound class to a volume in X milliseconds.&lt;br /&gt;
 [[UserInterfaceLocal:cacheMaterial|cacheMaterial]]                      Store a material to the material cache.&lt;br /&gt;
 [[UserInterfaceLocal:activate|activate]]                           Activate the GUI if it is not active. Calls onActivate events for windows.&lt;br /&gt;
 [[UserInterfaceLocal:deactivate|deactivate]]                         Deactivate the GUI. Calls onDeactivate events for windows.&lt;br /&gt;
 [[UserInterfaceLocal:sendCommand|sendCommand]]                        Send a script command, The GUI must be attached to an entity. Script event OnNetworkMessage for the player will be called with the command data.&lt;br /&gt;
 [[UserInterfaceLocal:sendNetworkCommand|sendNetworkCommand]]                 Send a script command. Script event OnNetworkMessage for the player will be called with the command data.&lt;br /&gt;
 [[UserInterfaceLocal:postNamedEvent|postNamedEvent]]                     Call a named event.&lt;br /&gt;
 [[UserInterfaceLocal:postNamedEventOn|postNamedEventOn]]                   Call a named event on a window.&lt;br /&gt;
 [[UserInterfaceLocal:scriptCall|scriptCall]]                         Call a script event on the entity this GUI is bound to. The script parameters should be pushed.on the stack using scriptPush&amp;lt;type&amp;gt;() script calls.&lt;br /&gt;
 [[UserInterfaceLocal:setCookieString|setCookieString]]                    Set a key/val which will be saved in the user profile.&lt;br /&gt;
 [[UserInterfaceLocal:getCookieString|getCookieString]]                    Return value for the key.&lt;br /&gt;
 [[UserInterfaceLocal:setCookieInt|setCookieInt]]                       Set an integer key/val which will be saved in the user profile.&lt;br /&gt;
 [[UserInterfaceLocal:getCookieInt|getCookieInt]]                       Return integer value for the key.&lt;br /&gt;
 [[UserInterfaceLocal:setShaderParm|setShaderParm]]                      Sets a shader parameter value. This is for example used while drawing the command map so different material stages can be used depending on if the command map is drawn in a circle or a rectangle&lt;br /&gt;
 [[UserInterfaceLocal:getKeyBind|getKeyBind]]                         Get the key for a binding.&lt;br /&gt;
 [[UserInterfaceLocal:print|print]]                              Print a string to the console. _newline or _quote should be used instead of the escape characters \n and \&amp;quot; respectively.&lt;br /&gt;
 [[UserInterfaceLocal:getStringForProperty|getStringForProperty]]               Get string for a window property.&lt;br /&gt;
 [[UserInterfaceLocal:setPropertyFromString|setPropertyFromString]]              Set a property from a string.&lt;br /&gt;
 [[UserInterfaceLocal:broadcastEvent|broadcastEvent]]                     Broadcast a named event to a window. If no window is specified post the event on the GUI.&lt;br /&gt;
 [[UserInterfaceLocal:broadcastEventToChildren|broadcastEventToChildren]]           Broadcast an event only to immediate children.&lt;br /&gt;
 [[UserInterfaceLocal:broadcastEventToDescendants|broadcastEventToDescendants]]        Broadcast an event recursively to all children.&lt;br /&gt;
 [[UserInterfaceLocal:getParentName|getParentName]]                      Get parent name.&lt;br /&gt;
 [[UserInterfaceLocal:copyHandle|copyHandle]]                         Copy a handle. Should be used instead of immediate for integers.&lt;br /&gt;
 [[UserInterfaceLocal:activateMenuSoundWorld|activateMenuSoundWorld]]             Activates the menu sound world and pauses the game sound world or deactivates the menu sound world and unpauses the game sound world.&lt;br /&gt;
 [[UserInterfaceLocal:getStringMapValue|getStringMapValue]]                  Get value for a key for the give string map def. Used to cache crosshair material used by the player.&lt;br /&gt;
 [[UserInterfaceLocal:isBackgroundLoadComplete|isBackgroundLoadComplete]]           Check if loading of menu models (earth/stars/strogg fleet etc.) has been loaded.&lt;br /&gt;
 [[UserInterfaceLocal:copyText|copyText]]                           Copy the text to the clipboard.&lt;br /&gt;
 [[UserInterfaceLocal:pasteText|pasteText]]                          Copy the clipboard data.&lt;br /&gt;
 [[UserInterfaceLocal:uploadLevelShot|uploadLevelShot]]                    Upload an image to a target image. Used for map screenshots.&lt;br /&gt;
 [[UserInterfaceLocal:getGameTag|getGameTag]]                         Game build name.&lt;br /&gt;
 [[UserInterfaceLocal:getLoadTip|getLoadTip]]                         Get a load tooltip intended for the map loading screen.&lt;br /&gt;
 [[UserInterfaceLocal:cancelToolTip|cancelToolTip]]                      Set float property active to false for the toolTip window.&lt;br /&gt;
 [[UserInterfaceLocal:checkCVarsAgainstCFG|checkCVarsAgainstCFG]]               Used in game options to check the machine spec the user has chosen.&lt;br /&gt;
 [[UserInterfaceLocal:collapseColors|collapseColors]]                     Collapse all color codes.&lt;br /&gt;
=== Game Functions ===&lt;br /&gt;
 [[UserInterfaceLocal:getSpectatorList|getSpectatorList]]                   List of spectators separated with commas. Used with the marquee window type for scrolling.&lt;br /&gt;
 [[UserInterfaceLocal:getTeamPlayerCount|getTeamPlayerCount]]                 Get the number of players on a team.&lt;br /&gt;
 [[UserInterfaceLocal:getWeaponData|getWeaponData]]                      Get weapon value given a key. Mainly used for getting model and model/joint names for player in the limbo menu.&lt;br /&gt;
 [[UserInterfaceLocal:getNumWeaponPackages|getNumWeaponPackages]]               Get number of weapon packages for a class.&lt;br /&gt;
 [[UserInterfaceLocal:getWeaponBankForName|getWeaponBankForName]]               Get bank number for slot name.&lt;br /&gt;
 [[UserInterfaceLocal:updateLimboProficiency|updateLimboProficiency]]             Set new player class and update the proficiency related limbo properties. Used for updating limbo properties when selecting a class.&lt;br /&gt;
 [[UserInterfaceLocal:getRoleCountForTeam|getRoleCountForTeam]]                Number of players with a specific role on a team.&lt;br /&gt;
 [[UserInterfaceLocal:getEquivalentClass|getEquivalentClass]]                 Get the equivalent class on the target team to the class on the current team.&lt;br /&gt;
 [[UserInterfaceLocal:getClassSkin|getClassSkin]]                       Get skin name for class.&lt;br /&gt;
 [[UserInterfaceLocal:toggleReady|toggleReady]]                        Toggle the local player to be ready during warmup.&lt;br /&gt;
 [[UserInterfaceLocal:execVote|execVote]]                           Execute a vote on client or listen server. The vote index then the vote key should have been pushed on the GUI stack before calling this function.&lt;br /&gt;
 [[UserInterfaceLocal:getCommandMapTitle|getCommandMapTitle]]                 Get the command map title for a playzone on the current map.&lt;br /&gt;
 [[UserInterfaceLocal:getPersistentRankInfo|getPersistentRankInfo]]              Get the current rank or rank material name for the local player.&lt;br /&gt;
 [[UserInterfaceLocal:setSpawnPoint|setSpawnPoint]]                      Set the current spawn point for the local player. Send the name to the server if a client.&lt;br /&gt;
 [[UserInterfaceLocal:highlightSpawnPoint|highlightSpawnPoint]]                Call script event OnHighlight on the spawnpoint for the team.&lt;br /&gt;
 [[UserInterfaceLocal:mutePlayer|mutePlayer]]                         Toggle mute for a player.&lt;br /&gt;
 [[UserInterfaceLocal:spectateClient|spectateClient]]                     Spectate a specific client, works on client and listen server.&lt;br /&gt;
 [[UserInterfaceLocal:chatCommand|chatCommand]]                        Send a chat command.&lt;br /&gt;
=== CVar Functions ===&lt;br /&gt;
 [[UserInterfaceLocal:setCVar|setCVar]]                            Set a cvar.&lt;br /&gt;
 [[UserInterfaceLocal:getCVar|getCVar]]                            Get a cvar value.&lt;br /&gt;
 [[UserInterfaceLocal:resetCVar|resetCVar]]                          Reset a CVar, gives it the default value.&lt;br /&gt;
 [[UserInterfaceLocal:setCVarFloat|setCVarFloat]]                       Set a cvar.&lt;br /&gt;
 [[UserInterfaceLocal:getCVarFloat|getCVarFloat]]                       Get a cvar value.&lt;br /&gt;
 [[UserInterfaceLocal:setCVarInt|setCVarInt]]                         Set a cvar.&lt;br /&gt;
 [[UserInterfaceLocal:getCVarInt|getCVarInt]]                         Get a cvar value.&lt;br /&gt;
 [[UserInterfaceLocal:setCVarBool|setCVarBool]]                        Set a cvar.&lt;br /&gt;
 [[UserInterfaceLocal:getCVarBool|getCVarBool]]                        Get a cvar value.&lt;br /&gt;
 [[UserInterfaceLocal:getCVarColor|getCVarColor]]                       Get a cvar value.&lt;br /&gt;
 [[UserInterfaceLocal:isCVarLocked|isCVarLocked]]                       Check if a CVar has the CVAR_GUILOCKED flag set.&lt;br /&gt;
=== Stack Functions ===&lt;br /&gt;
 [[UserInterfaceLocal:scriptPushString|scriptPushString]]                   Push a string on the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptPushFloat|scriptPushFloat]]                    Push a float on the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptPushVec2|scriptPushVec2]]                     Push a vec2 on the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptPushVec3|scriptPushVec3]]                     Push a vec3 on the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptPushVec4|scriptPushVec4]]                     Push a vec4 on the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptGetWStringResult|scriptGetWStringResult]]             Pop a wide string from the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptGetStringResult|scriptGetStringResult]]              Pop a string from the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptGetFloatResult|scriptGetFloatResult]]               Pop a float from the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptGetVec2Result|scriptGetVec2Result]]                Pop a vec2 from the stack.&lt;br /&gt;
 [[UserInterfaceLocal:scriptGetVec4Result|scriptGetVec4Result]]                Pop a vec4 from the stack.&lt;br /&gt;
 [[UserInterfaceLocal:pushGeneralString|pushGeneralString]]                  Push a string on the stack with the given name. Any literal stack name is valid.&lt;br /&gt;
 [[UserInterfaceLocal:popGeneralString|popGeneralString]]                   Pop a string on the stack with the given name. Any literal stack name is valid.&lt;br /&gt;
 [[UserInterfaceLocal:getGeneralString|getGeneralString]]                   Get the string on the top of the stack with the given name, does not pop the stack. Any literal stack name is valid.&lt;br /&gt;
 [[UserInterfaceLocal:generalStringAvailable|generalStringAvailable]]             Check if a stack with the given name is available.&lt;br /&gt;
 [[UserInterfaceLocal:clearGeneralStrings|clearGeneralStrings]]                Clear the stack with the given name.&lt;br /&gt;
&lt;br /&gt;
== Events ==&lt;br /&gt;
 [[UserInterfaceLocal:onCreate|onCreate]]                           Called on window creation&lt;br /&gt;
 [[UserInterfaceLocal:onActivate|onActivate]]                         This happens when the GUI is activated.&lt;br /&gt;
 [[UserInterfaceLocal:onDeactivate|onDeactivate]]                       This happens when the GUI is activated.&lt;br /&gt;
 [[UserInterfaceLocal:onNamedEvent|onNamedEvent]]                       Called when one of the events specified occurs&lt;br /&gt;
 [[UserInterfaceLocal:onPropertyChanged|onPropertyChanged]]                  Called when one of the properties specified occurs&lt;br /&gt;
 [[UserInterfaceLocal:onCVarChanged|onCVarChanged]]                      Called when one of the CVars' value changes&lt;br /&gt;
 [[UserInterfaceLocal:onCancel|onCancel]]                           Called when any key bound to the _menuCancel is pressed&lt;br /&gt;
&lt;br /&gt;
[[Category:GUIs]]&lt;/div&gt;</summary>
		<author><name>JRAD</name></author>
		
	</entry>
</feed>