lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

Reply
Thread Tools Display Modes
  #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
  #2  
Unread 06-07-2013, 03:58 PM
Thurallor's Avatar
Thurallor Thurallor is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: May 2013
Posts: 202
I'm not sure I'm exactly following, but would it suffice to simply always have at least one instance of every asset ID in use, e.g. in hidden or off-screen windows?
Reply With Quote
  #3  
Unread 06-09-2013, 12:20 AM
Lynx3d Lynx3d is offline
The Undefeated
Interface Author - Click to view interfaces
 
Join Date: May 2013
Posts: 7
No unfortunately not.

Seems the whole thing is even more tricky. Apparently the skin is applied before plugins are loaded on login, so after login most assets are not skinned properly. Even if the skin would apply after plugin loading, reloading a plugin would screw it again.

Some assets however are always skinned, so I think Turbine only marked a few IDs to check for a skin overriding them, while activating a skin for some reason checks all Lua controls and replaces images.
For example 0x410001c9 (default "left" button in dressing room and when splitting stacks) does always get skinned properly, 0x410001ca however only shows properly when a control already uses it when a skin gets activated.

I'm not really sure why those IDs behave differently...do the skinnable ArtAssetID in the SkinDefinition.xml have a 1:1 relation to the numeric asset ID we can use in Lua? Or are several ArtAssetID refering to the same internal image by default?
Somehow seems like an unfinished attempt to make ("custom") Lua controls support skins...
Too bad Turbine.UI.Lotro lacks several vital elemets to do a proper configuration panel
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom Interface(Paid) zerano Chit Chat 3 10-26-2011 02:05 PM
Help with custom quickslots aens Lua Programming Help (L) 5 03-26-2011 07:13 PM
save custom toolbars Nessy Interface Requests (L) 2 02-16-2011 02:16 PM
Panel File IDs hoojahmoolah General Authoring Discussion (L) 7 10-27-2008 04:33 PM
custom target rings riverlove Interface Requests (L) 2 07-17-2008 06:09 AM


All times are GMT -5. The time now is 06:40 PM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui