-
Notifications
You must be signed in to change notification settings - Fork 10
Slider
Slider is a subclass of GUIControl
and therefore inherits all GUIControl's functions and properties in addition to its own, which are listed below.
See also: Editing GUI Sliders
int Slider.BackgroundGraphic;
Gets/sets the sprite used to draw the slider background. This image is tiled along the length of the slider.
The background graphic can be set to 0, which will draw the default grey slider background.
Example:
Display("sldHealth's background is sprite %d", sldHealth.BackgroundGraphic);
displays the sldHealth slider's background image
Compatibility: Supported by AGS 3.1.0 and later versions.
See also: Slider.HandleGraphic
int Slider.HandleGraphic;
Gets/sets the sprite used to draw the handle on the slider. The handle represents the slider's current position, and can be dragged around by the player.
The handle graphic can be set to 0, which will draw the default grey handle.
Example:
Display("sldHealth's handle is sprite %d", sldHealth.HandleGraphic);
displays the sldHealth slider's handle image
Compatibility: Supported by AGS 3.1.0 and later versions.
See also:
Slider.BackgroundGraphic
,
Slider.HandleOffset
int Slider.HandleOffset;
Gets/sets the offset at which the handle image is drawn. This value is initially set up in the editor.
Example:
sldHealth.HandleOffset = 2;
sets the sldHealth slider's handle to be drawn an extra 2 pixels to the right.
Compatibility: Supported by AGS 3.1.0 and later versions.
See also: Slider.HandleGraphic
int Slider.Max;
Gets/sets the maximum value of the specified GUI slider.
When changing the maximum, the slider's Value will be adjusted if necessary so that it lies within the Min - Max range.
An error occurs if you try to set the Max to a lower value than the Min.
Example:
sldHealth.Max = 200;
sets the maximum value of the sldHealth slider to 200.
See also: Slider.Min
,
Slider.Value
int Slider.Min;
Gets/sets the minimum value of the specified GUI slider.
When changing the minimum, the slider's Value will be adjusted if necessary so that it lies within the Min - Max range.
An error occurs if you try to set the Min to a higher value than the Max.
Example:
sldHealth.Min = 0;
sets the minimum value of the sldHealth slider to 0.
See also: Slider.Max
,
Slider.Value
(Formerly known as GetSliderValue
, which is now obsolete)
(Formerly known as SetSliderValue
, which is now obsolete)
int Slider.Value;
Gets/sets the value of the specified GUI slider. You would usually use this in the slider's OnChange event handler to find out what value the player has changed the slider to, in order to process their command.
When setting the value, the new value must lie between the MIN and MAX settings for the slider, as set up in the GUI editor.
Example:
System.Volume = sldVolume.Value;
will set the audio volume to the value of the slider sldVolume.
See also: Label.Text
Getting Started in AGS
Editor
- New Game templates
- Editor Preferences
- General Settings
- Default Setup
- Colours Editor
- Room Editor
- Character Editor
- Cursor Editor
- Dialog Editor
- Font Preview
- GUI Editor
- Inventory Items Editor
- View Editor
- Sprite Manager
- Music and sound
- Voice speech
- Script Modules
- System limits
- Log Panel
- Plugins
- Other Features
Engine
Scripting
- Scripting Tutorial
- Scripting Language
-
Scripting API
- Script API Overview
- Standard Constants
- Standard Enumerated Types
- Standard Types
- Game variables
- Global arrays
- Global event handlers
- repeatedly_execute / repeatedly_execute_always
- Custom dialog options rendering
- Global functions: general
- Global functions: message display
- Global functions: multimedia actions
- Global functions: palette operations
- Global functions: room actions
- Global functions: screen effects
- Global functions: wait
- AudioChannel functions and properties
- AudioClip functions and properties
- Camera functions and properties
- Character functions and properties
- DateTime functions and properties
- Dialog functions and properties
- DialogOptionsRenderingInfo functions and properties
- Dictionary functions and properties
- DrawingSurface functions and properties
- DynamicSprite functions and properties
- File functions and properties
- Game functions and properties
- GUI functions and properties
- GUI control functions and properties
- GUI Button functions and properties
- GUI InvWindow functions and properties
- GUI Label functions and properties
- GUI List Box functions and properties
- GUI Slider properties
- GUI Text Box functions and properties
- Hotspot functions and properties
- Inventory item functions and properties
- Maths functions and properties
- Mouse functions and properties
- Object functions and properties
- Overlay functions and properties
- Parser functions
- Region functions and properties
- Room functions and properties
- Screen functions and properties
- Set functions and properties
- Speech functions and properties
- String functions
- System functions and properties
- TextWindowGUI functions and properties
- ViewFrame functions and properties
- Viewport functions and properties
- Obsolete Script API
- Event Types
- Key code table
- Audio in script
Legal Notice
Getting in touch
Misc
Hidden