PDA

View Full Version : Help linking frame to bottom of window



dllewell
December 26th, 2024, 04:49
Original Code: CoreRPG ruleset. record_char.xml
Note: I am testing this with the PFRGP ruleset but that ruleset doesn't change the CoreRPG ruleset code for record_char.xml

I am trying to fix an extension that was previously working but is no longer working.

I am trying to link a new frame to the bottom of the charsheet_overview window.

This is what that looks like without any extensions.

https://www.fantasygrounds.com/forums/attachment.php?attachmentid=63075&d=1735186796


Working Using Frame Link
I can accomplish what I need by linking to the overviewframe in the CoreRPG ruleset code (See below).
But I don't want to link to the overviewframe as other extensions already link to that and if i do it that way my frame is then superimposed on the other extensions frame.

Code
<frame_char name="shortcutframe">
<anchored height="70" width="480">
<top parent="overviewframe" anchor="bottom" offset="0,3" />
<left parent="leftanchor" anchor="left" />
</anchored>
</frame_char>

Result
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=63076&d=1735187087

Not Working Using Window Link
Instead, I want to link to the bottom of the window (charsheet_overview). That way if some other extension adds something after the overviewframe is doesn't conflict with what I am doing.

The logic for this would seem to be.

<frame_char name="shortcutframe">
<anchored position="insidebottom" height="65" width="480">
<right />
</anchored>
</frame_char>

But using that code the shortcutframe doesn't show up on the form at all.


If I use the code below. The shortcutframe shows up but is placed on top of the overviewframe.
I can offset it but again that then leaves the same issue of the shortcutframe being static which would conflict with any other extensions that write to this window. I want the shortcurframe to be dynamic to the bottom of the window.

I have tried every option for the position parameter but none of them work.

Code
<frame_char name="shortcutframe">
<anchored position="insidetop" height="35" width="480">
<right />
</anchored>
</frame_char>

Note: height was specifically set to 35 to show that the shortcutframe in on top of the overviewframe.

Result
https://www.fantasygrounds.com/forums/attachment.php?attachmentid=63079&d=1735187905

I have two questions.

1st Question
Can anyone tell me how to accomplish what I want.
The new shortcutframe should be dynamically linked to the bottom of the charsheet_overview window.

2nd Question
Is there somewhere I can find more details on how to use the anchored tag?

I have reviewed the Developers Guide for this item - https://fantasygroundsunity.atlassian.net/wiki/spaces/FGCP/pages/996644833/windowcontrol. It gives a full definition of the object, its parameters, and the options for those parameters, but it does not give any indication of how the values for the parameters actually affect things.

I have tried to find other extensions that do what I am trying to do. The only extension I found that does anything with the charsheet_overview window is the Advanced Charsheet and it rewrites that whole section rather than appending to the end of the existing window.

If someone knows of an extension that does this I would be happy to look through that code to find the answer.

superteddy57
December 26th, 2024, 05:33
The frame you are pointing to is the subwindow overview. You will see that the character sheet copies the windowclass "charsheet_base". This is located in CoreRPG as a 'template' windowclass. If you create a new sub_content_top control and direct it to your windowclass, it should place it directly under the overview. You may need to also include an insertbefore flag within the merge="join" of the charsheet windowclass.

superteddy57
December 26th, 2024, 05:34
I'd also be happy to show you a demo on discord if you reach out to me there.

dllewell
December 28th, 2024, 05:05
Thank you Dominic. I tried a couple of other things based on your suggestion without any luck :) I just don't have enough knowledge (yet) to figure out what a sub_content_top control was.

I will happily take you up on your offer for a demo on Discord.

How do I get a hold of you on Discord? Directly?, if so can you send me your info. Or are you on a specific Discord channel that I can join?

superteddy57
December 28th, 2024, 05:24
You can visit our main discord. I'm usually hanging out with our community manager assisting answering technical questions.

https://discord.gg/xgwcY4eD