Wir haben festgestellt, dass Euer Browser keine Cookies akzeptiert. Bitte erlaubt die Verwendung von Cookies in den Optionen Eures Browsers, um eine optimale Funktion dieser Webseite zu gewährleisten.
Ergebnis 1 bis 5 von 5
  1. #1
    Registriert seit
    01.06.2011
    Beiträge
    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
    Avatar von Garan
    Garan ist offline Defender of the Hornburg
    Registriert seit
    25.03.2007
    Beiträge
    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).
    Geändert von Garan (13.11.2015 um 18:51 Uhr)

  3. #3
    Registriert seit
    01.06.2011
    Beiträge
    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
    Avatar von Garan
    Garan ist offline Defender of the Hornburg
    Registriert seit
    25.03.2007
    Beiträge
    1.590
    Zitat Zitat von BangoGerstfeld Beitrag anzeigen
    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
    Registriert seit
    01.06.2011
    Beiträge
    18
    Ah, awesome, thank you very much!

 

 

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein
  •  

Diese Formular-Sitzung ist abgelaufen. Du musst die Seite neu laden.

Neu laden