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.
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.