C# Class Gearset.UI.LayoutBox

A box.
Show file Open project: juancampa/Gearset Class Usage Examples

Public Methods

Method Description
DrawBorderLines ( Color color ) : void

Helper methods, draws the border of the box. Must be called every frame.

DrawCrossLines ( Color color ) : void

Helper methods, draws the border of the box. Must be called every frame.

DrawCrossLines ( Color color, Gearset.Components.InternalLineDrawer lineDrawer ) : void
GetScreenPosition ( ) : Vector2
LayoutBox ( Vector2 position ) : System
LayoutBox ( Vector2 position, Vector2 size ) : System
WorldToLocal ( Vector2 point ) : Vector2

Returns the passed world point in local point of this LayoutBox.

Protected Methods

Method Description
OnPositionChanged ( ) : void
OnSizeChanged ( ) : void

Private Methods

Method Description
Contains ( Vector2 point ) : bool

Returns true if the passed point is contained in this box.

DrawBorderLines ( Color color, Gearset.Components.InternalLineDrawer lineDrawer ) : void

Helper methods, draws the border of the box. Must be called every frame. TODO: Move this to a UI debug drawer or something similar

RaiseClick ( Vector2 position ) : void

Only to be called by the MouseRouter

RaiseDragged ( Vector2 delta ) : void

Only to be called by the MouseRouter

RaiseMouseDown ( Vector2 position ) : void

Only to be called by the MouseRouter

RaiseMouseUp ( Vector2 position ) : void

Only to be called by the MouseRouter

Method Details

DrawBorderLines() public method

Helper methods, draws the border of the box. Must be called every frame.
public DrawBorderLines ( Color color ) : void
color Color
return void

DrawCrossLines() public method

Helper methods, draws the border of the box. Must be called every frame.
public DrawCrossLines ( Color color ) : void
color Color
return void

DrawCrossLines() public method

public DrawCrossLines ( Color color, Gearset.Components.InternalLineDrawer lineDrawer ) : void
color Color
lineDrawer Gearset.Components.InternalLineDrawer
return void

GetScreenPosition() public method

public GetScreenPosition ( ) : Vector2
return Vector2

LayoutBox() public method

public LayoutBox ( Vector2 position ) : System
position Vector2
return System

LayoutBox() public method

public LayoutBox ( Vector2 position, Vector2 size ) : System
position Vector2
size Vector2
return System

OnPositionChanged() protected method

protected OnPositionChanged ( ) : void
return void

OnSizeChanged() protected method

protected OnSizeChanged ( ) : void
return void

WorldToLocal() public method

Returns the passed world point in local point of this LayoutBox.
public WorldToLocal ( Vector2 point ) : Vector2
point Vector2
return Vector2