C# Class Nez.UI.Slider

Inheritance: ProgressBar, IInputListener, IGamepadFocusable
Afficher le fichier Open project: prime31/Nez Class Usage Examples

Méthodes publiques

Свойство Type Description
sliderBoundaryThreshold float

Méthodes publiques

Méthode Description
IGamepadFocusable ( ) : void
IGamepadFocusable ( Direction direction ) : void
IInputListener ( ) : void
IInputListener ( Vector2 mousePos ) : void
Slider ( Skin skin, string styleName = null, float min, float max = 1, float step = 0.1f ) : System
Slider ( float min, float max, float stepSize, bool vertical, SliderStyle style ) : System

Creates a new slider. It's width is determined by the given prefWidth parameter, its height is determined by the maximum of the height of either the slider {@link NinePatch} or slider handle {@link TextureRegion}. The min and max values determine the range the values of this slider can take on, the stepSize parameter specifies the distance between individual values. E.g. min could be 4, max could be 10 and stepSize could be 0.2, giving you a total of 30 values, 4.0 4.2, 4.4 and so on.

calculatePositionAndValue ( Vector2 mousePos ) : void
enableExplicitFocusableControl ( IGamepadFocusable upEle, IGamepadFocusable downEle, IGamepadFocusable leftEle, IGamepadFocusable rightEle ) : void
getStyle ( ) : SliderStyle

Returns the slider's style. Modifying the returned style may not have an effect until {@link #setStyle(SliderStyle)} is called

isDragging ( ) : bool
setStyle ( SliderStyle style ) : void

Méthodes protégées

Méthode Description
getKnobDrawable ( ) : IDrawable
onActionButtonPressed ( ) : void
onActionButtonReleased ( ) : void
onFocused ( ) : void
onUnfocused ( ) : void
onUnhandledDirectionPressed ( Direction direction ) : void

Private Methods

Méthode Description
IInputListener ( Vector2 mousePos ) : bool
IInputListener ( int mouseWheelDelta ) : bool

Method Details

IGamepadFocusable() public méthode

public IGamepadFocusable ( ) : void
Résultat void

IGamepadFocusable() public méthode

public IGamepadFocusable ( Direction direction ) : void
direction Direction
Résultat void

IInputListener() public méthode

public IInputListener ( ) : void
Résultat void

IInputListener() public méthode

public IInputListener ( Vector2 mousePos ) : void
mousePos Vector2
Résultat void

Slider() public méthode

public Slider ( Skin skin, string styleName = null, float min, float max = 1, float step = 0.1f ) : System
skin Skin
styleName string
min float
max float
step float
Résultat System

Slider() public méthode

Creates a new slider. It's width is determined by the given prefWidth parameter, its height is determined by the maximum of the height of either the slider {@link NinePatch} or slider handle {@link TextureRegion}. The min and max values determine the range the values of this slider can take on, the stepSize parameter specifies the distance between individual values. E.g. min could be 4, max could be 10 and stepSize could be 0.2, giving you a total of 30 values, 4.0 4.2, 4.4 and so on.
public Slider ( float min, float max, float stepSize, bool vertical, SliderStyle style ) : System
min float Minimum.
max float Max.
stepSize float Step size.
vertical bool If set to true vertical.
style SliderStyle
Résultat System

calculatePositionAndValue() public méthode

public calculatePositionAndValue ( Vector2 mousePos ) : void
mousePos Vector2
Résultat void

enableExplicitFocusableControl() public méthode

public enableExplicitFocusableControl ( IGamepadFocusable upEle, IGamepadFocusable downEle, IGamepadFocusable leftEle, IGamepadFocusable rightEle ) : void
upEle IGamepadFocusable
downEle IGamepadFocusable
leftEle IGamepadFocusable
rightEle IGamepadFocusable
Résultat void

getKnobDrawable() protected méthode

protected getKnobDrawable ( ) : IDrawable
Résultat IDrawable

getStyle() public méthode

Returns the slider's style. Modifying the returned style may not have an effect until {@link #setStyle(SliderStyle)} is called
public getStyle ( ) : SliderStyle
Résultat SliderStyle

isDragging() public méthode

public isDragging ( ) : bool
Résultat bool

onActionButtonPressed() protected méthode

protected onActionButtonPressed ( ) : void
Résultat void

onActionButtonReleased() protected méthode

protected onActionButtonReleased ( ) : void
Résultat void

onFocused() protected méthode

protected onFocused ( ) : void
Résultat void

onUnfocused() protected méthode

protected onUnfocused ( ) : void
Résultat void

onUnhandledDirectionPressed() protected méthode

protected onUnhandledDirectionPressed ( Direction direction ) : void
direction Direction
Résultat void

setStyle() public méthode

public setStyle ( SliderStyle style ) : void
style SliderStyle
Résultat void

Property Details

sliderBoundaryThreshold public_oe property

the maximum distance outside the slider the mouse can move when pressing it to cause it to be unfocused
public float sliderBoundaryThreshold
Résultat float