GUIComponent
This is the superclass for all widgets that can be displayed on the UT2003 GUI.
Properties
Menu
- string IniOption
- Points to the INI option to load for this component (what does that mean then?).
- string IniDefault
- The default value for a missing ini option.
- string StyleName
- Name of my Style.
- bool bBoundToParent
- Use the Parent's Bounds for all positioning.
- bool bScaleToParent
- Use the Parent for scaling.
- bool bHasFocus
- Does this component currently have input focus.
- bool bVisible
- True if this component currently visible.
- bool bAcceptsInput
- True if this control accepts input.
- bool bCaptureTabs
- This control wants tabs.
- bool bCaptureMouse
- Set this if the control should capture the mouse when pressed.
- bool bNeverFocus
- This control should never fully receive focus.
- bool bRepeatClick
- Have the system accept holding down of the mouse.
- bool bRequireReleaseClick
- If True, this component wants the click on release even if it's not active.
- GUIComponent FocusInstead
- Who should get the focus instead of this control if bNeverFocus is true.
- localized string Hint
- The hint that gets displayed for this component.
- float WinTop, WinLeft, WinWidth, WinHeight
- These set the size and position of this component relative to its parent. If a value is <= 1 then the position is calculated as WinTop * parent component's value. If this value is > 1 then a value in pixels possibly is used. Using pixels means the component will have a different size relative to the whole screen at different screen resolutions.
- int MouseCursorIndex
- The mouse cursor to use when over this control.
- bool bTabStop
- Does a TAB/Shift-Tab stop here.
- bool bFocusOnWatch
- If true, watching focuses.
- int Tag
- Not used allegedly.
- GUILabel FriendlyLabel
- My state is projected on this objects state.
- bool bMouseOverSound
- Should component bleep when mouse goes over it.
- enum OnClickSound? EClickSound
- The sound the component makes if sound is required.
Delegates
(See also Delegate.)
Drawing delegates return true if you want to short-circuit the default drawing code
- bool OnPreDraw (Canvas Canvas)
- Called before the component is rendered. Return True to skip the native PreDraw code.
- bool OnDraw (Canvas Canvas)
- Called whenthe component is rendered. Return True to skip the native Draw code. Only works for GUIPage and GUIPanel? in UT2003.
- OnActivate ( )
- Called when the component gains focus
- OnDeActivate ( )
- Called when the component loses focus
- OnWatch ( )
- Called when the component is being watched
- OnHitTest (float MouseX, float MouseY)
- Called when Hit test is performed for mouse input
- OnRender (Canvas Canvas)
- Broken in UT2003. (never called)
- OnMessage (coerce string Msg, float MsgLife)
- When a message comes down the line
- OnInvalidate ( )
- Called when the background is clicked
Input event delegates
- bool OnClick (GUIComponent Sender)
- The mouse was clicked on this control
- bool OnDblClick (GUIComponent Sender)
- The mouse was double-clicked on this control
- bool OnRightClick (GUIComponent Sender)
- Control was right clicked.
- OnMousePressed (GUIComponent Sender, bool bRepeat)
- Sent when a mouse is pressed (initially)
- OnMouseRelease (GUIComponent Sender)
- Sent when the mouse is released.
- OnChange (GUIComponent Sender)
- Called when a component changes its value
- bool OnKeyType (out byte Key, optional string Unicode) Key Strokes
- bool OnKeyEvent (out byte Key, out byte State, float delta)
- bool OnCapturedMouseMove (float deltaX, float deltaY)
- OnLoadINI (GUIComponent Sender, string s)
- Do the actual work here
- string OnSaveINI (GUIComponent Sender)
- Do the actual work here
Known Subclasses
See GUI Class Hierarchy for a full tree.
- GUIButton?
- GUIHorzScrollZone?
- GUIImage?
- GUILabel
- GUIListBase?
- GUIMultiColumnListHeader?
- GUIMultiComponent
- GUIProgressBar?
- GUISlider
- GUITitleBar?
- GUIVertScrollZone?
Comments
Tarquin: There seem to be two ways to define properties of components of a window or panel: use an inline object in the default properties, or use InitComponent(). I;m baffled about this in the defaults though (it's Jailbreak code BTW)
Controls(0)=GUIButton'JBAddonProtection.JBGUIPanelProtectionConfig.ResetButton'
I can't see where JBAddonProtection.JBGUIPanelProtectionConfig.ResetButton was defined. Does that statement actually create the GUIButton object and define its name?
Mychaeel: The benefit from doing it in the defaultproperties section is that it happens at compile time rather than run time. Plus, it looks neater. – As for that GUIButton, if I'm looking at the same source as you are, it's defined just above that line. (The "JBAddonProtection.JBGUIPanelProtectionConfig." part is just the full qualifier of that object template.)
Tarquin: I exported the source from UEd. I must be missing something – I have no "BeginObject" at all in there.
Wormbo: Subobjects aren't exported. You will have to download the UnrealScript Source to see them.