Urho3D
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Urho3D::UIBatch Class Reference

UI rendering draw call. More...

#include </home/runner/work/urho3d-doxygen.github.io/urho3d-doxygen.github.io/urho3d_repo/Source/Urho3D/UI/UIBatch.h>

Public Member Functions

 UIBatch ()
 Construct with defaults.
 
 UIBatch (UIElement *element, BlendMode blendMode, const IntRect &scissor, Texture *texture, 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 (i32 x, i32 y, i32 width, i32 height, int texOffsetX, int texOffsetY, int texWidth=0, int texHeight=0)
 Add a quad (integer version)
 
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.
 
unsigned GetInterpolatedColor (i32 x, i32 y)
 Return an interpolated color for the UI element (integer version)
 

Static Public Member Functions

static void AddOrMerge (const UIBatch &batch, 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.
 
Vector< float > * vertexData_ {}
 Vertex data.
 
unsigned vertexStart_ {}
 Vertex data start index.
 
unsigned vertexEnd_ {}
 Vertex data end index.
 
color32 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: