Mercurial > wow > buffalo2
comparison ObjectiveTracker/ObjectiveUI.lua @ 25:4b3da1b221de v1.0-beta
- distinction between all possible types of values for the 'isComplete' field
- style polish applied to title headers
- clickable regions altered to somewhat match those of the blizzard objectives tracker, for more world frame space and quicker user familiarity
| author | Nenue |
|---|---|
| date | Wed, 13 Apr 2016 11:20:09 -0400 |
| parents | e837384ac363 |
| children |
comparison
equal
deleted
inserted
replaced
| 24:66b927b46776 | 25:4b3da1b221de |
|---|---|
| 22 Default.Report = function(self) | 22 Default.Report = function(self) |
| 23 print('Stats:', self.numWatched,'items tracked,', self.numBlocks,'blocks assigned.') | 23 print('Stats:', self.numWatched,'items tracked,', self.numBlocks,'blocks assigned.') |
| 24 end | 24 end |
| 25 | 25 |
| 26 Default.OnMouseUp = function(self, button) | 26 Default.OnMouseUp = function(self, button) |
| 27 | |
| 27 print(self.handler.name, self.mainStyle, self.subStyle) | 28 print(self.handler.name, self.mainStyle, self.subStyle) |
| 28 if button == 'LeftButton' then | 29 if button == 'LeftButton' then |
| 29 if IsModifiedClick("CHATLINK") and ChatEdit_GetActiveWindow() then | 30 if IsModifiedClick("CHATLINK") and ChatEdit_GetActiveWindow() then |
| 30 self:Link() | 31 self:Link() |
| 31 elseif IsModifiedClick("QUESTWATCHTOGGLE") then | 32 elseif IsModifiedClick("QUESTWATCHTOGGLE") then |
| 42 mod:Update(self.handler.updateReasonModule) | 43 mod:Update(self.handler.updateReasonModule) |
| 43 print('|cFFFF8800'..tostring(self:GetName())..':MouseUp()|r') | 44 print('|cFFFF8800'..tostring(self:GetName())..':MouseUp()|r') |
| 44 end | 45 end |
| 45 | 46 |
| 46 Default.OnMouseDown = function(self, button) | 47 Default.OnMouseDown = function(self, button) |
| 48 | |
| 47 print(IsModifiedClick("CHATLINK"), IsModifiedClick("QUESTWATCHTOGGLE")) | 49 print(IsModifiedClick("CHATLINK"), IsModifiedClick("QUESTWATCHTOGGLE")) |
| 48 print(self.info.title) | 50 print(self.info.title) |
| 49 end | 51 end |
| 50 | 52 |
| 53 AutoQuest.Select = function(self) | |
| 51 | 54 |
| 52 AutoQuest.Select = function(self) | |
| 53 if self.info.popupType == 'OFFER' then | 55 if self.info.popupType == 'OFFER' then |
| 54 ShowQuestOffer(self.info.questIndex) | 56 ShowQuestOffer(self.info.questIndex) |
| 55 else | 57 else |
| 56 ShowQuestComplete(self.info.questIndex) | 58 ShowQuestComplete(self.info.questIndex) |
| 57 end | 59 end |
| 58 RemoveAutoQuestPopUp(self.info.questID) | 60 RemoveAutoQuestPopUp(self.info.questID) |
| 59 end | 61 end |
| 60 | 62 |
| 61 Quest.Select = function(self) | 63 Quest.Select = function(self) |
| 64 | |
| 62 if self.info.isAutoComplete and self.info.isComplete then | 65 if self.info.isAutoComplete and self.info.isComplete then |
| 63 ShowQuestComplete(self.info.questLogIndex) | 66 ShowQuestComplete(self.info.questLogIndex) |
| 64 else | 67 else |
| 65 SetSuperTrackedQuestID(self.info.questID) | 68 SetSuperTrackedQuestID(self.info.questID) |
| 66 end | 69 end |
| 67 end | 70 end |
| 68 | 71 |
| 69 Quest.Link = function(self) | 72 Quest.Link = function(self) |
| 70 local questLink = GetQuestLink(block.questLogIndex); | 73 |
| 74 local questLink = GetQuestLink(self.info.questLogIndex); | |
| 71 if ( questLink ) then | 75 if ( questLink ) then |
| 72 ChatEdit_InsertLink(questLink); | 76 ChatEdit_InsertLink(questLink); |
| 73 end | 77 end |
| 74 end | 78 end |
| 79 | |
| 80 AutoQuest.Link = Quest.Link | |
| 81 | |
| 75 Quest.Open = function(self) | 82 Quest.Open = function(self) |
| 83 | |
| 76 QuestMapFrame_OpenToQuestDetails(self.info.questID) | 84 QuestMapFrame_OpenToQuestDetails(self.info.questID) |
| 77 end | 85 end |
| 78 | 86 |
| 79 Quest.Remove = function(self) | 87 Quest.Remove = function(self) |
| 88 | |
| 80 print('removing', self.info.questLogIndex, 'from watcher') | 89 print('removing', self.info.questLogIndex, 'from watcher') |
| 81 RemoveQuestWatch(self.info.questLogIndex) | 90 RemoveQuestWatch(self.info.questLogIndex) |
| 82 end | 91 end |
| 83 | 92 |
| 84 | 93 |
| 86 --- CHEEVS | 95 --- CHEEVS |
| 87 Cheevs.Select = function(self) | 96 Cheevs.Select = function(self) |
| 88 --mod:Update(OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT) | 97 --mod:Update(OBJECTIVE_TRACKER_UPDATE_MODULE_ACHIEVEMENT) |
| 89 end | 98 end |
| 90 Cheevs.Remove = function(self) | 99 Cheevs.Remove = function(self) |
| 100 | |
| 91 RemoveTrackedAchievement(self.info.cheevID) | 101 RemoveTrackedAchievement(self.info.cheevID) |
| 92 end | 102 end |
| 93 Cheevs.OnMouseUp = function(self, button) | 103 Cheevs.OnMouseUp = function(self, button) |
| 104 | |
| 94 Default.OnMouseUp(self, button) | 105 Default.OnMouseUp(self, button) |
| 95 end | 106 end |
| 96 Cheevs.Link = function(self) | 107 Cheevs.Link = function(self) |
| 108 | |
| 97 local achievementLink = GetAchievementLink(self.info.cheevID); | 109 local achievementLink = GetAchievementLink(self.info.cheevID); |
| 98 if ( achievementLink ) then | 110 if ( achievementLink ) then |
| 99 ChatEdit_InsertLink(achievementLink); | 111 ChatEdit_InsertLink(achievementLink); |
| 100 end | 112 end |
| 101 end | 113 end |
| 102 | 114 |
| 103 Cheevs.Open = function(self) | 115 Cheevs.Open = function(self) |
| 116 | |
| 104 if ( not AchievementFrame ) then | 117 if ( not AchievementFrame ) then |
| 105 AchievementFrame_LoadUI(); | 118 AchievementFrame_LoadUI(); |
| 106 end | 119 end |
| 107 if ( not AchievementFrame:IsShown() ) then | 120 if ( not AchievementFrame:IsShown() ) then |
| 108 AchievementFrame_ToggleAchievementFrame(); | 121 AchievementFrame_ToggleAchievementFrame(); |
| 109 end | 122 end |
| 110 AchievementFrame_SelectAchievement(self.info.cheevID); | 123 AchievementFrame_SelectAchievement(self.info.cheevID); |
| 111 end | 124 end |
| 112 | 125 |
| 113 local Bonus = mod.Bonus | 126 local Bonus = mod.Bonus |
| 114 Bonus.Select = function(self, questID) | 127 Bonus.Select = function(self) |
| 115 Bonus:OnTurnIn(self.info.questID, 0, 30800) | 128 |
| 129 Bonus:OnTurnIn(self.info.questID) | |
| 116 end | 130 end |
| 117 Bonus.Remove = function(self, questID) | 131 Bonus.Remove = function(self) |
| 132 | |
| 118 end | 133 end |
