Class TMenuSlider

DescriptionHierarchyFieldsMethodsProperties

Unit

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

Overview

Methods

Protected procedure DrawSliderPosition(const Rectangle: TRectangle; const Position: Single);
Protected function XCoordToSliderPosition(const XCoord: Single; const Rectangle: TRectangle): Single;
Protected procedure DrawSliderText(const Rectangle: TRectangle; const Text: string);
Public constructor Create;
Public function GetWidth: Integer; override;
Public procedure Draw(const Rectangle: TRectangle); override;

Properties

Public property DisplayValue: boolean read FDisplayValue write FDisplayValue default true;

Description

Methods

Protected 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).

Protected 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.

Protected procedure DrawSliderText(const Rectangle: TRectangle; const Text: string);
 
Public constructor Create;
 
Public function GetWidth: Integer; override;
 
Public procedure Draw(const Rectangle: TRectangle); override;
 

Properties

Public 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 2014-08-30 12:10:37