The three virtues of a programmer: Laziness, Impatience, and Hubris. – Larry Wall


From Unreal Wiki, The Unreal Engine Documentation Site
Jump to: navigation, search
UT2003 :: GUI >> GUIComponent >> GUISlider

This GUI component displays a slider whose value can be changed by dragging the slider control left and right. The minimum and maximum values of the slider can be specified.

Note that when the default value for the slider is set on the control (when it's created) the minimum and maximum values are ignored. This can lead to some funny display problems if the slider's default value is outside of the minimum and maximum values set.



float MinValue
This is the minimum value of the slider.
float MaxValue
This is the maximum value of the slider.
float Value
This is the current value of the slider.
String CaptionStyleName
This is the style that will be applied to the caption of the slider. The default value is SliderCaption.
bool bIntSlider
Set this value to true to ensure the slider can only hold integer values.


function SetValue(float NewValue)
This function sets the slider value to NewValue after taking into account the minimum and maximum value of the slider. Causes an OnChange event.
function InitComponent(GUIController MyController, GUIComponent MyOwner)
Initialises the component and assigns some of the delegate functions.
function bool InternalCapturedMouseMove(float deltaX, float deltaY)
Called when the mouse is used to move the slider control?
function bool InternalOnKeyEvent(out byte Key, out byte State, float delta)
Called when the keyboard is used to move the slider control?
function Adjust(float amount)
Adjusts the slider value by the percentage value in amount. Use 1.0 for 100%. The value in amount should be negative to reduce the slider value.
function bool InternalOnClick(GUIComponent Sender)
Called when the slider is released or clicked on.
function InternalOnMousePressed(GUIComponent Sender,bool RepeatClick)
Called when a mouse click down event is trapped.
delegate string OnDrawCaption()
A delegate called to update the caption of the slider as the control is dragged left and right. By default displays the value of the slider in brackets.

Example Definition[edit]

defaultproperties {
  Begin Object class=GUISlider Name=FMBlueSlider
    OnChange=ColourSliderChanged  // Called when mouse button is released after slide
    Hint="Sets the colour of the fog."
  End Object