C# Class UIScrollKnob, urban-survivors

Acts as a slider knob for a slider bar.
Inheritance: UIButton
ファイルを表示 Open project: exdev/urban-survivors Class Usage Examples

Protected Properties

Property Type Description
colliderExtent float
colliderSizeFactor Vector2
ctrlPlane Plane
maxScrollPos float
origPos Vector3
slider UISlider,

Public Methods

Method Description
Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
Create ( string name, Vector3 pos ) : UIScrollKnob,

Creates a GameObject and attaches this component type to it.

Create ( string name, Vector3 pos, Quaternion rotation ) : UIScrollKnob,

Creates a GameObject and attaches this component type to it.

GetScrollPos ( ) : float

Returns a value in the range 0-1 indicating the scroll position. 0 indicates the starting position of the knob, 1 indicates the end position.

OnInput ( POINTER_INFO, &ptr ) : void
SetColliderSizeFactor ( Vector2 csf ) : void
SetMaxScroll ( float max ) : void
SetPosition ( float pos ) : void

Sets the position of the scroll knob. Values should be from 0-1.

SetSlider ( UISlider, s ) : void
SetupAppearance ( ) : void
UpdateCollider ( ) : void

Protected Methods

Method Description
Awake ( ) : void
GetLocalInputPoint ( Ray ray ) : Vector3

Method Details

Awake() protected method

protected Awake ( ) : void
return void

Copy() public method

public Copy ( SpriteRoot, s, ControlCopyFlags flags ) : void
s SpriteRoot,
flags ControlCopyFlags
return void

Create() static public method

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos ) : UIScrollKnob,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
return UIScrollKnob,

Create() static public method

Creates a GameObject and attaches this component type to it.
static public Create ( string name, Vector3 pos, Quaternion rotation ) : UIScrollKnob,
name string Name to give to the new GameObject.
pos Vector3 Position, in world space, where the new object should be created.
rotation Quaternion Rotation of the object.
return UIScrollKnob,

GetLocalInputPoint() protected method

protected GetLocalInputPoint ( Ray ray ) : Vector3
ray Ray
return Vector3

GetScrollPos() public method

Returns a value in the range 0-1 indicating the scroll position. 0 indicates the starting position of the knob, 1 indicates the end position.
public GetScrollPos ( ) : float
return float

OnInput() public method

public OnInput ( POINTER_INFO, &ptr ) : void
ptr POINTER_INFO,
return void

SetColliderSizeFactor() public method

public SetColliderSizeFactor ( Vector2 csf ) : void
csf Vector2
return void

SetMaxScroll() public method

public SetMaxScroll ( float max ) : void
max float
return void

SetPosition() public method

Sets the position of the scroll knob. Values should be from 0-1.
public SetPosition ( float pos ) : void
pos float The new position of the scroll knob.
return void

SetSlider() public method

public SetSlider ( UISlider, s ) : void
s UISlider,
return void

SetupAppearance() public method

public SetupAppearance ( ) : void
return void

UpdateCollider() public method

public UpdateCollider ( ) : void
return void

Property Details

colliderExtent protected_oe property

protected float colliderExtent
return float

colliderSizeFactor protected_oe property

protected Vector2 colliderSizeFactor
return Vector2

ctrlPlane protected_oe property

protected Plane ctrlPlane
return Plane

maxScrollPos protected_oe property

protected float maxScrollPos
return float

origPos protected_oe property

protected Vector3 origPos
return Vector3

slider protected_oe property

protected UISlider, slider
return UISlider,