Mercurial > wow > reaction
comparison VehicleExitButton.lua @ 279:5b9c0164a491
Fixed a number of problems with drag corners in config mode
- Fixed button resizing via dragging not updating until a reload
- Fixed pet/stance/vehicle buttons not always displaying in config mode
- Fixed error spam when making too many pet/bag buttons
| author | Flick |
|---|---|
| date | Wed, 11 May 2011 16:19:17 -0700 |
| parents | 4e325f1ea6e1 |
| children | e337b39dc491 |
comparison
equal
deleted
inserted
replaced
| 277:4e325f1ea6e1 | 279:5b9c0164a491 |
|---|---|
| 92 | 92 |
| 93 function VExitButton:UpdateRegistration(bar) | 93 function VExitButton:UpdateRegistration(bar) |
| 94 -- auto show/hide when on a vehicle | 94 -- auto show/hide when on a vehicle |
| 95 local config = bar:GetConfig() | 95 local config = bar:GetConfig() |
| 96 local f = bar:GetFrame() | 96 local f = bar:GetFrame() |
| 97 if config.withControls then | 97 if config.withControls or ReAction:GetConfigMode() then |
| 98 if bar.vehicleExitStateRegistered then | 98 if bar.vehicleExitStateRegistered then |
| 99 UnregisterStateDriver(f, "unitexists") | 99 UnregisterStateDriver(f, "unitexists") |
| 100 bar.vehicleExitStateRegistered = false | 100 bar.vehicleExitStateRegistered = false |
| 101 end | 101 end |
| 102 bar:RegisterUnitWatch("vehicle",true) | 102 bar:RegisterUnitWatch("vehicle",not ReAction:GetConfigMode()) |
| 103 else | 103 else |
| 104 bar:RegisterUnitWatch("vehicle",false) | 104 bar:RegisterUnitWatch("vehicle",false) |
| 105 if not bar.vehicleExitStateRegistered then | 105 if not bar.vehicleExitStateRegistered then |
| 106 f:SetAttribute("unit","vehicle") | 106 f:SetAttribute("unit","vehicle") |
| 107 RegisterStateDriver(f, "unitexists", "[target=vehicle,exists,novehicleui] show; hide") -- spoof onstate-unitexists | 107 RegisterStateDriver(f, "unitexists", "[target=vehicle,exists,novehicleui] show; hide") -- spoof onstate-unitexists |
