Mercurial > wow > worldplan
comparison FlightMap.lua @ 52:6439015d74b1
- Set and use callbacks for the BountyBoard and ActionButton elements.
- Check BountyBoard selections when updating pin visual
- Check SpellCanTargetQuest() when determining pin visibility states
| author | Nenue |
|---|---|
| date | Fri, 30 Dec 2016 18:31:32 -0500 |
| parents | dbd81d49af02 |
| children | 44baf4f35c7c |
comparison
equal
deleted
inserted
replaced
| 51:8f6960d50026 | 52:6439015d74b1 |
|---|---|
| 95 if pin then | 95 if pin then |
| 96 | 96 |
| 97 print(pin:GetID(), pin.used, pin.filtered) | 97 print(pin:GetID(), pin.used, pin.filtered) |
| 98 | 98 |
| 99 if pin.used then | 99 if pin.used then |
| 100 print(i, pin.x, pin.y, pin.used, pin.isNew, pin.isStale, pin:IsShown(), pin:GetAlpha()) | |
| 101 pinsToRemove[info.questId] = nil; | 100 pinsToRemove[info.questId] = nil; |
| 102 | 101 |
| 103 local frame = self.activePins[info.questId] | 102 local frame = self.activePins[info.questId] |
| 104 if not frame then | 103 if not frame then |
| 105 frame = self:GetMap():AcquirePin("WorldPlanFlightPin") | 104 frame = self:GetMap():AcquirePin("WorldPlanFlightPin") |
| 112 self.activePins[info.questId] = frame | 111 self.activePins[info.questId] = frame |
| 113 end | 112 end |
| 114 frame:SetPosition(info.x, info.y) | 113 frame:SetPosition(info.x, info.y) |
| 115 frame.pin = pin | 114 frame.pin = pin |
| 116 | 115 |
| 117 pin.owningFrame = frame:GetMap() | 116 -- sticking it onto the MapCanvas pin |
| 118 pin.throttle = 1 | 117 pin.throttle = 1 |
| 119 pin.isStale = true | 118 pin.isStale = true |
| 120 | |
| 121 pin:SetParent(frame) | 119 pin:SetParent(frame) |
| 122 pin:ClearAllPoints() | 120 pin:ClearAllPoints() |
| 123 pin:SetPoint('CENTER', frame, 'CENTER') | 121 pin:SetPoint('CENTER') |
| 122 pin.Overlay:SetParent(frame) | |
| 123 pin.Overlay:ClearAllPoints() | |
| 124 pin.Overlay:SetPoint('TOPLEFT', pin, 'TOPLEFT', 0, 4) | |
| 125 pin.Overlay:SetPoint('BOTTOMRIGHT', pin, 'BOTTOMRIGHT', 0, -4) | |
| 126 pin.Overlay:SetShown(true) | |
| 127 --print(pin.Overlay:IsShown(), pin.Overlay:GetPoint(1)) | |
| 124 end | 128 end |
| 125 pin:SetShown(pin.used) | 129 pin:SetShown(pin.used) |
| 126 end | 130 end |
| 127 | 131 |
| 128 end | 132 end |
| 159 | 163 |
| 160 function WorldPlanDataPinMixin:OnShow() | 164 function WorldPlanDataPinMixin:OnShow() |
| 161 end | 165 end |
| 162 | 166 |
| 163 function WorldPlanDataPinMixin:OnMouseEnter () | 167 function WorldPlanDataPinMixin:OnMouseEnter () |
| 168 | |
| 169 WorldMap_HijackTooltip(self:GetMap()) | |
| 164 end | 170 end |
| 165 | 171 |
| 166 function WorldPlanDataPinMixin:OnMouseLeave () | 172 function WorldPlanDataPinMixin:OnMouseLeave () |
| 167 end | 173 end |
| 168 | 174 |
