Rebel Fork Framework
Urho3D::UIBatch Class Reference

UI rendering draw call. More...

#include <Urho3D/UI/UIBatch.h>

Public Member Functions

 UIBatch ()
 Construct with defaults.
 
 UIBatch (UIElement *element, BlendMode blendMode, const IntRect &scissor, Texture *texture, ea::vector< float > *vertexData)
 Construct.
 
void SetColor (const Color &color, bool overrideAlpha=false)
 Set new color for the batch. Overrides gradient.
 
void SetDefaultColor ()
 Restore UI element's default color.
 
void AddQuad (float x, float y, float width, float height, int texOffsetX, int texOffsetY, int texWidth=0, int texHeight=0)
 Add a quad.
 
void AddQuad (const Matrix3x4 &transform, int x, int y, int width, int height, int texOffsetX, int texOffsetY, int texWidth=0, int texHeight=0)
 Add a quad using a transform matrix.
 
void AddQuad (int x, int y, int width, int height, int texOffsetX, int texOffsetY, int texWidth, int texHeight, bool tiled)
 Add a quad with tiled texture.
 
void AddQuad (const Matrix3x4 &transform, const IntVector2 &a, const IntVector2 &b, const IntVector2 &c, const IntVector2 &d, const IntVector2 &texA, const IntVector2 &texB, const IntVector2 &texC, const IntVector2 &texD)
 Add a quad with freeform points and UVs. Uses the current color, not gradient. Points should be specified in clockwise order.
 
void AddQuad (const Matrix3x4 &transform, const IntVector2 &a, const IntVector2 &b, const IntVector2 &c, const IntVector2 &d, const IntVector2 &texA, const IntVector2 &texB, const IntVector2 &texC, const IntVector2 &texD, const Color &colA, const Color &colB, const Color &colC, const Color &colD)
 Add a quad with freeform points, UVs and colors. Points should be specified in clockwise order.
 
bool Merge (const UIBatch &batch)
 Merge with another batch.
 
unsigned GetInterpolatedColor (float x, float y)
 Return an interpolated color for the UI element.
 

Static Public Member Functions

static void AddOrMerge (const UIBatch &batch, ea::vector< UIBatch > &batches)
 Add or merge a batch.
 

Public Attributes

UIElementelement_ {}
 Element this batch represents.
 
BlendMode blendMode_ {BLEND_REPLACE}
 Blending mode.
 
IntRect scissor_
 Scissor rectangle.
 
Texturetexture_ {}
 Texture.
 
Vector2 invTextureSize_ {Vector2::ONE}
 Inverse texture size.
 
ea::vector< float > * vertexData_ {}
 Vertex data.
 
unsigned vertexStart_ {}
 Vertex data start index.
 
unsigned vertexEnd_ {}
 Vertex data end index.
 
unsigned color_ {}
 Current color. By default calculated from the element.
 
bool useGradient_ {}
 Gradient flag.
 
MaterialcustomMaterial_ {}
 Custom material.
 

Detailed Description

UI rendering draw call.


The documentation for this class was generated from the following files: