C# Class LeopotamGroup.Gui.Layout.GuiPanel

Inheritance: LeopotamGroup.Common.MonoBehaviourBase
ファイルを表示 Open project: Leopotam/LeopotamGroupLibraryUnity Class Usage Examples

Public Methods

Method Description
AddOnChangeListener ( GuiWidget listener ) : void

Add OnChange event listener.

GetFontMaterial ( Font font ) : Material

Get cached font material.

GetMaterial ( GuiAtlas atlas ) : Material

Get cached material for GuiAtlas.

GetPanel ( Transform obj ) : GuiPanel

Get closest parent panel for transform. if not found - new panel will be created at root GameObject.

IsPointInside ( float x, float y ) : bool

Is (X,Y) point inside panel clipping range. Will return true if no clipping.

IsRectInside ( Vector2 min, Vector2 max ) : bool

Is (min,max) rect inside panel clipping range. Will return true if no clipping.

RemoveOnChangeListener ( GuiWidget listener ) : void

Remove OnChange event listener.

ResetMaterialCache ( ) : void

Reset materials cache. All dependent widgets should be invalidate manually!

UpdateVisuals ( ) : void

Force revalidate internal atlases, fonts and children.

Private Methods

Method Description
InvalidateClipData ( Vector3 worldPos ) : void
LateUpdate ( ) : void
OnDisable ( ) : void
OnEnable ( ) : void
RaiseOnChanged ( GuiPanel panel ) : void
UpdateMaterial ( Material mtrl ) : void

Method Details

AddOnChangeListener() public method

Add OnChange event listener.
public AddOnChangeListener ( GuiWidget listener ) : void
listener GuiWidget Listener.
return void

GetFontMaterial() public method

Get cached font material.
public GetFontMaterial ( Font font ) : Material
font UnityEngine.Font Font instance.
return UnityEngine.Material

GetMaterial() public method

Get cached material for GuiAtlas.
public GetMaterial ( GuiAtlas atlas ) : Material
atlas LeopotamGroup.Gui.Common.GuiAtlas GuiAtlas instance.
return UnityEngine.Material

GetPanel() public static method

Get closest parent panel for transform. if not found - new panel will be created at root GameObject.
public static GetPanel ( Transform obj ) : GuiPanel
obj UnityEngine.Transform Widget.
return GuiPanel

IsPointInside() public method

Is (X,Y) point inside panel clipping range. Will return true if no clipping.
public IsPointInside ( float x, float y ) : bool
x float Point X coordinate.
y float Point y coordinate.
return bool

IsRectInside() public method

Is (min,max) rect inside panel clipping range. Will return true if no clipping.
public IsRectInside ( Vector2 min, Vector2 max ) : bool
min UnityEngine.Vector2 Left bottom corner of rect.
max UnityEngine.Vector2 Right top corner of rect.
return bool

RemoveOnChangeListener() public method

Remove OnChange event listener.
public RemoveOnChangeListener ( GuiWidget listener ) : void
listener GuiWidget Listener.
return void

ResetMaterialCache() public method

Reset materials cache. All dependent widgets should be invalidate manually!
public ResetMaterialCache ( ) : void
return void

UpdateVisuals() public method

Force revalidate internal atlases, fonts and children.
public UpdateVisuals ( ) : void
return void