View Single Post
  #1  
Unread 06-06-2013, 04:40 PM
Lynx3d Lynx3d is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: May 2013
Posts: 7
SetBackground(), Asset IDs and custom skins

Maybe someone can help me.

We have Control:SetBackground(), which accepts a numeric Asset ID to use the client-internal images. I have some interface code that uses them, so I don't need to pack all these files which are already in the client anyway.

Now comes the tricky part. These images are obviously affected by custom skins, which is fantastic since my UI elements are supposed to look like the rest of the client. But the behaviour seems very inconsistent.
Basically, only images that are used by a control that have some active parent control get updated when you set a new skin.

Example:
I have a Control that uses 0x410001c9 as background. When I switch skin, it updates its appearance, yay! Now the control switches background on mouse-over to 0x410001ca. But that image was not used by any control when I activated the skin, so it gets the original version.
But if a control used 0x410001ca as background (can be invisible but apparently must have a parent control/window) when switching skin, also the mouse-over suddenly works.
And logging in with a custom skin doesn't skin Lua controls properly either.

Any ideas how to get at least consistent behaviour?
Reply With Quote