Stitched
September 3rd, 2010, 21:33
Hi guys,
I'm trying to create user built list; add an entry, as needed, that contain a set of data on a line.
The below code is retro-fitted from the "special abilities" handler already found in the D20_JPG ruleset. So far, however, I have had no luck getting the "add entry" icon to appear.
<windowclass name="charsheet_attackitem">
<sizelimits>
<minimum>
<height>10</height>
</minimum>
</sizelimits>
<sheetdata>
<specialabilitynumber name="number">
<anchored>
<right>
<anchor>right</anchor>
</right>
<top>
<anchor>top</anchor>
</top>
<size>
<width>30</width>
<height>16</height>
</size>
</anchored>
<font>sheetnumbersmall</font>
<frame>
<name>modifier</name>
<offset>4,4,4,4</offset>
</frame>
</specialabilitynumber>
<specialabilitydice name="dice">
<anchored>
<right>
<parent>number</parent>
<anchor>left</anchor>
</right>
<top>
<anchor>top</anchor>
</top>
<size>
<width>35</width>
<height>15</height>
</size>
</anchored>
<frame>
<name>modifier</name>
<offset>4,4,4,5</offset>
</frame>
</specialabilitydice>
<textlistitemvalue name="value">
<anchored>
<left>
<anchor>left</anchor>
<offset>2</offset>
</left>
<right>
<parent>dice</parent>
<anchor>left</anchor>
<offset>-2</offset>
</right>
<top>
<anchor>top</anchor>
</top>
</anchored>
<script>
function onDrop(x, y, draginfo)
if draginfo.isType("number") then
window.number.enable(true);
window.number.setSourceValue(draginfo.getNumberDat a());
return true;
end
if draginfo.isType("dice") then
window.dice.enable(true);
window.dice.setSourceValue(draginfo.getDieList());
return true;
end
end
</script>
</textlistitemvalue>
</sheetdata>
</windowclass>
<genericcontrol name="attackframe">
<bounds>15,410,-25,100</bounds>
<frame>
<name>sheetgroup</name>
</frame>
</genericcontrol>
<stringcontrol name="attacklabel">
<anchored>
<to>attackframe</to>
<position>insidetop</position>
<offset>0,10</offset>
</anchored>
<font>sheetlabel</font>
<static>Attacks</static>
<center />
</stringcontrol>
<windowlist name="attacklist">
<anchored>
<to>attackframe</to>
<position>over</position>
<offset>-12,-9</offset>
<top>
<parent>attackframe</parent>
<offset>30</offset>
</top>
</anchored>
<datasource>.attacklist</datasource>
<class>charsheet_attackitem</class>
<allowcreate />
<allowdelete />
<script file="scripts/charsheet_abilities.lua" />
</windowlist>
I'm trying to create user built list; add an entry, as needed, that contain a set of data on a line.
The below code is retro-fitted from the "special abilities" handler already found in the D20_JPG ruleset. So far, however, I have had no luck getting the "add entry" icon to appear.
<windowclass name="charsheet_attackitem">
<sizelimits>
<minimum>
<height>10</height>
</minimum>
</sizelimits>
<sheetdata>
<specialabilitynumber name="number">
<anchored>
<right>
<anchor>right</anchor>
</right>
<top>
<anchor>top</anchor>
</top>
<size>
<width>30</width>
<height>16</height>
</size>
</anchored>
<font>sheetnumbersmall</font>
<frame>
<name>modifier</name>
<offset>4,4,4,4</offset>
</frame>
</specialabilitynumber>
<specialabilitydice name="dice">
<anchored>
<right>
<parent>number</parent>
<anchor>left</anchor>
</right>
<top>
<anchor>top</anchor>
</top>
<size>
<width>35</width>
<height>15</height>
</size>
</anchored>
<frame>
<name>modifier</name>
<offset>4,4,4,5</offset>
</frame>
</specialabilitydice>
<textlistitemvalue name="value">
<anchored>
<left>
<anchor>left</anchor>
<offset>2</offset>
</left>
<right>
<parent>dice</parent>
<anchor>left</anchor>
<offset>-2</offset>
</right>
<top>
<anchor>top</anchor>
</top>
</anchored>
<script>
function onDrop(x, y, draginfo)
if draginfo.isType("number") then
window.number.enable(true);
window.number.setSourceValue(draginfo.getNumberDat a());
return true;
end
if draginfo.isType("dice") then
window.dice.enable(true);
window.dice.setSourceValue(draginfo.getDieList());
return true;
end
end
</script>
</textlistitemvalue>
</sheetdata>
</windowclass>
<genericcontrol name="attackframe">
<bounds>15,410,-25,100</bounds>
<frame>
<name>sheetgroup</name>
</frame>
</genericcontrol>
<stringcontrol name="attacklabel">
<anchored>
<to>attackframe</to>
<position>insidetop</position>
<offset>0,10</offset>
</anchored>
<font>sheetlabel</font>
<static>Attacks</static>
<center />
</stringcontrol>
<windowlist name="attacklist">
<anchored>
<to>attackframe</to>
<position>over</position>
<offset>-12,-9</offset>
<top>
<parent>attackframe</parent>
<offset>30</offset>
</top>
</anchored>
<datasource>.attacklist</datasource>
<class>charsheet_attackitem</class>
<allowcreate />
<allowdelete />
<script file="scripts/charsheet_abilities.lua" />
</windowlist>