-
Notifications
You must be signed in to change notification settings - Fork 3
GUIComponent
Overview of the GUIComponent's most important variables and delegates.
Contains a summary of possible and important variables to be set in the defaultproperties of the Component. Note that most of these variables are also to be used in the subclasses of GUIComponent.
- Bool, True by default.
- If True, process and draw this component otherwise skip it.
- String, no default.
- You should assign a unique Tag to each Component when you create it to find it later with GUIMenuScene.FindComponentByTag()
- Float, no default.
- This tells where to render the component in the HUD.
- Float, no default.
- This tells where to stop rendering the component in the HUD.
- Bool, all True by default.
- Use relative values instead of absolute ones (for PosX,PosY,PosXEnd and PosYEnd).
- Int, 1 by default
- The component with priority 0 will be drawn first and then the others in ascending order on top of it. Components with the same priority are drawn in the order they were created.
- Bool, no default (False).
- If True, perform enclosing checks against a circular shape rather than a box. This gives a more accurate representation for RadioButtons and similar. The diameter of the circle is the height of the Component.
Note that Delegates have to be set at runtime, best in the MenuScene's PostBeginPlay().
Full: delegate OnBecomeEnabled(optional GUIComponent Component = self)
Called when the Component is enabled (bEnabled turns True).
Full: delegate OnBecomeDisabled(optional GUIComponent Component = self)
Called when the Component is disabled (bEnabled turns False).
Full: delegate OnMouseEntered(optional GUIComponent Component = self)
Called when the Mouse enters the Components boundaries, as defined by PosX, PosY, PosXEnd and PosYEnd.
Full: delegate OnMouseExited(optional GUIComponent Component = self)
Called when the Mouse exits the Components boundaries.
Full: delegate OnMousePressed(optional GUIComponent Component = self, optional byte ButtonNum)
Called when the component receives a mouse press.
Full: delegate OnMouseReleased(optional GUIComponent Component = self, optional byte ButtonNum)
Called when the mouse press stops.
Full: delegate OnMouseClicked(optional GUIComponent Component = self, optional byte ButtonNum)
Called when the component is clicked, currently not used.
Full: delegate OnMouseWheelUp(optional GUIComponent Component = self)
Called when the mousewheel is scrolled up and this component receives that input.
Full: delegate OnMouseWheelDown(optional GUIComponent Component = self)
Called when the mousewheel is scrolled down and this component receives that input.
Full: delegate OnPropertyChanged(optional GUIComponent Component = self)
- General purpose delegate that gets called by appropriate subclasses when their represented property changes.
- For instance when a slider gets moved or a checkbox gets ticked or a combobox gets a new member selected.
- GUICheckButtonComponent, when the bChecked value changes.
- GUIBaseSliderComponent, when the GUISliderButtonComponent changes position and thus changes the Sliders progress.
Full: delegate bool OnInputKey( int ControllerId, name Key, EInputEvent Event, float AmountDepressed = 1.f, bool bGamepad = FALSE )
Called when the component receives a key input.
Used in the example content mainly to detect Enter and Escape input, though some components also process other inputs by default.
- Process an input key event routed through unrealscript from another object. This method is assigned as the value for the
- OnRecievedNativeInputKey delegate so that native input events are routed to this unrealscript function.
- @param ControllerId the controller that generated this input key event
- @param Key the name of the key which an event occured for (KEY_Up, KEY_Down, etc.)
- @param EventType the type of event which occured (pressed, released, etc.)
- @param AmountDepressed for analog keys, the depression percent.
- @return true to consume the key event, false to pass it on.