madman
August 23rd, 2010, 18:27
I am changing the character sheet in an extension. Adding some tabs to the inventory page. I can get the tabs to work. but the information is not being put into the tab it is made in.
inventorylist is made for each tab and with the bounds offset some, i can tell the frame is being rendered. but the list for each tab does not get created for that tab. I am not sure where i need to make changes.
Any help with this would be great.
Thanks
Chris
<root version="2.0">
<includefile source="charsheet_invequip.xml" />
<includefile source="charsheet_invarmorandweapons.xml" />
<includefile source="charsheet_invmagic.xml" />
<includefile source="charsheet_invconsumables.xml" />
<windowclass name="charsheet_inventoryitem">
<sizelimits>
<minimum>
<height>10</height>
</minimum>
</sizelimits>
<sheetdata>
Took out some code here for post because of length
and know this part should not be the problem
</sheetdata>
</windowclass>
<windowclass name="charsheet_inventory">
<placement>
<size>
<width>252</width>
<height>611</height>
</size>
</placement>
<script>
local parent = nil;
function registerParent(win)
parent = win;
end
</script>
<nodelete />
<sheetdata>
<subwindow name="charsheet_invequip">
<bounds>0,0,-1,-1</bounds>
<class>charsheet_invequip</class>
<activate/>
</subwindow>
<subwindow name="charsheet_invarmorandweapons">
<bounds>0,0,-1,-1</bounds>
<class>charsheet_invarmorandweapons</class>
<activate/>
</subwindow>
<subwindow name="charsheet_invmagic">
<bounds>0,0,-1,-1</bounds>
<class>charsheet_invmagic</class>
<activate/>
</subwindow>
<subwindow name="charsheet_invconsumables">
<bounds>0,0,-1,-1</bounds>
<class>charsheet_invconsumables</class>
<activate/>
</subwindow>
<tabcontrol name="tabs">
<bounds>10,15,18,300</bounds>
<tab>
<icon>tab_equip</icon>
<subwindow>charsheet_invequip</subwindow>
</tab>
<tab>
<icon>tab_armorandweapons</icon>
<subwindow>charsheet_invarmorandweapons</subwindow>
</tab>
<tab>
<icon>tab_magic</icon>
<subwindow>charsheet_invmagic</subwindow>
</tab>
<tab>
<icon>tab_consumables</icon>
<subwindow>charsheet_invconsumables</subwindow>
</tab>
<activate>1</activate>
</tabcontrol>
<!-- Inventory -->
<genericcontrol name="inventoryframe">
<bounds>25,20,480,355</bounds>
<frame>
<name>sheetgroup</name>
</frame>
</genericcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetop</position>
<offset>0,11</offset>
</anchored>
<center />
<font>sheetlabel</font>
<static>Inventory</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>21,17</offset>
</anchored>
<font>sheetlabelsmall</font>
<static>#</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>38,17</offset>
</anchored>
<font>sheetlabelsmall</font>
<static>Name</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>303,17</offset>
</anchored>
<font>sheetlabelsmall</font>
<static>Location</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>368,17</offset>
</anchored>
<font>sheetlabelsmall</font>
<static>Weight</static>
</stringcontrol>
<genericcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>411,17</offset>
<size>
<width>10</width>
<height>10</height>
</size>
</anchored>
<icon>indicator_encumbrance</icon>
<tooltip>
<text>Apply weight to encumbrance</text>
</tooltip>
</genericcontrol>
<genericcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>430,17</offset>
<size>
<width>10</width>
<height>10</height>
</size>
</anchored>
<icon>indicator_quicklist</icon>
<tooltip>
<text>Show on mini sheet</text>
</tooltip>
</genericcontrol>
<windowlist name="inventorylist">
<anchored>
<to>inventoryframe</to>
<position>over</position>
<offset>-12,-9</offset>
<top>
<parent>inventoryframe</parent>
<offset>30</offset>
</top>
</anchored>
<datasource>.inventorylist</datasource>
<class>charsheet_inventoryitem</class>
<allowcreate />
<allowdelete />
<script file="scripts/charsheet_inventorylist.lua" />
</windowlist>
<scrollercontrol>
<anchored>
<to>inventorylist</to>
<position>insidebottomright</position>
<size>
<width>45</width>
<height>27</height>
</size>
</anchored>
<target>inventorylist</target>
<button>
<normal>button_scroller</normal>
<pressed>button_scroller_down</pressed>
</button>
</scrollercontrol>
Main Window
I am using d20_jpg 3.0.5/FG 2 2.6.5
inventorylist is made for each tab and with the bounds offset some, i can tell the frame is being rendered. but the list for each tab does not get created for that tab. I am not sure where i need to make changes.
Any help with this would be great.
Thanks
Chris
<root version="2.0">
<includefile source="charsheet_invequip.xml" />
<includefile source="charsheet_invarmorandweapons.xml" />
<includefile source="charsheet_invmagic.xml" />
<includefile source="charsheet_invconsumables.xml" />
<windowclass name="charsheet_inventoryitem">
<sizelimits>
<minimum>
<height>10</height>
</minimum>
</sizelimits>
<sheetdata>
Took out some code here for post because of length
and know this part should not be the problem
</sheetdata>
</windowclass>
<windowclass name="charsheet_inventory">
<placement>
<size>
<width>252</width>
<height>611</height>
</size>
</placement>
<script>
local parent = nil;
function registerParent(win)
parent = win;
end
</script>
<nodelete />
<sheetdata>
<subwindow name="charsheet_invequip">
<bounds>0,0,-1,-1</bounds>
<class>charsheet_invequip</class>
<activate/>
</subwindow>
<subwindow name="charsheet_invarmorandweapons">
<bounds>0,0,-1,-1</bounds>
<class>charsheet_invarmorandweapons</class>
<activate/>
</subwindow>
<subwindow name="charsheet_invmagic">
<bounds>0,0,-1,-1</bounds>
<class>charsheet_invmagic</class>
<activate/>
</subwindow>
<subwindow name="charsheet_invconsumables">
<bounds>0,0,-1,-1</bounds>
<class>charsheet_invconsumables</class>
<activate/>
</subwindow>
<tabcontrol name="tabs">
<bounds>10,15,18,300</bounds>
<tab>
<icon>tab_equip</icon>
<subwindow>charsheet_invequip</subwindow>
</tab>
<tab>
<icon>tab_armorandweapons</icon>
<subwindow>charsheet_invarmorandweapons</subwindow>
</tab>
<tab>
<icon>tab_magic</icon>
<subwindow>charsheet_invmagic</subwindow>
</tab>
<tab>
<icon>tab_consumables</icon>
<subwindow>charsheet_invconsumables</subwindow>
</tab>
<activate>1</activate>
</tabcontrol>
<!-- Inventory -->
<genericcontrol name="inventoryframe">
<bounds>25,20,480,355</bounds>
<frame>
<name>sheetgroup</name>
</frame>
</genericcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetop</position>
<offset>0,11</offset>
</anchored>
<center />
<font>sheetlabel</font>
<static>Inventory</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>21,17</offset>
</anchored>
<font>sheetlabelsmall</font>
<static>#</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>38,17</offset>
</anchored>
<font>sheetlabelsmall</font>
<static>Name</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>303,17</offset>
</anchored>
<font>sheetlabelsmall</font>
<static>Location</static>
</stringcontrol>
<stringcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>368,17</offset>
</anchored>
<font>sheetlabelsmall</font>
<static>Weight</static>
</stringcontrol>
<genericcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>411,17</offset>
<size>
<width>10</width>
<height>10</height>
</size>
</anchored>
<icon>indicator_encumbrance</icon>
<tooltip>
<text>Apply weight to encumbrance</text>
</tooltip>
</genericcontrol>
<genericcontrol>
<anchored>
<to>inventoryframe</to>
<position>insidetopleft</position>
<offset>430,17</offset>
<size>
<width>10</width>
<height>10</height>
</size>
</anchored>
<icon>indicator_quicklist</icon>
<tooltip>
<text>Show on mini sheet</text>
</tooltip>
</genericcontrol>
<windowlist name="inventorylist">
<anchored>
<to>inventoryframe</to>
<position>over</position>
<offset>-12,-9</offset>
<top>
<parent>inventoryframe</parent>
<offset>30</offset>
</top>
</anchored>
<datasource>.inventorylist</datasource>
<class>charsheet_inventoryitem</class>
<allowcreate />
<allowdelete />
<script file="scripts/charsheet_inventorylist.lua" />
</windowlist>
<scrollercontrol>
<anchored>
<to>inventorylist</to>
<position>insidebottomright</position>
<size>
<width>45</width>
<height>27</height>
</size>
</anchored>
<target>inventorylist</target>
<button>
<normal>button_scroller</normal>
<pressed>button_scroller_down</pressed>
</button>
</scrollercontrol>
Main Window
I am using d20_jpg 3.0.5/FG 2 2.6.5