Mercurial > wow > reaction
comparison VehicleExitButton.lua @ 305:0211bcdfab70 stable
Merge 1.1 beta 12 to stable
author | Flick |
---|---|
date | Wed, 14 Nov 2012 16:47:27 -0800 |
parents | e337b39dc491 |
children |
comparison
equal
deleted
inserted
replaced
294:30c9bdaad7a3 | 305:0211bcdfab70 |
---|---|
26 { __index = Super } ) | 26 { __index = Super } ) |
27 | 27 |
28 ReAction.Button.VehicleExit = VExitButton | 28 ReAction.Button.VehicleExit = VExitButton |
29 ReAction:RegisterBarType(VExitButton) | 29 ReAction:RegisterBarType(VExitButton) |
30 | 30 |
31 function VExitButton:New( config, bar, idx ) | 31 function VExitButton:New( config, bar, idx, idHint ) |
32 self = Super.New(self, config, bar, idx, "SecureFrameTemplate, ActionButtonTemplate", "Button") | 32 self = Super.New(self, config, bar, idx, "SecureFrameTemplate, ActionButtonTemplate", "Button") |
33 | 33 |
34 -- frame setup | 34 -- frame setup |
35 local f = self:GetFrame() | 35 local f = self:GetFrame() |
36 self.frames.icon:SetTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Up") | 36 self.frames.icon:SetTexture("Interface\\Vehicles\\UI-Vehicles-Button-Exit-Up") |
37 self.frames.icon:SetTexCoord(0.140625, 0.859375, 0.140625, 0.859375) | 37 self.frames.icon:SetTexCoord(0.140625, 0.859375, 0.140625, 0.859375) |
38 | |
39 self:SetActionIDPool("vehicle-exit",1) | |
40 self:AcquireActionID(nil, idHint, true) | |
38 | 41 |
39 -- attribute setup | 42 -- attribute setup |
40 -- (none) | 43 -- (none) |
41 | 44 |
42 -- non secure scripts | 45 -- non secure scripts |
62 self:UpdateRegistration(bar) | 65 self:UpdateRegistration(bar) |
63 end | 66 end |
64 | 67 |
65 function VExitButton:GetActionID() | 68 function VExitButton:GetActionID() |
66 return 1 | 69 return 1 |
67 end | |
68 | |
69 function VExitButton:AcquireActionID() | |
70 -- don't use pool | |
71 end | |
72 | |
73 function VExitButton:ReleaseActionID() | |
74 -- don't use pool | |
75 end | 70 end |
76 | 71 |
77 function VExitButton:Refresh() | 72 function VExitButton:Refresh() |
78 Super.Refresh(self) | 73 Super.Refresh(self) |
79 -- it seems that setscale kills the texcoord, have to refresh it | 74 -- it seems that setscale kills the texcoord, have to refresh it |