}
}
+Vector3 TextField::GetNaturalSize()
+{
+ return mController->GetNaturalSize();
+}
+
+float TextField::GetHeightForWidth( float width )
+{
+ return mController->GetHeightForWidth( width );
+}
+
void TextField::OnRelayout( const Vector2& size, ActorSizeContainer& container )
{
if( mController->Relayout( size ) )
virtual void OnInitialize();
/**
+ * @copydoc Control::GetNaturalSize()
+ */
+ virtual Vector3 GetNaturalSize();
+
+ /**
+ * @copydoc Control::GetHeightForWidth()
+ */
+ virtual float GetHeightForWidth( float width );
+
+ /**
* @copydoc Control::OnInitialize()
*/
virtual void OnRelayout( const Vector2& size, ActorSizeContainer& container );
}
visualModel.SetGlyphPositions( &glyphPositions[0], glyphCount );
+
+ visualModel.SetActualSize( Vector2(penX, fontMetrics.height) );
}
}
}
else if( endPenX > boundingBox.width )
{
- actualSize.width = ( actualSize.width < endPenX - glyph.advance ) ? endPenX - glyph.advance : actualSize.width;
break;
}
}
+ actualSize.width = ( actualSize.width < endPenX ) ? endPenX : actualSize.width;
+
// If end of text or no whitespace found
if( glyphCount == j ||
endIndex == i )