Today I made my first rookie mistake.
It involved UI, and please note, I am completely new to Urho3D and its workflow.
I had some code that called UI::SetDefaultStyle for UI elements:
ui_->GetRoot()->SetDefaultStyle(cache->GetResource(“UI/DefaultStyle.xml”));
Later, I had some code to set up a splash screen, and based on public examples, I brainlessly had this:
UI* ui = GetSubsystem<UI>();
BorderImage* splashUI = new BorderImage(context_);
splashUI->SetName("Splash");
texture = cache->GetResource<Texture2D>("Textures/LogoLarge.png");
splashUI->SetTexture(texture); // Set texture
splashUI->SetSize(texture->GetWidth(), texture->GetHeight());
splashUI->SetAlignment(HA_CENTER, VA_CENTER);
ui->GetRoot()->AddChild(splashUI);
splashUI->SetStyleAuto(); // <-- here's the culprit
What this does?
It sets the Texture of my UI Element to be the one used by the built-in UI elements.
Even though I could check my loaded texture name, size, etc was the one I thought I loaded, I would see the UI atlas texture instead.
It overrides the texture you thought you set, for that element.
I’ve learned my first lesson - don’t brainlessly attempt to string together code from different places, have a look at what it actually does!