Bumamgar
October 24th, 2005, 06:03
I'm trying to modify the charactersheet so that there is a link box next to each spell that will bring up the spelldesc entry for that spell when clicked.
I've modified the frame, added in the XML, etc. but the link always just brings up an empty spelldesc window.
Here's the relevant code I've added:
charsheet.xml
<windowclass name="charsheet_spellentry">
<frame name="charsheet_spellentry_new" />
<datasource name="spell" />
<defaultsize width="516" height="25" />
<sheetdata>
<windowopencontrol name="open">
<icon normal="button_openwindow" pressed="button_emptytarget" />
<bounds rect="3,5,24,24" />
<class name="spelldesc" />
<description field="name" />
</windowopencontrol>
<stringcontrol name="name">
<bounds rect="27,5,159,20" />
</stringcontrol>
<stringcontrol name="shortdescription">
<bounds rect="269,5,244,20" />
</stringcontrol>
<numbercontrol name="level">
<bounds rect="188,1,34,23" />
<noreset />
</numbercontrol>
<numbercontrol name="prepared">
<bounds rect="229,1,34,23" />
<hideonvalue value="0" />
</numbercontrol>
</sheetdata>
</windowclass>
Here's a screenshot example:
https://www.cyberdeck.org/fantasygrounds/spelldesc.jpg
What it seems to me is that it's trying to find a spelldesc node under the spell section of the charsheet entry in the db.xml for the campaign.
What I'd like it to be is a link to the appropriate spell node under the spelldesc portion of the ruleset.
How would I go about doing that?
I find it odd that the <acceptdrop> entry in the "charsheet_spells" windowclass (with a datasource of "charsheet") doesn't seem to suffer from this problem.
Or am I misunderstanding the meaning of the <description> tag in the <windowopencontrol> ? I am taking it to mean: "Find the node in "class" where the field "name" equals the same as the field "name" in this sheet"
Actually, that doesn't quite seem right now that I think about it.
Anyway, I'm all confused, so any pointers on how to do what I'm trying to do would be great!
Thank you.
I've modified the frame, added in the XML, etc. but the link always just brings up an empty spelldesc window.
Here's the relevant code I've added:
charsheet.xml
<windowclass name="charsheet_spellentry">
<frame name="charsheet_spellentry_new" />
<datasource name="spell" />
<defaultsize width="516" height="25" />
<sheetdata>
<windowopencontrol name="open">
<icon normal="button_openwindow" pressed="button_emptytarget" />
<bounds rect="3,5,24,24" />
<class name="spelldesc" />
<description field="name" />
</windowopencontrol>
<stringcontrol name="name">
<bounds rect="27,5,159,20" />
</stringcontrol>
<stringcontrol name="shortdescription">
<bounds rect="269,5,244,20" />
</stringcontrol>
<numbercontrol name="level">
<bounds rect="188,1,34,23" />
<noreset />
</numbercontrol>
<numbercontrol name="prepared">
<bounds rect="229,1,34,23" />
<hideonvalue value="0" />
</numbercontrol>
</sheetdata>
</windowclass>
Here's a screenshot example:
https://www.cyberdeck.org/fantasygrounds/spelldesc.jpg
What it seems to me is that it's trying to find a spelldesc node under the spell section of the charsheet entry in the db.xml for the campaign.
What I'd like it to be is a link to the appropriate spell node under the spelldesc portion of the ruleset.
How would I go about doing that?
I find it odd that the <acceptdrop> entry in the "charsheet_spells" windowclass (with a datasource of "charsheet") doesn't seem to suffer from this problem.
Or am I misunderstanding the meaning of the <description> tag in the <windowopencontrol> ? I am taking it to mean: "Find the node in "class" where the field "name" equals the same as the field "name" in this sheet"
Actually, that doesn't quite seem right now that I think about it.
Anyway, I'm all confused, so any pointers on how to do what I'm trying to do would be great!
Thank you.