Mercurial > wow > reaction
comparison classes/BagButton.lua @ 218:e63aefb8a555
Demodularization of buttons
- register class instead of config
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Fri, 19 Nov 2010 23:06:24 -0800 |
parents | df68b5a40490 |
children | bb13624de7e1 |
comparison
equal
deleted
inserted
replaced
217:9c0691e91488 | 218:e63aefb8a555 |
---|---|
13 local GetInventorySlotInfo = GetInventorySlotInfo | 13 local GetInventorySlotInfo = GetInventorySlotInfo |
14 local PickupBagFromSlot = PickupBagFromSlot | 14 local PickupBagFromSlot = PickupBagFromSlot |
15 local CursorCanGoInSlot = CursorCanGoInSlot | 15 local CursorCanGoInSlot = CursorCanGoInSlot |
16 | 16 |
17 -- class declarations | 17 -- class declarations |
18 local buttonTypeID = "Bag" | |
18 local Super = ReAction.Button | 19 local Super = ReAction.Button |
19 local BagBase = setmetatable( { }, { __index = Super } ) | 20 local BagBase = setmetatable( |
21 { | |
22 defaultBarConfig = { | |
23 type = buttonTypeID, | |
24 btnWidth = 30, | |
25 btnHeight = 30, | |
26 btnRows = 1, | |
27 btnColumns = 6, | |
28 spacing = 4 | |
29 }, | |
30 | |
31 barType = L["Bag Bar"], | |
32 }, | |
33 { __index = Super } ) | |
34 | |
20 local Bag = setmetatable( { }, { __index = BagBase } ) | 35 local Bag = setmetatable( { }, { __index = BagBase } ) |
21 local Backpack = setmetatable( { }, { __index = BagBase } ) | 36 local Backpack = setmetatable( { }, { __index = BagBase } ) |
22 local Keyring = setmetatable( { }, { __index = BagBase } ) | 37 local Keyring = setmetatable( { }, { __index = BagBase } ) |
23 | 38 |
24 ReAction.Button.Bag = BagBase | 39 ReAction.Button.Bag = BagBase |