Castle Game Engine: CastleOnScreenMenu: Class TMenuSlider

# Class TMenuSlider
Description | Hierarchy | Fields | Methods | Properties
## Unit CastleOnScreenMenu ## Declaration `type TMenuSlider = class(TMenuAccessory)` ## Description no description available, TMenuAccessory description follows Attachment to a specific menu item of TCastleOnScreenMenu, for example may store a value associated with given menu option, and allow to change it by a slider. ## Hierarchy TObject TMenuAccessory TMenuSlider ## Overview ### Methods
| `procedure DrawSliderPosition(const Rectangle: TRectangle; const Position: Single);`
| `function XCoordToSliderPosition(const XCoord: Single; const Rectangle: TRectangle): Single;`
| `procedure DrawSliderText(const Rectangle: TRectangle; const Text: string);`
| `constructor Create;`
| `function GetWidth: Integer; override;`
| `procedure Draw(const Rectangle: TRectangle); override;`
### Properties
| `property DisplayValue: boolean read FDisplayValue write FDisplayValue default true;`
## Description ### Methods
| `procedure DrawSliderPosition(const Rectangle: TRectangle; const Position: Single);`
Draw a slider at given Position. If Position is outside 0..1, it is clamped to 0..1 (this way we do not show slider at some wild position if it's outside the expected range; but DrawSliderText will still show the true, unclamped, value).
| `function XCoordToSliderPosition(const XCoord: Single; const Rectangle: TRectangle): Single;`
Returns a value of Position, always in 0..1 range, that would result in slider being drawn at XCoord screen position by DrawSliderPosition. Takes Rectangle as the rectangle currently occupied by the whole slider.
| `procedure DrawSliderText(const Rectangle: TRectangle; const Text: string);`
| `constructor Create;`
| `function GetWidth: Integer; override;`
| `procedure Draw(const Rectangle: TRectangle); override;`
### Properties
| `property DisplayValue: boolean read FDisplayValue write FDisplayValue default true;`
Should the Value be displayed as text ? Usually useful — but only if the Value has some meaning for the user. If `True`, then ValueToStr is used.
Generated by PasDoc 0.13.0 on 2015-06-15 04:43:10