DICE PACKS BUNDLE
  1. #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 -->
    Is it the way I placed the subwindow? I've been futzing with this for a while and I just can't see it (almost 3am) so going to sleep on it... but hoping someone has a clue on where the error could be.
    ---
    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.

  2. #2
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    Code:
    <anchored to="columnanchor">
    	<top anchor="bottom" relation="relative" offset="2" />
    	<left offset="15" />
    	<right offset="-10" />
    </anchored>
    All of the offsets are related to the control this is anchored on - so the columnanchor control as this is specified in the <anchored> tag. So, I'm guessing you're not seeing anything as the left and right offset are related to this control, not the left/right position of the header (I'm guessing you'd use the header?)

    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>
    Only the top is anchored on columnanchor the rest is anchored on the windowinstance where the control resides - as there is no control name in the <anchored> tag.
    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!

  3. #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>
    Versus what works:
    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.

  4. #4
    Trenloe's Avatar
    Join Date
    May 2011
    Location
    Colorado, USA
    Posts
    33,408
    Quote Originally Posted by celestian View Post
    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>
    Versus what works:
    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>
    Yep, that’s what I was trying to say!

    Glad you got it sorted. :-)
    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!

  5. #5
    Quote Originally Posted by Trenloe View Post
    Code:
    <anchored height="20">
    	<top parent="columnanchor" anchor="bottom" relation="relative" offset="15" />
    	<left offset="15" />
    	<right offset="-10" />
    </anchored>
    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.

  6. #6

    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

Posting Permissions

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

Log in

Log in