Mercurial > wow > reaction
comparison classes/GridProxy.lua @ 128:729232aeeb5e
Action Button rewrite. (note: pet actions are probably slightly broken right now, they haven't been updated yet)
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Thu, 05 Mar 2009 01:28:48 +0000 |
parents | a2d2f23137c8 |
children |
comparison
equal
deleted
inserted
replaced
127:29dacbecdb52 | 128:729232aeeb5e |
---|---|
2 -- A hack for a ShowGrid secure handler, using a bastardized Blizzard ActionBarButton. | 2 -- A hack for a ShowGrid secure handler, using a bastardized Blizzard ActionBarButton. |
3 -- | 3 -- |
4 local gridProxy = { } | 4 local gridProxy = { } |
5 ReAction.gridProxy = gridProxy | 5 ReAction.gridProxy = gridProxy |
6 | 6 |
7 local f = CreateFrame("CheckButton",nil,UIParent,"ActionBarButtonTemplate, SecureHandlerAttributeTemplate") | 7 local f = CreateFrame("CheckButton","ReActionShowGridProxy",UIParent,"ActionBarButtonTemplate, SecureHandlerAttributeTemplate") |
8 -- SecureHandlerAttributeTemplate overwrites the onAttributeChanged handler, as it's last in the list | 8 -- SecureHandlerAttributeTemplate overwrites the onAttributeChanged handler, as it's last in the list |
9 f:UnregisterAllEvents() | 9 f:UnregisterAllEvents() |
10 f:SetScript("OnEnter",nil) | 10 f:SetScript("OnEnter",nil) |
11 f:SetScript("OnLeave",nil) | 11 f:SetScript("OnLeave",nil) |
12 f:SetScript("PostClick",nil) | 12 f:SetScript("PostClick",nil) |
13 f:SetScript("OnDragStart",nil) | 13 f:SetScript("OnDragStart",nil) |
14 f:SetScript("OnReceiveDrag",nil) | 14 f:SetScript("OnReceiveDrag",nil) |
15 f:SetScript("OnUpdate",nil) | 15 f:SetScript("OnUpdate",nil) |
16 f:SetAttribute("showgrid",0) | |
17 f:SetAttribute("action",0) | |
18 f.action = 0 | |
16 f:EnableMouse(false) | 19 f:EnableMouse(false) |
17 for _, child in ipairs({f:GetChildren()}) do | 20 for _, child in ipairs({f:GetChildren()}) do |
18 child:Hide() | 21 child:Hide() |
19 end | 22 end |
20 for _, region in ipairs({f:GetRegions()}) do | 23 for _, region in ipairs({f:GetRegions()}) do |