vivienneanthony
Hi,
I’m trying to add little icons for a player status on a UI. This is the code. It keeps tellling me in the debug. Anyone knows whats wrong?
Vivienne
[Tue Oct 14 09:10:14 2014] DEBUG: Loading resource UI/Buttons/healthbarindicate.png
[Tue Oct 14 09:10:14 2014] ERROR: Could not load unknown resource type 882E
[Tue Oct 14 09:10:14 2014] DEBUG: Set occlusion buffer size 256x160 with 5 mip levels
[code]/// Update player info
void ExistenceClient::UpdatePlayerInfoBar(void)
{
/// Get resources
ResourceCache * cache = GetSubsystem<ResourceCache>();
UI* ui_ = GetSubsystem<UI>();
/// Get UIElement
UIElement * PlayerInfoUIElement = (UIElement*)ui_->GetRoot()->GetChild("PlayerInfoUIElement", true);
/// Create a sprite
Sprite * spriteSlot = new Sprite(context_);
/// Load sprite
spriteSlot->SetTexture(cache->GetResource<Texture>("Resources/Textures/blankindicatorlarge.png"));
spriteSlot->SetPosition(4,4);
PlayerInfoUIElement -> AddChild(spriteSlot);
[/code]
}