PDA

View Full Version : Anchor oddness, aligned in FGC, not in FGU



celestian
October 31st, 2019, 05:01
While browsing through things to see whats what I noticed this oddness with anchoring in FGU.

https://i.imgur.com/5EnIwhq.png

Here is the window for this section.


<!-- psionic combat stats for power window -->
<windowclass name="psionic_power_stats">
<margins control="0,4,0,2" />
<script>
function onInit()
local node = getDatabaseNode();
DB.addHandler(DB.getPath(node, "combat.psp.base"), "onUpdate", onModeChanged);
ManagerPsionics.updatePsionicStats(node);
onModeChanged();
end
function onClose()
local node = getDatabaseNode();
DB.removeHandler(DB.getPath(node, "combat.psp.base"), "onUpdate", onModeChanged);
end
function onModeChanged()
local nodeChar = getDatabaseNode();
local bShowPsionics = true;
local nBasePSP = DB.getValue(nodeChar,"combat.psp.base",0);
if string.match(nodeChar.getPath(),"^item")
or string.match(nodeChar.getPath(),"^class")
or nBasePSP == 0 then
bShowPsionics = false;
end
parentcontrol.setVisible(bShowPsionics);
end
</script>
<sheetdata>
<anchor_column name="columnanchor" />

<label_charframetop name="slotstitle">
<anchored height="20">
<top parent="columnanchor" anchor="bottom" relation="relative" offset="15" />
<left offset="15" />
<right offset="-10" />
</anchored>
<icons>char_psion</icons>
<static textres="power_label_psionic_stats" />
</label_charframetop>

<label name="psionic_powers_label">
<anchored width="80">
<top parent="columnanchor" anchor="bottom" relation="current" offset="17" />
<left offset="40" />
</anchored>
<static textres="power_label_psionic" />
</label>

<!-- level -->
<basicnumber name="psionic" source="psionic.totalLevel">
<anchored to="psionic_powers_label" position="lefthigh" offset="10,0" width="20" height="20" />
<tooltip textres="power_label_psionic_level" />
</basicnumber>

<number_basic name="mac_score" source="combat.mac.score">
<anchored to="psionic_powers_label" position="right" offset="10,0" />
<readonly />
</number_basic>
<label_fieldtop name="label_mac_score">
<anchored to="mac_score" />
<static textres="power_label_psionic_mac" />
</label_fieldtop>

<number_basic name="psp_score" source="combat.psp.score">
<anchored to="mac_score" position="right" offset="10,0" />
<readonly />
</number_basic>
<label_fieldtop name="label_psp_score">
<anchored to="psp_score" />
<static textres="power_label_psionic_psp" />
</label_fieldtop>

<number_basic name="psp_expended" source="combat.psp.expended">
<anchored to="psp_score" position="right" offset="10,0" />
<tooltip textres="power_label_psionic_psp_used_tooltip" />
</number_basic>
<label_fieldtop name="label_psp_expended">
<anchored to="psp_expended" />
<static textres="power_label_psionic_psp_used" />
<tooltip textres="power_label_psionic_psp_used_tooltip" />
</label_fieldtop>

<number_basic name="psp_temporary" source="combat.psp.temporary">
<anchored to="psp_expended" position="right" offset="10,0" />
<tooltip textres="power_label_psionic_psp_temp_tooltip" />
</number_basic>
<label_fieldtop name="label_psp_temporary">
<anchored to="psp_temporary" />
<static textres="power_label_psionic_psp_temp" />
<tooltip textres="power_label_psionic_psp_temp_tooltip" />
</label_fieldtop>

<number_basic name="mthaco_score" source="combat.mthaco.score">
<anchored to="psp_temporary" position="right" offset="10,0" />
<readonly />
</number_basic>
<label_fieldtop name="label_mthaco_score">
<anchored to="mthaco_score" />
<static textres="power_label_psionic_mthaco" />
</label_fieldtop>


<button_combat_psionic_details>
<anchored to="mthaco_score" position="righthigh" offset="5,0" />
</button_combat_psionic_details>

</sheetdata>
</windowclass>

Moon Wizard
November 2nd, 2019, 10:05
Filed as FGU-634.

Regards,
JPG