PDA

View Full Version : Changing a 4E Skill windowlist window to not custom



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

Hornet
September 30th, 2014, 03:36
Ok, nevermind all of the above. I got the altered list elements to go back to not custom... unfortunately I still can't get the underline to go away.

So now the question is just how do I get rid of the underline in a stringu control?

Hornet
September 30th, 2014, 03:47
NM... .setLine(false);

all is well... nothing to see here. :)

Trenloe
September 30th, 2014, 03:49
So now the question is just how do I get rid of the underline in a stringu control?
The u in stringu stands for underline. Try changing the stringu template to simplestring - the control is similar, but removes the underline and adds a drop type of string - I don't know if the drop type will be an issue for you.

Hornet
September 30th, 2014, 04:12
Thanks! I was wondering about that. There isn't a template for it (though it is used to build the string_ps template) in the 4E ruleset, and the dev wiki doesn't have any info on it.

Trenloe
September 30th, 2014, 04:28
Thanks! I was wondering about that. There isn't a template for it (though it is used to build the string_ps template) in the 4E ruleset, and the dev wiki doesn't have any info on it.
The 4E ruleset is layered on top of the CoreRPG ruleset and uses a lot of templates from there. stringu and simplestring are both in the common\template_common.xml file in the CoreRPG ruleset. It takes a little bit of getting used to - having to do a "find in files" in both the 4E and CoreRPG ruleset to find templates and windowclass entries.

Hornet
September 30th, 2014, 04:41
Ahhh! I knew that! lol... Thanks for the rap on the head. ;) /em looks sheepish.