Worst-case scenario: the UEd Goblin wipes the map and burns down your house.

Difference between revisions of "Legacy:GUIController"

From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
(Replaced content with '<uscript> event TempFunction(string GameRes) { GameResolution = GameRes; return true; } </uscript>')
(One intermediate revision by one other user not shown)
Line 1: Line 1:
{{classbox| [[Legacy:UT2003|UT2003]] :: [[Legacy:Object|Object]] >> [[Legacy:Interactions|Interactions]] >> [[Legacy:Interaction|Interaction]] >> [[Legacy:BaseGUIController|BaseGUIController]] >> GUIController (Package: XInterface)}}
+
<uscript>
 
+
event TempFunction(string GameRes)
The GUIController contains a simple first-in, last-out menu stack.  You have three things you can do:
+
{
* '''Open a menu''' &ndash; adds the menu to the top of the stack.
+
    GameResolution = GameRes;
* '''Replace a menu''' &ndash; replaces the current menu with the new menu.
+
    return true;
* '''Close a menu''' &ndash; returns you to the last menu on the stack.
+
}
 
+
</uscript>
The GUIController is the [[Legacy:GUI|GUI]] system's only interface to the world of [[Legacy:Actor|Actor]]s.
+
 
+
A similar [[Legacy:UT|UT]] class would probably be the [[Legacy:WindowConsole|WindowConsole]], although the UWindow system in UT is more like a console extension while UT2003's GUIController and [[Legacy:Console|Console]] are both [[Legacy:Interaction|Interaction]]s without being a subclass of eachother.
+
 
+
==Interactive GUI Design Mode==
+
 
+
To enable the interactive GUI design mode, open the [[Legacy:Game Ini File|Game ini file]] and set the following property:
+
 
+
'''UT2003.ini:'''
+
  [XInterface.GUIController]
+
  bModAuthor=True
+
 
+
In unreal tournament 2004 you'll need to edit the user.ini instead.  I found that I had to set both of the following to get this to work
+
 
+
'''user.ini:'''
+
  [XInterface.GUIController]
+
  bModAuthor=True
+
 
+
  [GUI2K4.UT2K4GUIController]
+
  bModAuthor=True
+
 
+
Press <code>Ctrl+Alt+D</code> to enter the interactive GUI design mode.  In that mode, you can:
+
 
+
* Hold down <code>F1</code> for a list of commands. The most common ones are mentioned below.
+
* <code>Ctrl+Click</code> a control to select it.  Repeatedly <code>Ctrl+Click</code> to select overlapping controls.
+
* Press <code>Shift</code> to temporarily hide the selection rectangle.
+
* Press <code>Ctrl+ArrowUp</code>, <code>Ctrl+ArrowLeft</code>, <code>Ctrl+ArrowRight</code> and <code>Ctrl+ArrowDown</code> to move the selected control.
+
* Alternatively, hold <code>Ctrl+Alt</code> with the control selected to move it with the mouse. You can also use <code>Ctrl+Alt+Any Arrow</code> to move the control 5 pixels at a time.
+
* Press <code>Ctrl+GrayPlus</code> and <code>Ctrl+GrayMinus</code> to change the horizontal size of the selected control. <br />Press <code>Ctrl+Plus</code> and <code>Ctrl+Minus</code> (on the alphanumeric keyboard) to change the vertical size of the selected control.
+
 
+
Add <code>Alt</code> to the movement and sizing key combinations to move or size faster.
+
 
+
* Press Ctrl+C to copy the selected control's window metrics to the clipboard.  You can directly paste them into your control's inline object definition in the <code>defaultproperties</code> section.
+
 
+
==Properties==
+
; [[Legacy:GUIComponent|GUIComponent]] ActiveControl : Which control is currently active.
+
; [[Legacy:GUIPage|GUIPage]] ActivePage : Points to the currently active page.
+
; bool AltPressed : Alt key is being held.
+
; array<string> AutoLoad (config) : Any menu classes in here will be automatically loaded.
+
; bool bCurMenuInitialized : Has the current Menu Finished initialization.
+
; bool bDesignMode : Are we in design mode.
+
; bool bForceMouseCheck :
+
; bool bHighlightCurrent : Highlight the current control being edited.
+
; bool bIgnoreNextRelease : Used to make sure discard errant releases.
+
; bool bIgnoreUntilPress :
+
; bool bModAuthor (config) : Enables interactive GUI design mode.  See above for details.
+
; float ButtonRepeatDelay : The amount of delay for faking button repeats.
+
; sound ClickSound :
+
; bool CtrlPressed : Ctrl key is being held.
+
; float CursorFade : How visible is the cursor.
+
; int CursorStep : Are we fading in or out.
+
; float DblClickWindow : How long do you have for a double click.
+
; sound DownSound :
+
; sound EditSound :
+
; float FastCursorFade : How visible is the cursor.
+
; int FastCursorStep : Are we fading in or out.
+
; [[Legacy:GUIComponent|GUIComponent]] FocusedControl : Top most Focused control.
+
; array<[[Legacy:GUIFont|GUIFont]]> FontStack (editinline) : Holds all the possible fonts.
+
; string GameResolution :
+
; float LastClickTime : When did the last click occur.
+
; int LastClickX<br />int LastClickY : Who was the active component
+
; float LastMouseX :
+
; float LastMouseY :
+
; bool MainNotWanted : Set to true if you don't want main to appear.
+
; float MenuMouseSens (config) :
+
; array<[[Legacy:GUIPage|GUIPage]]> MenuStack (editinline, export) : Holds the stack of menus.
+
; Array<vector> MouseCursorOffset (editinline) : Only X,Y used, between 0 and 1. 'Hot Spot' of cursor material.
+
; Array<[[Legacy:Material|Material]]> MouseCursors (editinline) : Holds a list of all possible mouse coursers.
+
; sound MouseOverSound :
+
; float MouseX<br />float MouseY : Where is the mouse currently located.
+
; [[Legacy:GUIComponent|GUIComponent]] MoveControl : Used for visual design.
+
; array<[[Legacy:GUIPage|GUIPage]]> PersistentStack : Holds the set of pages which are persistent across close/open.
+
; float RepeatDelta : Data var
+
; byte RepeatKey : Used to determine what should repeat.
+
; float RepeatTime : How long until the next repeat.
+
; bool ShiftPressed : Shift key is being held.
+
; [[Legacy:GUIComponent|GUIComponent]] SkipControl : This control should be skipped over and drawn at the end.
+
; array<string> StyleNames : Holds the name of all styles to use.
+
; array<[[Legacy:GUIStyles|GUIStyles]]> StyleStack : Holds all of the possible styles.
+
; sound UpSound :
+
; [[Legacy:Material|Material]] WhiteBorder :
+
 
+
==Methods==
+
 
+
===Inherited from [[Legacy:Interaction|Interaction]]===
+
; NotifyLevelChange ( ) [event] :
+
 
+
===Inherited from [[Legacy:BaseGUIController|BaseGUIController]]===
+
; AutoLoadMenus ( ) [event] :
+
; bool OpenMenu (string NewMenuName, optional string Param1, optional string Param2) [event] : Opens a new menu and places it on top of the stack.
+
; bool ReplaceMenu (string NewMenuName, optional string Param1, optional string Param2) [event] : Replaces a menu in the stack.  Returns true if success.
+
; CloseAll (bool bCancel) [event] :
+
; bool CloseMenu (optional bool bCanceled) [event] : Close the top menu.  returns true if success.
+
; InitializeController ( ) [event] :
+
; SetControllerStatus (bool On) :
+
; SetRequiredGameResolution (string GameRes) [event] :
+
; bool NeedsMenuResolution() [event] :
+
 
+
===Newly Declared Methods===
+
; ChangeFocus ([[Legacy:GUIComponent|GUIComponent]] Who) [event] :
+
; ClearControls ([[Legacy:GUIMultiComponent|GUIMultiComponent]] Comp) :
+
; [[Legacy:GUIPage|GUIPage]] CreateMenu (string NewMenuName) [event] : Attempts to create a menu.  Returns none if it can't.
+
; string GetCurrentRes ( ) [native] : Returns the current res as a string.
+
; string GetMainMenuClass ( ) [native] : Returns GameEngine.MainMenuClass.
+
; GetMapList (string Prefix , [[Legacy:GUIList|GUIList]] list) [native] :
+
; [[Legacy:GUIFont|GUIFont]] GetMenuFont (string FontName) [native event] : Finds a given font in the FontStack.
+
; GetOGGList (out array<string> OGGFiles) [native] :
+
; GetProfileList (string Prefix, out array<string> ProfileList) [native] :
+
; [[Legacy:GUIStyles|GUIStyles]] GetStyle (string StyleName) [native event] : Find a style on the stack.
+
; GetTeamSymbolList (array<string> SymbolNames, optional bool bNoSinglePlayer) [native] :
+
; GetWeaponList (out array<class<[[Legacy:Weapon|Weapon]]>> WeaponClass , out array<string> WeaponDesc) [native] :
+
; bool HasMouseMoved ( ) :
+
; string LoadDecoText (string PackageName , string DecoTextName) [native] :
+
; MoveFocused ([[Legacy:GUIComponent|GUIComponent]] Ctrl , int bmLeft, int bmTop, int bmWidth, int bmHeight, float ClipX , float ClipY) [event] :
+
; bool RegisterStyle (class<[[Legacy:GUIStyles|GUIStyles]]> StyleClass) :
+
; ResetFocus() :
+
; ResetKeyboard ( ) [native] :
+
; [[Legacy:GUIPage|GUIPage]] TopPage ( ) :
+
 
+
===Delegates===
+
; bool OnNeedRawKeyPress (byte NewKey) :
+
 
+
==Known Subclasses==
+
* [[Legacy:ProGUIController|ProGUIController]] &ndash; used by the UT2003 Pro GUI
+
* [[Legacy:UT2K4GUIController|UT2K4GUIController]]
+
 
+
==Related Topics==
+
* [[Legacy:GUI|GUI]]
+
* [[Legacy:GUI Class Hierarchy|GUI Class Hierarchy]]
+
 
+
[[Category:Legacy Class (UT2003)|{{PAGENAME}}]]
+

Revision as of 23:07, 2 June 2010

event TempFunction(string GameRes)
{
    GameResolution = GameRes;
    return true;
}