Mercurial > wow > buffalo2
comparison Veneer.lua @ 55:dd9b5f59632c v1.0a-release
Core
- updated comment notes
Objectives
- force hide blocks when their tracker is hidden
Clock
- convert clock into its own module
- display zone coordinates alongside time
| author | Nenue |
|---|---|
| date | Fri, 10 Jun 2016 20:52:27 -0400 |
| parents | ed74c5cabe98 |
| children | f253baf6022d |
comparison
equal
deleted
inserted
replaced
| 54:ed74c5cabe98 | 55:dd9b5f59632c |
|---|---|
| 505 if self.drag then | 505 if self.drag then |
| 506 self:RegisterForDrag('LeftButton') | 506 self:RegisterForDrag('LeftButton') |
| 507 self:SetScript('OnDragStart', prototypes.OnDragStart) | 507 self:SetScript('OnDragStart', prototypes.OnDragStart) |
| 508 if self.OnDragStop then | 508 if self.OnDragStop then |
| 509 self:SetScript('OnDragStop', function(self, ...) | 509 self:SetScript('OnDragStop', function(self, ...) |
| 510 print('|cFFFF0088end of dragging') | 510 print('|cFFFF0088end of dragging'). |
| 511 self:OnDragStop(self, ...) | 511 self:OnDragStop(self, ...) |
| 512 prototypes.OnDragStop(self, ...) | 512 prototypes.OnDragStop(self, ...) |
| 513 end) | 513 end) |
| 514 else | 514 else |
| 515 self:SetScript('OnDragStop', prototypes.OnDragStop) | 515 self:SetScript('OnDragStop', prototypes.OnDragStop) |
| 516 end | 516 end |
| 517 else | 517 else |
| 518 self:EnableMouse(false) | 518 self:EnableMouse(false) |
| 519 end | 519 end |
| 520 | 520 |
| 521 -- establish internal storage | |
| 521 if not V.Conf[name] then | 522 if not V.Conf[name] then |
| 522 V.Conf[name] = { | 523 V.Conf[name] = { |
| 523 enabled = self.enabled, | 524 enabled = self.enabled, |
| 524 } | 525 } |
| 525 end | 526 end |
| 526 local c = V.Conf[name] | 527 local c = V.Conf[name] |
| 527 | 528 |
| 529 -- establish position data; if undefined, round the API values | |
| 528 if not c.position then | 530 if not c.position then |
| 529 local anchor, _, point, x, y = self:GetPoint(1) | 531 local anchor, _, point, x, y = self:GetPoint(1) |
| 530 print('seeding default position', anchor, point, x, y) | 532 x = floor(x+.5) |
| 533 y = floor(y+.5) | |
| 534 print('obtained frame position', name, anchor, point, x, y) | |
| 531 c.position = {anchor, point, x, y} | 535 c.position = {anchor, point, x, y} |
| 532 else | 536 else |
| 533 | 537 print('restoring frame position', name, unpack(c.position)) |
| 534 print('restoring frame position', unpack(c.position)) | |
| 535 self:ClearAllPoints() | 538 self:ClearAllPoints() |
| 536 local anchorTo, relativePoint, x, y = unpack(c.position) | 539 local anchorTo, relativePoint, x, y = unpack(c.position) |
| 537 self:SetPoint(anchorTo, UIParent, relativePoint, x, y) | 540 self:SetPoint(anchorTo, UIParent, relativePoint, x, y) |
| 538 end | 541 end |
| 539 self:Enable(c.enabled) | 542 self:Enable(c.enabled) |
