PDA

View Full Version : Combat tracker subsections positioning and ordering



cscase
November 17th, 2013, 04:13
I've been monkeying around with my combat tracker and somehow have gotten things broken so that when I turn on the Combat section and the Effects section at the same time, they overlap. The Effects section sits right on top of the Combat section, lined up at the top. The Spacing section (the one with squares and reach) I've removed entirely, and I'm not sure if my having done so is relevant to this issue.

I've looked back at the original code and I can't understand how these sections are being made to push one another down so as to peacefully co-exist. Do any of you understand how that bit works? Can you perhaps point me toward what I should be looking at to fix this? Thanks!!

Scott

Edit: I got this to work, for the most part, by changing the top parent for the effects frame and icon. But originally, the top parent for all of the frames was the actor name field and everything got along, so it feels like I am missing something about how this is supposed to work and I wonder if fixing it this way is kludgey. Any info still appreciated.

Trenloe
November 18th, 2013, 03:04
All of the sections are anchored to "name" as you mention above. The key here is that the <top> anchor has a <relation> of relative. The ruleset modification guide gives some info on this https://www.fantasygrounds.com/modguide/windowing.xcp (search for relative):


A value of "relative" will cause the control to be anchored at the location of the last "relative" control that anchored to the parent control. The next successive "relative" control will receive an adjusted location based on the current control.
Basically, there are a bunch of controls that cascade their anchored position from the "name" control based off using the "relative" relation.

From the 3.5e ruleset (current 2.9.4), the "top" anchor of the effects section of the combat tracker on the host (ct_host.xml) is defined as:

<top>
<parent>name</parent>
<anchor>bottom</anchor>
<relation>relative</relation>
<offset>8</offset>
</top>
This means that the top is anchored to the "name" control, with the "relative" relation meaning that it is anchored to the last control to have used the same "relative" anchor to "name".

cscase
November 18th, 2013, 04:59
Ah! Thanks as ever for your help, Trenloe! This clears up a lot. Thank you!

Scott