Thread: Combat Tracker and visibility
-
May 27th, 2018, 08:42 #1
Combat Tracker and visibility
I've written a block into the combat tab that shows on both the npc/pc sheets and the CT for npcs. The problem is it doesn't show up the same as on the npc record. Here you can see the Aarakocra in the CT and then a npc record (from the shortcut in the CT). You'll note the combat section is empty in the CT but not in the NPC record. I can add and remove those line entries (for notes on special combat information) and the CT expands and shrinks as needed but doesn't show the lines nor the shortcut buttons.
They use the same xml/code for both other than placement. I've since created a copy on the mini_combat and called in mini_combat_ct to play around with something....
I think it might be something to do with the window placement in the CT and it's actually just really narrow or something and I can't see it?
This is the XML for the subwindow and title.
Code:<!-- combat mini bar --> <label_charframetop name="minicombattitle"> <anchored height="20"> <top parent="columnanchor" anchor="bottom" relation="relative" offset="15" /> <left offset="15" /> <right offset="-10" /> </anchored> <icons>char_abilities</icons> <static textres="char_label_combat" /> </label_charframetop> <button_iedit name="abilitynotes_iedit"> <anchored to="minicombattitle" position="insidetopright" offset="5,0" /> <script> function onValueChanged() local bEditMode = (getValue() == 1); window.abilitynotes_iadd.setVisible(bEditMode); window.mini_combat_window.subwindow.abilitynotes.update(); end </script> </button_iedit> <button_iadd_abilitynotes name="abilitynotes_iadd"> <anchored to="abilitynotes_iedit" position="insidetopleft" offset="-25,0" /> <target>abilitynotes</target> </button_iadd_abilitynotes> <subwindow name="mini_combat_window"> <anchored to="columnanchor"> <top anchor="bottom" relation="relative" offset="2" /> <left offset="15" /> <right offset="-10" /> </anchored> <class>combat_mini_section_ct</class> <activate /> <fastinit /> </subwindow> <!-- combat mini end -->
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
May 27th, 2018, 19:29 #2Code:
<anchored to="columnanchor"> <top anchor="bottom" relation="relative" offset="2" /> <left offset="15" /> <right offset="-10" /> </anchored>
You may want to use the parent="minicombattitle" in some of the positional anchors - more info in the "Definition" section here: https://www.fantasygrounds.com/refdoc/windowcontrol.xcp
Or you may just want to change the whole anchoring to use minicombattitle rather than columnanchor
Compare the difference for the anchoring for minicombattitle:
Code:<anchored height="20"> <top parent="columnanchor" anchor="bottom" relation="relative" offset="15" /> <left offset="15" /> <right offset="-10" /> </anchored>
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!
-
May 27th, 2018, 20:00 #3
This turned out to be... as always for me, xml/alignment issues.
Doesn't work:
Code:<subwindow name="mini_combat_window"> <anchored to="columnanchor"> <top anchor="bottom" relation="relative" offset="2" /> <left offset="15" /> <right offset="-10" /> </anchored> <class>combat_mini_section_ct</class> <activate /> <fastinit /> </subwindow>
Code:<subwindow name="mini_combat_window"> <anchored> <top parent="columnanchor" anchor="bottom" relation="relative" offset="12" /> <left offset="10" /> <right offset="-5" /> </anchored> <class>combat_mini_section_ct</class> <activate /> <fastinit /> </subwindow>
---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
May 27th, 2018, 20:06 #4Private 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!
-
May 27th, 2018, 20:10 #5
Hah, you just posted this as I was posting the update. I got up this morning and reviewed all the anchoring/etc and saw I had set a "to=". I manually forced the width to 400 and sure enough things showed up and then I realized the same thing you indicated here.
Thanks for helping me out---
Fantasy Grounds AD&D Reference Bundle, AD&D Adventure Bundle 1, AD&D Adventure Bundle 2
Documentation for AD&D 2E ruleset.
Custom Maps (I2, S4, T1-4, Barrowmaze,Lost City of Barakus)
Note: Please do not message me directly on this site, post in the forums or ping me in FG's discord.
-
August 1st, 2018, 13:00 #6
Archangel
- Join Date
- Apr 2008
- Location
- Virginia Beach
- Posts
- 3,096
Man, this discussion was super helpful to me also on a problem currently kicking my butt. I did not realize that where you identify the parent made a difference. Now that I reread this, I realize it really could only work this way if you want a maximally flexible layout language.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks