Setting up fields for drag and drop
I have my item window set up the way I want (except for hiding certain fields based on "Type" selected with the cycler while window is unlocked). I was looking through the CoreRPG ruleset record_char_inventory.xml, template_char.xml, template_common.xml and ItemManager(manager_item.lua) in order to figure out how to set up my Attack window to accept drag and drop and grab the correct data to populate it.
My Attack frame will already accept drag/drop but right now it displays name and reference link.
record_char_more.xml
Code:
<string_labeled name="weaponlabels" >
<anchored to="weaponframe" position="insidetopleft" offset="15,20" width="590" />
<labelres>char_label_weaponlabels</labelres>
</string_labeled>
<list_text name="testthis">
<anchored to="weaponframe">
<left offset="15" />
<top offset="45" />
<right offset="-20" />
<bottom offset="-5" />
</anchored>
<newfocus>name</newfocus>
<datasource>.testlist</datasource>
<class>char_test</class>
<acceptdrop>
<class>referencetext</class>
<class>referencetextwide</class>
<field>*</field>
</acceptdrop>
</list_text>
I would also like to attach MoreCore's sCMD "crom" as a dice roller after dragging it into the frame (based on the "Damage [CD]" field of the item), but I'll tackle that after I get this working.
Any advice on the most efficient way to achieve this? Thanks for any input.
https://i.imgur.com/ohvOiqB.jpg