PDA

View Full Version : Name the label_frametop in campaign/record_char_inventory.xml?



peterb
June 16th, 2023, 06:35
Would it be possible to set a name to the label_frametop in campaign/record_char_inventory.xml?

Without a name it's not possible to override the label using merge. This is the current setup:

<root>
<windowclass name="charsheet_inventory" merge="join">
<sheetdata>
<label_frametop>
<anchored to="encumbranceframe" offset="0,55" />
<static>Armor</static>
</label_frametop>
</sheetdata>
</windowclass>
</root>

It would be good if it could be changed to something like this:

<root>
<windowclass name="charsheet_inventory" merge="join">
<sheetdata>
<label_frametop name="encumbrance_frame_label">
<anchored to="encumbranceframe" offset="0,55" />
<static>Armor</static>
</label_frametop>
</sheetdata>
</windowclass>
</root>

Then I can do like this in an extension:

<windowclass name="charsheet_inventory" merge="join">
<script file="campaign/scripts/encumberance_penalty.lua" />
<sheetdata>
<label_frametop name="encumbrance_frame_label" merge="delete">
<anchored to="encumbranceframe" offset="0,55" />
<static>Armor</static>
</label_frametop>
<label_frametop name="encumbrance_frame_label_new">
<anchored to="encumbranceframe" />
<static>Encumberance</static>
</label_frametop>
...

TIA.

Moon Wizard
June 16th, 2023, 17:22
I have no idea why that control is even there (i.e. label with no matching data); so I'm removing that particular override from the ruleset in the next update.

Regards,
JPG

peterb
June 16th, 2023, 23:07
OK. Thanks.