C# Класс 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.

Наследование: OverlayElementContainer
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
isTransparent bool
numTexCoordsInBuffer int
tileX float[]
tileY float[]
topLeft System.Vector2

Открытые методы

Метод Описание
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

Защищенные методы

Метод Описание
UpdatePositionGeometry ( ) : void

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

UpdateTextureGeometry ( ) : void

Called to update the texture coords when layers change.

Приватные методы

Метод Описание
Panel ( string name ) : System

Описание методов

GetTileX() публичный метод

public GetTileX ( int layer ) : float
layer int
Результат float

GetTileY() публичный метод

public GetTileY ( int layer ) : float
layer int
Результат float

GetUV() публичный метод

public GetUV ( Real &u1, Real &v1, Real &u2, Real &v2 ) : void
u1 Real
v1 Real
u2 Real
v2 Real
Результат void

Initialize() публичный метод

public Initialize ( ) : void
Результат void

SetTiling() публичный метод

public SetTiling ( float x, float y, int layer ) : void
x float
y float
layer int
Результат void

SetUV() публичный метод

public SetUV ( Real u1, Real v1, Real u2, Real v2 ) : void
u1 Real
v1 Real
u2 Real
v2 Real
Результат void

UpdatePositionGeometry() защищенный метод

Internal method for setting up geometry, called by GuiElement.Update
protected UpdatePositionGeometry ( ) : void
Результат void

UpdateRenderQueue() публичный метод

public UpdateRenderQueue ( RenderQueue queue ) : void
queue Axiom.Graphics.RenderQueue
Результат void

UpdateTextureGeometry() защищенный метод

Called to update the texture coords when layers change.
protected UpdateTextureGeometry ( ) : void
Результат void

Описание свойств

isTransparent защищенное свойство

protected bool isTransparent
Результат bool

numTexCoordsInBuffer защищенное свойство

protected int numTexCoordsInBuffer
Результат int

tileX защищенное свойство

protected float[] tileX
Результат float[]

tileY защищенное свойство

protected float[] tileY
Результат float[]

topLeft защищенное свойство

protected Vector2,System topLeft
Результат System.Vector2