C# Class Axiom.Overlays.Elements.Panel

GuiElement representing a flat, single-material (or transparent) panel which can contain other elements.
This class subclasses GuiContainer because it can contain other elements. Like other containers, if hidden it's contents are also hidden, if moved it's contents also move etc. The panel itself is a 2D rectangle which is either completely transparent, or is rendered with a single material. The texture(s) on the panel can be tiled depending on your requirements.

This component is suitable for backgrounds and grouping other elements. Note that because it has a single repeating material it cannot have a discrete border (unless the texture has one and the texture is tiled only once). For a bordered panel, see it's subclass BorderPanel.

Note that the material can have all the usual effects applied to it like multiple texture layers, scrolling / animated textures etc. For multiple texture layers, you have to set the tiling level for each layer.

Inheritance: OverlayElementContainer
ファイルを表示 Open project: WolfgangSt/axiom Class Usage Examples

Protected Properties

Property Type Description
isTransparent bool
numTexCoordsInBuffer int
tileX float[]
tileY float[]
topLeft System.Vector2

Public Methods

Method Description
GetTileX ( int layer ) : float
GetTileY ( int layer ) : float
GetUV ( Real &u1, Real &v1, Real &u2, Real &v2 ) : void
Initialize ( ) : void

SetTiling ( float x, float y, int layer ) : void

SetUV ( Real u1, Real v1, Real u2, Real v2 ) : void
UpdateRenderQueue ( RenderQueue queue ) : void

Protected Methods

Method Description
UpdatePositionGeometry ( ) : void

Internal method for setting up geometry, called by GuiElement.Update

UpdateTextureGeometry ( ) : void

Called to update the texture coords when layers change.

Private Methods

Method Description
Panel ( string name ) : System

Method Details

GetTileX() public method

public GetTileX ( int layer ) : float
layer int
return float

GetTileY() public method

public GetTileY ( int layer ) : float
layer int
return float

GetUV() public method

public GetUV ( Real &u1, Real &v1, Real &u2, Real &v2 ) : void
u1 Real
v1 Real
u2 Real
v2 Real
return void

Initialize() public method

public Initialize ( ) : void
return void

SetTiling() public method

public SetTiling ( float x, float y, int layer ) : void
x float
y float
layer int
return void

SetUV() public method

public SetUV ( Real u1, Real v1, Real u2, Real v2 ) : void
u1 Real
v1 Real
u2 Real
v2 Real
return void

UpdatePositionGeometry() protected method

Internal method for setting up geometry, called by GuiElement.Update
protected UpdatePositionGeometry ( ) : void
return void

UpdateRenderQueue() public method

public UpdateRenderQueue ( RenderQueue queue ) : void
queue Axiom.Graphics.RenderQueue
return void

UpdateTextureGeometry() protected method

Called to update the texture coords when layers change.
protected UpdateTextureGeometry ( ) : void
return void

Property Details

isTransparent protected_oe property

protected bool isTransparent
return bool

numTexCoordsInBuffer protected_oe property

protected int numTexCoordsInBuffer
return int

tileX protected_oe property

protected float[] tileX
return float[]

tileY protected_oe property

protected float[] tileY
return float[]

topLeft protected_oe property

protected Vector2,System topLeft
return System.Vector2