PDA

View Full Version : Ignoring width...problem



GrimmSpector
March 9th, 2016, 19:22
Getting console messages and display issues, because width on some stringcontrol objects is being ignored...anyone know why? It's for "walk_label" and "sprint_label", need to widen them to hold the text....full xml follows, I've removed most of the lua scripting as it's not pertinent.



<?xml version="1.0" encoding="iso-8859-1"?>

<!--
Please see the license.html file included with this distribution for
attribution and copyright information.
-->

<root>
<include source="charsheet_listclasses.xml" />
<windowclass name="charsheet_main">
<margins control="0,0,0,2" />
<sheetdata>
<frame_char name="attributesframe">
<bounds>15,0,250,223</bounds>
</frame_char>
<stringcontrol name="score_label">
<anchored to="attributesframe" position="insidetopleft" offset="98,8" width="35" />
<font>sheetlabelinline</font>
<static>Score</static>
<center />
</stringcontrol>
<stringcontrol name="link_label">
<anchored to="score_label" position="right" offset="10,0" width="35" />
<font>sheetlabelinline</font>
<static>Link</static>
<center />
</stringcontrol>
<stringcontrol name="xp_label">
<anchored to="link_label" position="right" offset="18,0" width="15" />
<font>sheetlabelinline</font>
<static>XP</static>
<center />
</stringcontrol>
<windowlist name="attributes">
<anchored>
<to>attributesframe</to>
<position>over</position>
<offset>-15,-20</offset>
</anchored>
<class>charsheet_attribute</class>
<datasource>.attributes</datasource>
<noscroll />
<skipempty />
</windowlist>
<frame_char name="combatdataframe">
<anchored to="attributesframe" position="belowleft" offset="0,0" width="485" height="265" />
</frame_char>
<stringcontrol name="conditionmonitor_label">
<anchored to="combatdataframe" position="insidetopleft" offset="20,10" />
<font>sheetlabel</font>
<static>Condition Monitor</static>
</stringcontrol>
<stringcontrol name="standarddamage_label">
<anchored to="combatdataframe" position="insidetopleft" offset="10,25" height="12" width="90" />
<font>sheetlabelinline</font>
<static>Standard Damage</static>
</stringcontrol>
<stringcontrol name="standarddamage_row1">
<anchored to="combatdataframe" position="insidetopleft" offset="10,37" height="12" width="5" />
<static></static>
</stringcontrol>
<stringcontrol name="standarddamage_row2">
<anchored to="combatdataframe" position="insidetopleft" offset="10,49" height="12" width="5" />
<static></static>
</stringcontrol>
<simplenumber name="standard_current">
<anchored to="standarddamage_label" position="right" offset="30,0" />
<font>sheetlabelmini</font>
</simplenumber>
<stringcontrol name="standardSeparator">
<anchored to="standard_current" position="right" width="5" offset="5,0" />
<static></static>
</stringcontrol>
<simplenumber name="standard">
<anchored to="standardSeparator" position="right" offset="5,0" />
<readonly />
<font>sheetlabelmini</font>
</simplenumber>
<stringcontrol name="fatiguedamage_label">
<anchored to="combatdataframe" position="insidetopleft" offset="180,25" height="12" width="90" />
<font>sheetlabelinline</font>
<static>Fatigue Damage</static>
</stringcontrol>
<stringcontrol name="fatiguedamage_row1">
<anchored to="combatdataframe" position="insidetopleft" offset="180,37" height="12" width="5" />
<static></static>
</stringcontrol>
<stringcontrol name="fatiguedamage_row2">
<anchored to="combatdataframe" position="insidetopleft" offset="180,49" height="12" width="5" />
<static></static>
</stringcontrol>
<simplenumber name="fatigue_current">
<anchored to="fatiguedamage_label" position="right" offset="30,0" />
<font>sheetlabelmini</font>
<script>
function onValueChanged()
window.fatigue.updatePips();
end
</script>
</simplenumber>
<stringcontrol name="fatigueSeparator">
<anchored to="fatigue_current" position="right" width="5" offset="5,0" />
<static></static>
<script>
function onInit()
damageSeparator = addTextWidget("sheetlabelmini", "/");
end
</script>
</stringcontrol>
<simplenumber name="fatigue">
<anchored to="fatigueSeparator" position="right" offset="5,0" />
<readonly />
<font>sheetlabelmini</font>
</simplenumber>
<stringcontrol name="movement_label">
<anchored to="combatdataframe" position="insidetopright" offset="70,10" width="60" />
<font>sheetlabel</font>
<static>Movement</static>
</stringcontrol>
<stringcontrol name="walk_label">
<anchored to="movement_label" position="below" offset="-18,0" />
<font>sheetlabelinline</font>
<static>Walk</static>
</stringcontrol>
<numbercontrol name="walk">
<anchored to="walk_label" position="below" offset="0,0" width="35" />
<font>sheetnumber</font>
<readonly />
</numbercontrol>
<stringcontrol name="run_label">
<anchored>
<top parent="movement_label" relation="absolute" anchor="bottom" offset="0" />
<right parent="combatdataframe" relation="absolute" offset="-10" />
</anchored>
<font>sheetlabelinline</font>
<static>Run/Evade</static>
</stringcontrol>
<simplenumber name="runevade">
<anchored to="run_label" position="below" offset="0,0" />
<font>sheetnumber</font>
<readonly />
</simplenumber>
<stringcontrol name="sprint_label">
<anchored to="walk" position="below" offset="0,5" />
<font>sheetlabelinline</font>
<static>Sprint</static>
</stringcontrol>

<frame_char name="traitsframe">
<bounds>260,0,240,223</bounds>
</frame_char>
<stringcontrol name="traistlist_label">
<anchored to="traitsframe" position="insidetopleft" offset="110,10" width="35" height="15" />
<font>sheetlabel</font>
<static>Traits</static>
</stringcontrol>
<windowlist name="traits_list">
<anchored>
<to>traitsframe</to>
<position>over</position>
<offset>-15,-20</offset>
</anchored>
<class>charsheet_traits</class>
<datasource>.traits</datasource>
<allowdelete />
<skipempty />
<acceptdrop>
<class>referencetext</class>
<class>referencetextwide</class>
<field>*</field>
</acceptdrop>
<empty>
<text>Drop Character Traits Here</text>
<font>reference-section</font>
</empty>
</windowlist>

</sheetdata>
</windowclass>

</root>

Moon Wizard
March 10th, 2016, 06:22
What are the exact messages you are getting with this XML? (Just use the Copy To Clipboard menu item in the console window, or copy from the console.log file.)

From a quick glance, the walk_label and spint_label have left/right/top anchors from using "below" position, but not height. So, these shouldn't be throwing errors.

JPG

GrimmSpector
March 10th, 2016, 15:20
I get several dozen of this identical error:

Ruleset Warning: window: Anchored static width ignored for control (walk_label) in windowclass (charsheet_main)

If I set width on multiple controls, any of the controls called "walk", "sprint", "run", etc. all the stringcontrol and simplenumbers in that little block, I get this error for all of them.

Around this time I started noticing that problem with not being able to click on controls I previously could, but I can't find any control overlapping or inteferring, even that overly complicated windowlist setup I have now I can't click on any controls but the first two rows; I doubt they're related however.

Moon Wizard
March 10th, 2016, 21:28
Yes, you will get the error because you are using position="below" which sets the left, top and right anchors. Since the left and right anchors are set, then any width value will be ignored and thus the warning message. I'm guessing that you might want to use position="belowleft" if you want to be able to set a width directly.

Regards,
JPG

GrimmSpector
March 10th, 2016, 22:12
Ah! So that just sets below and left anchors, ok, thank you!