Ceci est une ancienne révision du document !
int Slider.BackgroundGraphic;Gets/sets the sprite used to draw the slider background. This image is tiled along the length of the slider.
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.
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.
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.
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.
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 interface_click function 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:
SetMusicMasterVolume(sldVolume.Value);
will set the master music volume to the value of the slider sldVolume .
See Also: Label.Text