PDA

View Full Version : frame_char Tag



LordEntrails
June 14th, 2017, 21:00
What does the frame_char tag/class do? I can't find it in the developer guides.

For instance, in the campaign\record_char.xml of the CoreRPG ruleset there is the following (line 50);

<frame_char name="overviewframe">
<bounds>15,20,-140,45</bounds>
</frame_char>

I can tell this is setting a size, but Find in Files gave me no external references to overviewframe.

There is a string label below this that anchors to this frame_char, but could not that string be anchored to the top left corner or otherwise positioned without the frame_char?

<string_labeled name="name">
<anchored to="overviewframe" position="insidetopleft" offset="15,10" height="20">
<right offset="-15" />
</anchored>
<labelres>char_label_name</labelres>
</string_labeled>

Trenloe
June 14th, 2017, 21:15
<frame_char name="overviewframe">

frame_char is the control or template name. Do find in files for "frame_char" - include the quotes to find the base template, not instances of when the template is used.

name="overviewframe" is the name within the ruleset for that specific instance of frame_char. This is what you'd use if you wanted to refer to that specific control within code.

For more information on templates, see the template "checkbox" example here: https://www.fantasygrounds.com/modguide/templates.xcp

Moon Wizard
June 14th, 2017, 21:17
frame_char is a template defined in campaign/template_char.xml. It's just defined a genericcontrol with a groupbox frame.

While the "name" field could be anchored to any position within the window, it's anchored within the frame_char to allow a group of controls to be moved more easily based on window styling. (i.e. if you change the frame dimensions, then the fields will attempt to automatically adjust.)

Regards,
JPG

LordEntrails
June 14th, 2017, 22:23
Excellent, thank you both. I'm learning :)

So <template> allows you to create custom tags (i.e. in this case <frame_char>) so that you can re-use the control/tag multiple places.