C# Class Flood.GUI.Controls.ScrollBar

Base class for scrollbars.
Inheritance: Control
Show file Open project: FloodProject/flood Class Usage Examples

Protected Properties

Property Type Description
m_Bar Flood.GUI.ControlInternal.ScrollBarBar
m_ContentSize float
m_Depressed bool
m_NudgeAmount float
m_ScrollAmount float
m_ScrollButton Flood.GUI.ControlInternal.ScrollBarButton[]
m_ViewableContentSize float

Public Methods

Method Description
ScrollToBottom ( ) : void
ScrollToLeft ( ) : void
ScrollToRight ( ) : void
ScrollToTop ( ) : void
SetScrollAmount ( float value, bool forceUpdate = false ) : bool

Sets the scroll amount (0-1).

Protected Methods

Method Description
CalculateBarSize ( ) : int
CalculateScrolledAmount ( ) : float
OnBarMoved ( Control control ) : void

Handler for the BarMoved event.

OnMouseClickedLeft ( int x, int y, bool down ) : void

Handler invoked on mouse click (left) event.

Render ( Skins skin ) : void

Renders the control using specified skin.

ScrollBar ( Control parent ) : Flood.GUI.ControlInternal

Initializes a new instance of the ScrollBar class.

Method Details

CalculateBarSize() protected method

protected CalculateBarSize ( ) : int
return int

CalculateScrolledAmount() protected method

protected CalculateScrolledAmount ( ) : float
return float

OnBarMoved() protected method

Handler for the BarMoved event.
protected OnBarMoved ( Control control ) : void
control Control The control.
return void

OnMouseClickedLeft() protected method

Handler invoked on mouse click (left) event.
protected OnMouseClickedLeft ( int x, int y, bool down ) : void
x int X coordinate.
y int Y coordinate.
down bool If set to true mouse button is down.
return void

Render() protected method

Renders the control using specified skin.
protected Render ( Skins skin ) : void
skin Skins Skin to use.
return void

ScrollBar() protected method

Initializes a new instance of the ScrollBar class.
protected ScrollBar ( Control parent ) : Flood.GUI.ControlInternal
parent Control Parent control.
return Flood.GUI.ControlInternal

ScrollToBottom() public method

public ScrollToBottom ( ) : void
return void

ScrollToLeft() public method

public ScrollToLeft ( ) : void
return void

ScrollToRight() public method

public ScrollToRight ( ) : void
return void

ScrollToTop() public method

public ScrollToTop ( ) : void
return void

SetScrollAmount() public method

Sets the scroll amount (0-1).
public SetScrollAmount ( float value, bool forceUpdate = false ) : bool
value float Scroll amount.
forceUpdate bool Determines whether the control should be updated.
return bool

Property Details

m_Bar protected property

protected ScrollBarBar,Flood.GUI.ControlInternal m_Bar
return Flood.GUI.ControlInternal.ScrollBarBar

m_ContentSize protected property

protected float m_ContentSize
return float

m_Depressed protected property

protected bool m_Depressed
return bool

m_NudgeAmount protected property

protected float m_NudgeAmount
return float

m_ScrollAmount protected property

protected float m_ScrollAmount
return float

m_ScrollButton protected property

protected ScrollBarButton[],Flood.GUI.ControlInternal m_ScrollButton
return Flood.GUI.ControlInternal.ScrollBarButton[]

m_ViewableContentSize protected property

protected float m_ViewableContentSize
return float