We have detected that cookies are not enabled on your browser. Please enable cookies to ensure the proper experience.
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2011
    Posts
    18

    references to graphics

    Hi, I'm building a simple Plugin that uses a treeview.
    I am wondering how I can make my treeview look like other treeviews that are already in the interface, for example in the character window. I downloaded the Update10_UISkinArtPack.zip and found box_treelist_header_darkblue.t ga. this seems to be the blue background the nodes "basic stats", "offence", etc use. buttonMount_TreeIcon_Minus.tga and buttonMount_TreeIcon_Plus.tga seem to be the + and - displayed in the node.
    Now I could add these images to my treeview's nodes. But if someone had a skin installed that changes these images I would like my treeview to display the skin's images not the default ones.
    Is there a way to use some kind of reference to the currently used graphics or something like this?
    Thank you very much!

  2. #2
    Join Date
    Mar 2007
    Posts
    1,590
    The in-game resources can be used as backgrounds as long as you know the correct resource IDs. Unfortunately, there's no mapping between the xml IDs used by skins and the numeric resource IDs used by Lua so you have to track down the correct resource IDs manually by scanning all of the valid resources (there are many thousands). I had at one time published a plugin called IRV (Image Resource Viewer) that allowed users to maintain a library of the resources with descriptions and categories but due to some serious bugs in the LotRO Lua implementation it was of limited use. I have updated and maintained my own copy for my own purposes but I haven't spent much time identifying the window components and graphics for the newer windows since I don't use them for much outside AltInventory. That said, if you post a screenshot of the specific window you are trying to mimic, I might be able to give you some of the resource IDs.

    IRV is available at: http://www.lotrointerface.com/downlo...rceViewer.html

    Note, at some point I will probably release an update with better library support, it has just been a really low priority for so long that it is so low on the ToDo list that I don't even think about it unless I'm using it to identify new maps or generate the new list of compass tiles for TerrainMap for each game update.

    Edit: There is another plugin for viewing the in-game assets, AssetBrowser, but I don't believe it has any library functionality at all:
    http://www.lotrointerface.com/downlo...etBrowser.html

    Note, the Lua environment tends to cache images so if the user changes skins with the plugin already loaded, they will probably need to reload the plugin in order for it to show the changes from the new skin. It can also be a bit daunting figuring out which images are used for specific windows as some of the graphics are reused for multiple windows and others have unique instances for each window (but that is true for skins as well).
    Last edited by Garan; Nov 13 2015 at 06:51 PM.

  3. #3
    Join Date
    Jun 2011
    Posts
    18
    Hi Garan, thank you very much!

    This (http://suedviertel.com/images/TreeView.PNG) would be the treeview I'm trying to mimic.

    In Update10_UISkinArtPack.zip I found box_treelist_header_darkblue.t ga (http://suedviertel.com/images/box_tr...r_darkblue.tga), this could be the blue background for the treeView nodes. It's size is 9 x 16. It could be 1091634598 in the Miscellaneous type section of your IRV plugin.

    Now I've got ne stupid question: What do I do with this ID? :-)

  4. #4
    Join Date
    Mar 2007
    Posts
    1,590
    Quote Originally Posted by BangoGerstfeld View Post
    Hi Garan, thank you very much!

    This (http://suedviertel.com/images/TreeView.PNG) would be the treeview I'm trying to mimic.

    In Update10_UISkinArtPack.zip I found box_treelist_header_darkblue.t ga (http://suedviertel.com/images/box_tr...r_darkblue.tga), this could be the blue background for the treeView nodes. It's size is 9 x 16. It could be 1091634598 in the Miscellaneous type section of your IRV plugin.

    Now I've got ne stupid question: What do I do with this ID? :-)
    Basically, you would pass the image ID to SetBackground for any node that you want to have that background. So, if you were creating the "Offence" node in the image you referenced, you would use something like:
    offenceNode = Turbine.UI.TreeNode()
    offenceNode:SetBackground( 1091634598 )

    SetBackground is an overloaded function. If you pass it a string, it tries to load an image from the path pointed to by the string. If you pass it a number, it tries to use the current skin resource with the matching ID.

  5. #5
    Join Date
    Jun 2011
    Posts
    18
    Ah, awesome, thank you very much!

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

This form's session has expired. You need to reload the page.

Reload