mcortez
November 3rd, 2018, 23:32
I'm having a bit of a problem with relative control anchoring, I thought I understood how to use it - and in one quick test it worked fine. But now I'm having problems and I'm not sure where I'm going wrong -- or if the fact that I'm doing some layering/overriding of a window class from MoreCore, from an extension is causing problems.
So here's what I'm trying to do, and it works well enough with absolute positioning:
25199
And that's using this code:
<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.3" release="1">
<announcement text="Parameterized Rolls v.1 for MoreCore" font="emotefont" icon="rulesetlogo_CoreRPG" />
<properties>
<name>Parameterized Rolls</name>
<version>1</version>
<author>MCortez</author>
<description>Adds the ability to have a separate fields to provide parameters to rolls</description>
<ruleset><name>MoreCore</name></ruleset>
</properties>
<base>
<windowclass name="cli_rolls" merge="merge">
<sheetdata>
<simplestring name="name">
<anchored position="insidetopleft" offset="0,0" height="18">
<right parent="rightanchor" anchor="left" relation="relative" offset="-81" />
</anchored>
</simplestring>
<number_standard name="param1">
<anchored to="name" position="right" width="9" offset="4,0" />
<default>0</default>
</number_standard>
<number_standard name="param2">
<anchored to="name" position="right" width="9" offset="24,0" />
<default>0</default>
</number_standard>
<number_standard name="param3">
<anchored to="name" position="right" width="9" offset="44,0" />
<default>0</default>
</number_standard>
<button_rolls_type name="rollstype">
<anchored to="name" position="right" width="18" offset="60,0" />
</button_rolls_type>
</sheetdata>
</windowclass>
</base>
</root>
But when I try to switch to using relative positioning, this is what I end up with:
25200
And here's the the bits that I changed, which is basically just adding the relation parameter, and adjusting the offset parameter to be my desired spacing between controls:
<number_standard name="param1">
<anchored to="name" position="right" width="9" offset="4,0" relation="relative" />
<default>0</default>
</number_standard>
<number_standard name="param2">
<anchored to="name" position="right" width="9" offset="4,0" relation="relative" />
<default>0</default>
</number_standard>
<number_standard name="param3">
<anchored to="name" position="right" width="9" offset="4,0" relation="relative" />
<default>0</default>
</number_standard>
<button_rolls_type name="rollstype">
<anchored to="name" position="right" width="18" offset="4,0" relation="relative" />
</button_rolls_type>
Have I been staring into my monitor too long, and I'm missing something simple?
Any suggestions would be greatly appreciated!
So here's what I'm trying to do, and it works well enough with absolute positioning:
25199
And that's using this code:
<?xml version="1.0" encoding="iso-8859-1"?>
<root version="3.3" release="1">
<announcement text="Parameterized Rolls v.1 for MoreCore" font="emotefont" icon="rulesetlogo_CoreRPG" />
<properties>
<name>Parameterized Rolls</name>
<version>1</version>
<author>MCortez</author>
<description>Adds the ability to have a separate fields to provide parameters to rolls</description>
<ruleset><name>MoreCore</name></ruleset>
</properties>
<base>
<windowclass name="cli_rolls" merge="merge">
<sheetdata>
<simplestring name="name">
<anchored position="insidetopleft" offset="0,0" height="18">
<right parent="rightanchor" anchor="left" relation="relative" offset="-81" />
</anchored>
</simplestring>
<number_standard name="param1">
<anchored to="name" position="right" width="9" offset="4,0" />
<default>0</default>
</number_standard>
<number_standard name="param2">
<anchored to="name" position="right" width="9" offset="24,0" />
<default>0</default>
</number_standard>
<number_standard name="param3">
<anchored to="name" position="right" width="9" offset="44,0" />
<default>0</default>
</number_standard>
<button_rolls_type name="rollstype">
<anchored to="name" position="right" width="18" offset="60,0" />
</button_rolls_type>
</sheetdata>
</windowclass>
</base>
</root>
But when I try to switch to using relative positioning, this is what I end up with:
25200
And here's the the bits that I changed, which is basically just adding the relation parameter, and adjusting the offset parameter to be my desired spacing between controls:
<number_standard name="param1">
<anchored to="name" position="right" width="9" offset="4,0" relation="relative" />
<default>0</default>
</number_standard>
<number_standard name="param2">
<anchored to="name" position="right" width="9" offset="4,0" relation="relative" />
<default>0</default>
</number_standard>
<number_standard name="param3">
<anchored to="name" position="right" width="9" offset="4,0" relation="relative" />
<default>0</default>
</number_standard>
<button_rolls_type name="rollstype">
<anchored to="name" position="right" width="18" offset="4,0" relation="relative" />
</button_rolls_type>
Have I been staring into my monitor too long, and I'm missing something simple?
Any suggestions would be greatly appreciated!