Reply
Thread Tools Display Modes
Unread 07-19-12, 12:49 AM   #1
champ0
A Defias Bandit
Join Date: Jul 2012
Posts: 3
Bag Addon Help

Hi, I came up with an idea for a different kind of bag addon and want to try to create it myself. Basically it will display the items in your bags as a list instead of an icon grid. I am new to lua programming, but have a decent amount of experience with c/c++/objective c.

I have been looking through other bag addons and the only one which I could decipher was bBag. In this addon the blizzard item frames are reused and displayed in a single grid instead of in individual bags. I tried to make new frames for the items in my addon, but was unable to use items by clicking on them (I was trying to use the method UseContainerItem, which is protected.) Do any current bag addons create there own item frames? And if they do, how do I give these frames the same functionality as the blizzard item frames?

Sorry if this question isn't clear or the terminology is wrong, I am new to this so I might not be able to articulate the problem well.
champ0 is offline   Reply With Quote
Unread 07-19-12, 03:22 AM   #2
kaels
A Cyclonian
AddOn Author - Click to view addons
Join Date: Jan 2011
Posts: 45
Yes, you need to use secure templates to make your frames and secure attributes to control their functionality.
kaels is offline   Reply With Quote
Unread 07-19-12, 04:08 AM   #3
Freebaser
A Molten Kobold Bandit
 
Freebaser's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2008
Posts: 125
You might want to look at Baud Manifest
Freebaser is offline   Reply With Quote
Unread 07-19-12, 08:31 AM   #4
jaliborc
A Chromatic Dragonspawn
 
jaliborc's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2007
Posts: 189
That has been done several times already, I believe.
__________________
Developer of Bagnon, OmniCC, PetTracker and many others
jaliborc is offline   Reply With Quote
Unread 07-19-12, 10:12 AM   #5
champ0
A Defias Bandit
Join Date: Jul 2012
Posts: 3
Baud Manifest is very close to what I want to do, thanks for pointing out the addon. I have been unable to find any other addons that deal with bags in this way though. Also searching through the code for Baud Manifest, there is no use of secure templates, so following that path may not be the way to go about creating this addon (but it is very useful info, thanks for pointing me to it). I am reading the Baud Manifest code now and trying to figure out how it works. Thanks for the help so far guys!
champ0 is offline   Reply With Quote
Unread 07-19-12, 12:50 PM   #6
champ0
A Defias Bandit
Join Date: Jul 2012
Posts: 3
From what I can tell in Baud Manifest for each item that is displayed a new button is created that inherits from ContainerFrameItemTemplate. Then the id of this button is set to the slot of the bag the item is in, and the parent's id is set to the bag id for the bag the item is in. This new button is registered for clicks. From what I can tell it seems that now when you click on the new button it will behave as if you clicked on the item in your inventory in the bag and slot that have been specified in the button and button's parent's ids. Is this correct?

Edit: The above solution worked.

Last edited by champ0 : 07-19-12 at 04:21 PM.
champ0 is offline   Reply With Quote
Reply

Go BackWoWInterface » Developer Discussions » General Authoring Discussion » Bag Addon Help

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off