Class TCastleAbstractSlider

Unit

Declaration

type TCastleAbstractSlider = class(TCastleUserInterfaceFont)

Description

An abstract slider user interface. You actually want to use one of its descendants: TCastleFloatSlider or TCastleIntegerSlider.

Hierarchy

Overview

Fields

Public nested const DefaultSliderWidth = 200;
Public nested const DefaultSliderHeight = 30;

Methods

Public constructor Create(AOwner: TComponent); override;
Public destructor Destroy; override;
Public procedure Render; override;
Public procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override;
Public function PropertySections(const PropertyName: String): TPropertySections; override;

Properties

Public property TextColor: TCastleColor read FTextColor write SetTextColor;
Published property Width default DefaultSliderWidth;
Published property Height default DefaultSliderHeight;
Published property DisplayValue: boolean read FDisplayValue write FDisplayValue default true;
Published property Caption: String read FCaption write SetCaption;
Published property OnChange: TNotifyEvent read FOnChange write FOnChange;
Published property Background: TCastleImagePersistent read FBackground;
Published property Thumb: TCastleImagePersistent read FThumb;
Published property TextColorPersistent: TCastleColorPersistent read FTextColorPersistent ;

Description

Fields

Public nested const DefaultSliderWidth = 200;
 
Public nested const DefaultSliderHeight = 30;
 

Methods

Public constructor Create(AOwner: TComponent); override;
 
Public destructor Destroy; override;
 
Public procedure Render; override;
 
Public procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override;
 
Public function PropertySections(const PropertyName: String): TPropertySections; override;
 

Properties

Public property TextColor: TCastleColor read FTextColor write SetTextColor;

Color of the label. By default opaque black.

Published property Width default DefaultSliderWidth;
 
Published property Height default DefaultSliderHeight;
 
Published property DisplayValue: boolean read FDisplayValue write FDisplayValue default true;

Display the current value as text on the slider, right next to the Caption.

The exact method to display is defined by method TCastleFloatSlider.ValueToStr or TCastleIntegerSlider.ValueToStr (depending on descendant), so you can further customize it.

Published property Caption: String read FCaption write SetCaption;

Displayed on the slider. Right before value, if DisplayValue.

Published property OnChange: TNotifyEvent read FOnChange write FOnChange;

Called when value (like TCastleFloatSlider.Value or TCastleIntegerSlider.Value) changed because of user interaction (but not when it was changed by code setting the property).

Published property Background: TCastleImagePersistent read FBackground;

Background image that fills the entire slider area.

Published property Thumb: TCastleImagePersistent read FThumb;

Thumb image indicates the current value, like (like TCastleFloatSlider.Value or TCastleIntegerSlider.Value).

Published property TextColorPersistent: TCastleColorPersistent read FTextColorPersistent ;

TextColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write TextColor directly.

See also
TextColor
Color of the label.

Generated by PasDoc 0.16.0.