Help with Devloping a "One Bag Addon"
I've been trying to make a "One Bag Addon" for years that is lightweight and not too complicated to make, but my knowledge isn't the biggest, and i don't really know how get started for this.
So if anyone can help me out how to get started on this i will be very thankful! |
I'd start with a list of everything you want the addon to do. Then figure out what events you want the addon to respond to in order to fulfill those needs, and work forward from that. When building the UI, you might want to consider design aspects like how many rows or columns do you want buttons to show up in and anything else you want shown. Planning out these things before you start coding is a major step to the development of an addon.
|
Not particularly helpful, but just a suggestion for a single feature that I think is important. If you have an option to hide empty bag slots (you should), it would be a good idea to always show a single empty slot. That will be handful when you want to split stacks. A text indicanting how many empty slots are left is enough.
Arkinventory, the best bag addon I know, doesn't have this feature despite having around 30k lines of code which is kinda of funny. |
Take a look at Backpack, while by default it's categorized, you can disable all the categories and you'll get a all-in-one solution (it also has that empty slot feature that Banknorris mentioned).
It's also designed as a framework, allowing you to create your own layout (and distribute it), in some way it could be considered a successor to cargBags. |
I know exactly how i want it to be, I want it to have 12 buttons per row and the maxium of coloums.
I already have my "layout/skin" figure. How it currently looks like (Nothing super fancy just simple) I want emtpy slots to always be shown. (But can probly work on some feature to hide it later, not so important right now just wanna get this "one bag feature" first) P3lim: I have checked it out, but i just want to build something myself. And it would take a lot of work to rebuild yours into my UI :) |
You've been trying for years and don't know how to get started?
You can start by looking at https://github.com/tekkub/wow-ui-sou...ainerFrame.lua or another inventory addons, but they could be more complicated And still, i would just reskin Bagnon, and it's probably quite lightweight without BagBrother |
Quote:
Bagnon is just too big and too many features, libs, etc. But thanks anyway. |
https://github.com/tekkub/wow-ui-sou...ainerFrame.xml
https://github.com/tekkub/wow-ui-sou...ainerFrame.lua As d87 pointed out, these ARE exactly where you should start STUDYING. This is how Blizzard themselves make the bags. ALL the functions in the lua will be needed to simply maintain the existing features. The .xml will also be needed unless you plan to convert it all manually into .lua code. |
Quote:
Anyway here is something i scrapped up.. Doesn't work really how i want it to be, i just want it be parented to ContainerFrame1 (Backpack). I want the "one bag" to act without having to use all the togglebags etc etc. :) Lua Code:
|
One major thing to keep in mind is some functions like UseContainerItem() are protected functions. Blizzard can use them freely, but we have jump through hoops to implement the same functionality.
|
All times are GMT -6. The time now is 12:44 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI