This page has been translated automatically.
UnigineEditor
Interface Overview
Assets Workflow
Settings and Preferences
Working With Projects
Adjusting Node Parameters
Setting Up Materials
Setting Up Properties
Landscape Tool
Using Editor Tools for Specific Tasks
Extending Editor Functionality
Programming
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine Tools
GUI
Double Precision Coordinates
API
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
Filesystem Functionality
Math Functionality
Node-Related Classes
Objects-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
IG Plugin
CIGIConnector Plugin
Rendering-Related Classes
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

WidgetSlider Class

Warning
UnigineScript is deprecated and will be removed in future releases. Please consider using C#/C++ instead, as these APIs are the preferred ones. Availability of new Engine features in UnigineScipt is not guaranteed, as the current level of support assumes only fixing critical issues.
Inherits: Widget

This class creates a slider: horizontal or vertical one.

WidgetSlider Class

Members


static WidgetSlider ( Gui gui, int min = 0, int max = 100, int value = 0 ) #

Constructor. Creates a slider with given properties (horizontal one by default).

Arguments

  • Gui gui - GUI, to which the slider will belong.
  • int min - Minimum value.
  • int max - Maximum value.
  • int value - Initial value.

void setButtonHeight ( int height ) #

Sets the height of the slider handle in pixels (for a vertical slider).

Arguments

  • int height - Height of the handle in pixels.

int getButtonHeight ( ) #

Returns the height of the slider handle in pixels (for a vertical slider).

Return value

Height of the handle in pixels.

void setButtonWidth ( int width ) #

Sets width of the slider handle in pixels (for a horizontal slider).

Arguments

  • int width - Width of the handle in pixels.

int getButtonWidth ( ) #

Returns the width of the slider handle in pixels (for a horizontal slider).

Return value

Width of the handle in pixels.

void setMaxExpand ( int expand ) #

Sets the maximum value, up to which the upper limit of the range of the slider values can be expanded.

Arguments

  • int expand - Maximum value, up to which the slider's upper limit can be raised.

int getMaxExpand ( ) #

Returns the current maximum value, up to which the upper limit of the range of the slider values can be expanded.
Notice
The upper limit of the slider can be expanded only if the slider is attached to an editline with the GUI_ATTACH_MAX_EXPAND flag.
See also the setMaxExpand() function.

Return value

Maximum value, up to which the slider's upper limit can be raised.

void setMaxValue ( int value ) #

Sets the maximum value for the slider.

Arguments

  • int value - Maximum value.

int getMaxValue ( ) #

Returns the current maximum value of the slider.
Notice
The value returned by this function may differ from the value set via setMaxValue(). See The setMaxExpand() function for more details.

Return value

Maximum value.

void setMinExpand ( int expand ) #

Sets the minimum value, up to which the lower limit of the range of the slider values can be expanded.

Arguments

  • int expand - Minimum value, up to which the slider's lower limit can be dropped.

int getMinExpand ( ) #

Returns the minimum value, up to which the lower limit of the range of the slider values can be expanded.
Notice
The lower limit of the slider can be expanded only if the slider is attached to an editline with the GUI_ATTACH_MIN_EXPAND flag.
See also the setMinExpand() function.

Return value

Minimum value, up to which the slider's lower limit can be dropped.

void setMinValue ( int value ) #

Sets the minimum value for the slider.

Arguments

  • int value - Minimum value.

int getMinValue ( ) #

Returns the minimum value of the slider.
Notice
The value returned by this function may differ from the value set via setMinValue(). See The setMinExpand() function for more details.

Return value

Minimum value.

void setOrientation ( int orientation ) #

Sets orientation of the slider: horizontal (by default) or vertical one.

Arguments

  • int orientation - 1 to set horizontal orientation; 0 to set vertical one.

int getOrientation ( ) #

Returns the current orientation of the slider: horizontal or vertical one.

Return value

1 if the orientation is vertical; 0 if it is horizontal.

void setValue ( int value ) #

Sets a new current value for the slider, i.e. its position.

Arguments

  • int value - Slider value.

int getValue ( ) #

Returns the current value of the slider, i.e. its position.

Return value

Current slider value.

void setBackgroundColor ( vec4 color ) #

Sets the background color to be used for the widget.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 getBackgroundColor ( ) #

Returns the current background color used for the widget.

Return value

Four-component vector specifying the color in the RGBA format.

void setButtonColor ( vec4 color ) #

Sets the color for the widget's button.

Arguments

  • vec4 color - Four-component vector specifying the color in the RGBA format.

vec4 getButtonColor ( ) #

Returns the current color for the widget's button.

Return value

Four-component vector specifying the color in the RGBA format.
Last update: 2020-04-10
Build: ()