void TextUiModel::CollectVertices( Widget const& Wdg, UiVertexInserter_t& Inserter )const { Text text( Wdg( Widget::PT_FontSize ), Wdg.GetDimensions(), GetColor( Wdg ), Wdg( Widget::PT_Text ), false ); text.mVAlign = (TextWidget::VAlign)( (int)Wdg( Widget::PT_VAlign ) ); text.mHAlign = (TextWidget::HAlign)( (int)Wdg( Widget::PT_HAlign ) ); CollectVertices( text, Inserter, true ); }
void UiModel::CollectVertices( Widget const& Wdg, UiVertexInserter_t& Inserter )const { glm::vec4 const& Dim = Wdg.GetDimensions(); glm::vec4 const& Col = GetColor( Wdg ); ColoredBox( Dim, Col, Inserter ); }
bool TextUiModel::CalcRequiredSize( Widget const& Wdg, glm::vec2& OutScaler, glm::vec2& OutReqSize, std::string& OutBuf, float Ratio ) { Text text( Wdg( Widget::PT_FontSize ), Wdg.GetDimensions(), GetColor( Wdg ), Wdg( Widget::PT_Text ), false ); return CalcRequiredSize( text, OutScaler, OutReqSize, OutBuf, Ratio ); }