Hornet
September 30th, 2014, 00:21
I am trying to make skills in the 4E ruleset be in sub-groups of a parent skill (at least in presentation in the skill page windowlist) So in record_char_skills.xml, I have C+P the label control that is the name of the skill, and renamed it label1 and increased the left offset to indent it from the rest of the skills. Then in the char_skilllist.lua file I give the skill name to the label1 control (same as label has) and then set label to invisible, and make labal1 disabled... It works, but the newly visible label1 field is both underlined, and the window (windowlist object) is set to custom and I can't figure out how to set it back... Tried match.setCustom(false);
Here's the change I made to record_char_skills.xml
<stringu name="label">
<anchored height="20">
<top offset="2" />
<left offset="25" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-5" />
</anchored>
<tabtarget next="misc" />
</stringu>
<stringu name="label1">
<anchored height="20">
<top offset="2" />
<left offset="40" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-5" />
</anchored>
<tabtarget next="misc" />
</stringu>
and here's the change I made to char_skilllist.lua
-- Update properties
local bCustom = false;
for _, match in pairs(matches) do
match.setCustom(bCustom);
if not bCustom then
if t.stat then
match.statname.setStringValue(t.stat);
else
match.statname.setStringValue("");
end
if t.sort then
match.spec.setValue(t.sort);
match.label1.setValue(k);
match.label1.setVisible(true);
match.label1.setEnabled(false);
match.label.setVisible(false);
match.setCustom(false);
else
match.spec.setValue(k);
end
else
match.statname.setReadOnly(true);
end
bCustom = true;
end
What am I missing about setting the windowlist window back to not custom, or if there isn't an easy way to do that, is there a better way to indent the label field in record_char_skills.xml or finally am I barking up the wrong tree and there's a better way to catch this particular squirrel?
TIA
Here's the change I made to record_char_skills.xml
<stringu name="label">
<anchored height="20">
<top offset="2" />
<left offset="25" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-5" />
</anchored>
<tabtarget next="misc" />
</stringu>
<stringu name="label1">
<anchored height="20">
<top offset="2" />
<left offset="40" />
<right parent="rightanchor" anchor="left" relation="relative" offset="-5" />
</anchored>
<tabtarget next="misc" />
</stringu>
and here's the change I made to char_skilllist.lua
-- Update properties
local bCustom = false;
for _, match in pairs(matches) do
match.setCustom(bCustom);
if not bCustom then
if t.stat then
match.statname.setStringValue(t.stat);
else
match.statname.setStringValue("");
end
if t.sort then
match.spec.setValue(t.sort);
match.label1.setValue(k);
match.label1.setVisible(true);
match.label1.setEnabled(false);
match.label.setVisible(false);
match.setCustom(false);
else
match.spec.setValue(k);
end
else
match.statname.setReadOnly(true);
end
bCustom = true;
end
What am I missing about setting the windowlist window back to not custom, or if there isn't an easy way to do that, is there a better way to indent the label field in record_char_skills.xml or finally am I barking up the wrong tree and there's a better way to catch this particular squirrel?
TIA