|
@@ -87,6 +87,7 @@ void Text3D::RegisterObject(Context* context)
|
|
|
horizontalAlignments, HA_LEFT, AM_DEFAULT);
|
|
horizontalAlignments, HA_LEFT, AM_DEFAULT);
|
|
|
URHO3D_ENUM_ACCESSOR_ATTRIBUTE("Vert Alignment", GetVerticalAlignment, SetVerticalAlignment, VerticalAlignment, verticalAlignments,
|
|
URHO3D_ENUM_ACCESSOR_ATTRIBUTE("Vert Alignment", GetVerticalAlignment, SetVerticalAlignment, VerticalAlignment, verticalAlignments,
|
|
|
VA_TOP, AM_DEFAULT);
|
|
VA_TOP, AM_DEFAULT);
|
|
|
|
|
+ URHO3D_ACCESSOR_ATTRIBUTE("Opacity", GetOpacity, SetOpacity, float, 1.0f, AM_FILE);
|
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Color", GetColorAttr, SetColor, Color, Color::WHITE, AM_DEFAULT);
|
|
URHO3D_ACCESSOR_ATTRIBUTE("Color", GetColorAttr, SetColor, Color, Color::WHITE, AM_DEFAULT);
|
|
|
URHO3D_ATTRIBUTE("Top Left Color", Color, text_.color_[0], Color::WHITE, AM_DEFAULT);
|
|
URHO3D_ATTRIBUTE("Top Left Color", Color, text_.color_[0], Color::WHITE, AM_DEFAULT);
|
|
|
URHO3D_ATTRIBUTE("Top Right Color", Color, text_.color_[1], Color::WHITE, AM_DEFAULT);
|
|
URHO3D_ATTRIBUTE("Top Right Color", Color, text_.color_[1], Color::WHITE, AM_DEFAULT);
|
|
@@ -146,7 +147,7 @@ void Text3D::UpdateGeometry(const FrameInfo& frame)
|
|
|
|
|
|
|
|
if (geometryDirty_)
|
|
if (geometryDirty_)
|
|
|
{
|
|
{
|
|
|
- for (unsigned i = 0; i < batches_.Size(); ++i)
|
|
|
|
|
|
|
+ for (unsigned i = 0; i < batches_.Size() && i < uiBatches_.Size(); ++i)
|
|
|
{
|
|
{
|
|
|
Geometry* geometry = geometries_[i];
|
|
Geometry* geometry = geometries_[i];
|
|
|
geometry->SetDrawRange(TRIANGLE_LIST, 0, 0, uiBatches_[i].vertexStart_,
|
|
geometry->SetDrawRange(TRIANGLE_LIST, 0, 0, uiBatches_[i].vertexStart_,
|