Skip to content

Commit

Permalink
Fixed some panels and Hide emissary quest info
Browse files Browse the repository at this point in the history
- Fixed some panels which was giving errors at opening.
- Added option to show/hide emissary quest info above their circles.
  • Loading branch information
Tercioo committed Jul 20, 2019
1 parent c0260ff commit d82afc4
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 10 deletions.
23 changes: 21 additions & 2 deletions WorldQuestTracker_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -520,7 +520,7 @@ WorldQuestTracker.OnToggleWorldMap = function (self)

local f = DF:CreateSimplePanel (UIParent, 460, 90, "Discord Server", "WorldQuestTrackerSharePanel")
f:SetFrameStrata ("TOOLTIP")
f:SetPoint ("center", WorldMapScrollFrame, "center")
f:SetPoint ("center", UIParent, "center", 0, 0)

DF:CreateBorder (f)

Expand Down Expand Up @@ -1028,11 +1028,26 @@ WorldQuestTracker.OnToggleWorldMap = function (self)
return
end

if (option == "emissary_quest_info") then
WorldQuestTracker.db.profile.show_emissary_info = value
GameCooltip:Hide()
if (WorldQuestTrackerAddon.GetCurrentZoneType() == "zone") then
WorldQuestTracker.UpdateZoneSummaryFrame()
end
return
end

if (option == "show_summary_minimize_button") then
WorldQuestTracker.db.profile.show_summary_minimize_button = value

if (WorldQuestTrackerAddon.GetCurrentZoneType() == "zone") then
WorldQuestTracker.UpdateZoneSummaryFrame()
end
if (WorldQuestTrackerAddon.GetCurrentZoneType() == "world") then
WorldQuestTracker.UpdateWorldQuestsOnWorldMap()
end

WorldQuestTracker.ForceRefreshBountyBoard()

GameCooltip:Hide()
return
Expand Down Expand Up @@ -4051,6 +4066,11 @@ WorldQuestTracker.OnToggleWorldMap = function (self)
add_checkmark_icon (WorldQuestTracker.db.profile.bar_visible, true)
GameCooltip:AddMenu (1, options_on_click, "bar_visible", not WorldQuestTracker.db.profile.bar_visible)

--show emissary quest info
GameCooltip:AddLine ("Emissary Quest Info")
add_checkmark_icon (WorldQuestTracker.db.profile.show_emissary_info, true)
GameCooltip:AddMenu (1, options_on_click, "emissary_quest_info", not WorldQuestTracker.db.profile.show_emissary_info)

-- frame scale and frame align options
GameCooltip:AddLine ("$div")
--
Expand Down Expand Up @@ -4733,7 +4753,6 @@ WorldQuestTracker.OnToggleWorldMap = function (self)
if (not WorldMapFrame.isMaximized) then
WorldQuestTracker.UpdateWorldMapFrameAnchor()
end


-- ~frame scale
if (WorldQuestTracker.db.profile.map_frame_scale_enabled) then
Expand Down
2 changes: 2 additions & 0 deletions WorldQuestTracker_Initialize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,8 @@ do

disable_world_map_widgets = false,

show_emissary_info = true,

worldmap_widgets = {
textsize = 9,
scale = 1,
Expand Down
25 changes: 17 additions & 8 deletions WorldQuestTracker_ZoneMap.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1668,21 +1668,27 @@ if (bountyBoard) then

local numCompleted, numTotal = self:CalculateBountySubObjectives (bounty)

if (numCompleted) then
bountyButton.objectiveCompletedText:SetText (numCompleted .. "/" .. numTotal)
bountyButton.objectiveCompletedText:SetAlpha (.92)
bountyButton.objectiveCompletedBackground:SetAlpha (.4)

if (not bountyButton.objectiveCompletedText:IsShown()) then
bountyButton.objectiveCompletedAnimation:Play()
if (WorldQuestTracker.db.profile.show_emissary_info) then
if (numCompleted) then
bountyButton.objectiveCompletedText:SetText (numCompleted .. "/" .. numTotal)
bountyButton.objectiveCompletedText:SetAlpha (.92)
bountyButton.objectiveCompletedBackground:SetAlpha (.4)

if (not bountyButton.objectiveCompletedText:IsShown()) then
bountyButton.objectiveCompletedAnimation:Play()
end
else
bountyButton.objectiveCompletedText:SetText ("")
bountyButton.objectiveCompletedBackground:SetAlpha (0)
end
else
bountyButton.objectiveCompletedText:SetText ("")
bountyButton.objectiveCompletedBackground:SetAlpha (0)
end


local bountyQuestID = bounty.questID
if (bountyQuestID and HaveQuestData (bountyQuestID)) then
if (bountyQuestID and HaveQuestData (bountyQuestID) and WorldQuestTracker.db.profile.show_emissary_info) then
local questIndex = GetQuestLogIndexByID (bountyQuestID)
local title, level, suggestedGroup, isHeader, isCollapsed, isComplete, frequency, questID, startEvent, displayQuestID, isOnMap, hasLocalPOI, isTask, isStory = GetQuestLogTitle (questIndex)

Expand Down Expand Up @@ -1741,6 +1747,9 @@ if (bountyBoard) then
end

end
else
bountyButton.timeLeftText:SetText ("")
--bountyButton.Icon:SetTexture (nil)
end

bountyButton.lastUpdateByWQT = GetTime()
Expand Down

0 comments on commit d82afc4

Please sign in to comment.