예제 #1
0
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 );
}
예제 #2
0
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 );
}
예제 #3
0
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 );
}