-
February 8th, 2016, 15:27 #1
- Join Date
- Oct 2014
- Location
- NYC, NY
- Posts
- 96
Adding Tab/Category Icons via Extension?
I've read through both of these threads:
https://www.fantasygrounds.com/forum...light=tab+icon
https://www.fantasygrounds.com/forum...light=tab+icon
And I can get it to work if I just edit the existing ruleset, but I'd rather have these new tab colors/icons as part of an extension.
I already have the extension made up (it's just some graphical changes), but I can't seem to figure out how to add the XML for the icons. I believe it should be (shortened for readability):
Code:<icon name="tab_base15" file="graphics/tabs/tab_base15.png" /> <icon name="tab_base16" file="graphics/tabs/tab_base16.png" /> <icon name="tab_base15s" file="graphics/tabs/tab_base15s.png" /> <icon name="tab_base16s" file="graphics/tabs/tab_base16s.png" /> <icon name="tab_icon19" file="graphics/tabs/tab_icon19.png" /> <icon name="tab_icon20" file="graphics/tabs/tab_icon20.png" />
I have the images in the right folder, and named correctly, but I am sure the code I am adding isn't correct...I just don't know HOW it's incorrect, LOL.
Thank you all, as usual.
-
February 8th, 2016, 16:29 #2
There's a number of things you'll need to do:
- Make sure the extension itself uses the graphics_misc.xml file in the extension via an <includefile> entry in your extension.xml. This will register the base <icon> references, but won't do anything with them unless they're actually used within the ruleset.
- gameelements.xml in the CoreRPG ruleset has a <categoryselectionsettings> settings that lists the base and icon graphics for the tabs. you'll need to copy <categoryselectionsettings> into your extension.xml file and add your new definitions from step #1 above to this section.
Last edited by Trenloe; February 8th, 2016 at 16:55.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 8th, 2016, 16:49 #3
- Join Date
- Oct 2014
- Location
- NYC, NY
- Posts
- 96
I do have the graphics_misc.xml included via <includefile> (I should have mentioned that in my oroginal post).
I have gotten the icons to show successfully by just editing the CoreRPG ruleset, but if I change the gameelements.xml there, won't that interfere/be removed with ruleset updates?
That's why I was hoping to make these changes via an extension.
-
February 8th, 2016, 16:54 #4
Sorry, I didn't specifically mention that you should copy the <categoryselectionsettings> into your extension.xml and make your changes there.
Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 8th, 2016, 17:25 #5
- Join Date
- Oct 2014
- Location
- NYC, NY
- Posts
- 96
Okay, I get what you're saying now. I should have understood that from what you said, but I am still pretty new!
I added this to my extension.xml (copied from the ruleset's gameelements.xml). I added it after the <properties> closing tag that includes the rulesets the extension applies to, mostly because I wasn't sure where to add it.
Shortened for readability:
Code:<categoryselectionsettings> <iconposition normal="6,6" selected="6,4" /> <baseicon normal="tab_base1" selected="tab_base1s" /> <baseicon normal="tab_base2" selected="tab_base2s" /> <decalicon name="tab_icon1" /> <decalicon name="tab_icon2" /> </categoryselectionsettings>
-
February 8th, 2016, 17:33 #6
Any changes to XML/includefiles/etc. need to be initiated within a <base> section (after <properties>) within extension.xml. Info on extensions here: https://www.fantasygrounds.com/modguide/extensions.xcp
If that doesn't work, then post your extension.xml file here (use the CODE formatting available through the "Go Advanced" button below.Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 8th, 2016, 17:40 #7
- Join Date
- Oct 2014
- Location
- NYC, NY
- Posts
- 96
Adding the <categoryselectionsettings> under the <base> section worked perfectly.
Thank you so much. I am constantly impressed by how helpful people are on these forums (you personally have helped me on multiple occasions).
-
February 8th, 2016, 17:43 #8Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
-
February 8th, 2016, 23:53 #9
@Trenloe - any ideas how to remove (some of) them instead of replacing them?
https://www.fantasygrounds.com/forum...oup-Icons-Tabs
-
February 9th, 2016, 00:01 #10Private Messages: My inbox is forever filling up with PMs. Please don't send me PMs unless they are actually private/personal messages. General FG questions should be asked in the forums - don't be afraid, the FG community don't bite and you're giving everyone the chance to respond and learn!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks