SecureHandlers and 'equipmentset'
Holla everyone
I'm working on my action bar addon an would like to support equipment sets from the Blizz equipment manager. I've found the following code in SecureHandlers.lua: Lua Code:
Doesn't that mean that a frame that inherits SecureActionButtonTemplate will support the type 'equipmentset'? Unfortunatly something like Lua Code:
Does someone know if "equipmentset" actually is a valid value for "type"? |
Based on that code and the API documentation for PickupEquipmentSet, it looks like you need to use the set index, not the set name, and I'd expect this to work:
Code:
frame:SetAttribute("type", "equipmentset") Code:
local function GetEquipmentSetIDByName(name) |
Thank you white cat.
I've tried this: Lua Code:
The first button does work (at least on my mage *g*). The second button still does not. :/ I've created a set named "test". GetEquipmentSetIDByName("test") does return '1', so I'm sure that this is the right index. I've still no idea what's wrong with it or if "equipmentset" is even a valid type. Any other ideas? |
That code from SecureHandlers.lua is for handling dragging. The code to handle clicking/using a button is in SecureTemplates.lua, specifically the possible options for "type" are the entries in the SECURE_ACTIONS table. Based on that you will probably want:
Code:
button:SetAttribute("type", "macro") |
Oh. Ok. I'll use a macro. :/ Thank you.
But why the hell do they implement draging for a type that is not handled? |
Those were possible returns from GetCursorInfo that it was checking.
|
I'm again digging into this. Now with flyout buttons. :)
I've finally managed to set up a flyout button without using the type "action". Lua Code:
Right now I'm picking up the button via the flyout id and the PickupSpellBookItem. Lua Code:
But, well ... this is unsecure. Is there really no way to support dragging flyout buttons from the button frame without using "action" and an action id? |
I have no idea, but I wouldn't be surprised if there wasn't. If you want to make real custom action buttons outside of the action scope (in API terms), it's suddenly a whole other deal. There's lots of events and function for "actions" only.
|
All times are GMT -6. The time now is 01:58 PM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI