OneCore-1.0

API / OneCore-1.0

OneCore-1.0 provides common code used by the onebag suite


BagHelpers:IsAmmoBag()

Returns whether the bag is an ammo bag


BagHelpers:IsProfessionBag()

Returns whether the bag is a profression/trade bag


BagHelpers:IsSoulBag()

Returns whether the bag is a soul bag


OneCore:BuildFrame()

This function is responsible for creating all the children of the frame, this makes lazy creation possible


OneCore:ColorManySlotBorders(bagid, color)

A helper function that colors a whole bags slots borders

Parameters

bagid
the numeric id of the bag
color
the color to use when highlighting, optional


OneCore:ColorSlotBorder(slot, fcolor)

This will color the border of a single slot

Parameters

slot
this is the slot frame to color
fcolor
this is the color table to use, is optional, defaults to {r = .05, g = .05, b = .05}


OneCore:CreateBagFrame(parent, id)

Simple function to build a OneBag style bag object.

Parameters

parent
the parent frame for the bag
id
the bag's numeric id


OneCore:CreateSlotFrame(parent, id)

Simple function to build a OneBag style slot object

Parameters

parent
the parent frame for the slot, should be a OneBag bag object
id
the slots's numeric id


OneCore:GetContainerNumSlots(bagId)

Replacement for GetContainerNumSlots

Parameters

bagId


OneCore:GetSlot(bag, slot)

Helper function that returns a single slot

Parameters

bag
the bag's numeric id
slot
the slot's numeric id


OneCore:GetSlotOrder()

This function returns the order of slots


OneCore:HighlightBagSlots(bagid)

Used to highlight a bag's slots on mouseover

Parameters

bagid
the numeric id of the bag


OneCore:InitializePluginSystem()

Sets up the plugin types


OneCore:OrganizeFrame(force)

Organizes the frame to reflect the current available slots and options.

Parameters

force
this will cause the frame to reorganize even if the slots haven't changed.


OneCore:UnhighlightBagSlots(bagid)

Used to unhighlight a bag's slots on mouseover

Parameters

bagid
the numeric id of the bag


OneCore:UpdateBag(bag)

This function will update a single bag and it's contents

Parameters

bag
the numeric id of the bag


OneCore:UpdateFrame()

This updates all bags and their contents


OneCore:UpdateItemLock(event, bagid, slotid)

Updates a slot's locked status.

Parameters

event
the event fired
bagid
the numeric id of the bag
slotid
the numeric id of the slot


SlotHelpers:ShouldShow()

Determines if the given slot should show be shown.


setup_embed_and_upgrade(lib, store, mixins)

This will setup the embed function on the library as well as upgrade any old embeds will also upgrade the store

Parameters

lib
the library being setup
store
a table used to keep track of what was previously embedded, this is for upgrading.
mixins
a table of what needs to be mixed in


You must login to post a comment. Don't have an account? Register to get one!