void CRadarIcon::UnSerializeAttribute ( TiXmlElement* a_XmlElement ) { a_XmlElement->QueryUnsignedAttribute ( "icon", ( unsigned int* )&this->m_uint32_ModelIndex ); a_XmlElement->QueryUnsignedAttribute ( "type", ( unsigned int* )&this->m_uint8_RadarIconType ); tVector* l_Position = new tVector(); if ( l_Position ) { a_XmlElement->QueryFloatAttribute ( "x", &l_Position->X ); a_XmlElement->QueryFloatAttribute ( "y", &l_Position->Y ); a_XmlElement->QueryFloatAttribute ( "z", &l_Position->Z ); this->SetPosition ( l_Position ); } /** * uint32_t for QueryUnsignedAttribute... */ uint32_t l_uint32_ColorR, l_uint32_ColorG, l_uint32_ColorB, l_uint32_ColorA = 0; a_XmlElement->QueryUnsignedAttribute ( "r", ( unsigned int* )&l_uint32_ColorR ); a_XmlElement->QueryUnsignedAttribute ( "g", ( unsigned int* )&l_uint32_ColorG ); a_XmlElement->QueryUnsignedAttribute ( "b", ( unsigned int* )&l_uint32_ColorB ); a_XmlElement->QueryUnsignedAttribute ( "a", ( unsigned int* )&l_uint32_ColorA ); this->SetColor ( tColor ( l_uint32_ColorR, l_uint32_ColorG, l_uint32_ColorB, l_uint32_ColorA ) ); }
Text::Text(sf::Font* font,const std::string& text,const int& size,const Vector3& color,const unsigned int& atts,const int& alpha,const float& x,const float& y){ m_String = new sf::Text(); m_String->setFont(*font); m_String->setCharacterSize(size); m_String->setString(text); m_String->setPosition(x,y); sf::Color tColor(color.X,color.Y,color.Z,alpha); m_String->setColor(tColor); m_TextAtt = atts; m_Visible = true; }
void tRenderer::InitializeRenderSystem() { if (m_RenderSystemInitialized == false) { m_RenderingThreadId = QThread::currentThreadId(); Connect(QThread::currentThread(), SIGNAL(finished()), this, SLOT(OnRenderThreadFinished())); m_xRenderSystem->Initialize(); m_xRenderSystem->SetBackgroundFillColor(tColor(0.0f, 0.0f, 0.0f, 1.0f)); m_RenderSystemInitialized = true; } }
// --------------------------------------------------------------------------- // // --------------------------------------------------------------------------- TInt CClrCssValueImpl::SetValueL( const TDesC& aValue ) { if(iValue) { delete iValue; iValue=NULL; } _LIT( KNone, "none" ); _LIT( KCurrentColor, "currentColor" ); TUint32 tempVal; if ( aValue == KNone ) { tempVal = KGfxColorNull; } else if ( aValue == KCurrentColor ) { tempVal = KSvgCurrentColor; } else { TSvgColor tColor(KGfxColorNull); if( tColor.GetStringL( aValue,tempVal) != EFalse ) { } else { tempVal = 0; } } iValue = new (ELeave) TSvgColor(tempVal); return KErrNone; }
void Text::setColor(const Vector3& rgb,const int& alpha){ sf::Color tColor(rgb.X,rgb.Y,rgb.Z,alpha); m_String->setColor(tColor); }