Commit 0acb1173 authored by Merathilis's avatar Merathilis
Browse files

Cleanup objectivetracker.lua

parent 1e8a4343
......@@ -76,29 +76,6 @@ local function LoadSkin()
ObjectiveTrackerFrame.HeaderMenu.MinimizeButton:SetAlpha(0)
]]
hooksecurefunc(QUEST_TRACKER_MODULE, "AddProgressBar", function(_, _, line)
if not line.ProgressBar.Bar.backdrop then
line.ProgressBar.Bar:Height(18)
line.ProgressBar.Bar:CreateBackdrop("Transparent")
line.ProgressBar.Bar:SetStatusBarTexture(E["media"].normTex)
E:RegisterStatusBar(line.ProgressBar.Bar)
line.ProgressBar.Bar.BarFrame:Hide()
line.ProgressBar.Bar.IconBG:SetAlpha(0)
line.ProgressBar.Bar.BarFrame2:Hide()
line.ProgressBar.Bar.BarFrame3:Hide()
line.ProgressBar.Bar.Icon:ClearAllPoints()
line.ProgressBar.Bar.Icon:SetPoint("LEFT", line.ProgressBar.Bar, "RIGHT", E.Border*3, 0)
line.ProgressBar.Bar.Icon:SetMask("")
line.ProgressBar.Bar.Icon:SetTexCoord(unpack(E.TexCoords))
line.ProgressBar:CreateBackdrop("Default")
line.ProgressBar.backdrop:SetOutside(line.ProgressBar.Bar.Icon)
end
line.ProgressBar.backdrop:SetShown(line.ProgressBar.Bar.Icon:IsShown())
end)
--Skin ObjectiveTrackerFrame item buttons
hooksecurefunc(QUEST_TRACKER_MODULE, "SetBlockHeader", function(_, block)
local item = block.itemButton
......@@ -119,29 +96,7 @@ local function LoadSkin()
end
end)
hooksecurefunc(WORLD_QUEST_TRACKER_MODULE, "AddProgressBar", function(_, _, line)
if not line.ProgressBar.Bar.backdrop then
line.ProgressBar.Bar:Height(18)
line.ProgressBar.Bar:CreateBackdrop("Transparent")
line.ProgressBar.Bar:SetStatusBarTexture(E["media"].normTex)
E:RegisterStatusBar(line.ProgressBar.Bar)
line.ProgressBar.Bar.BarFrame:Hide()
line.ProgressBar.Bar.IconBG:SetAlpha(0)
line.ProgressBar.Bar.BarFrame2:Hide()
line.ProgressBar.Bar.BarFrame3:Hide()
line.ProgressBar.Bar.Icon:ClearAllPoints()
line.ProgressBar.Bar.Icon:SetPoint("LEFT", line.ProgressBar.Bar, "RIGHT", E.Border*3, 0)
line.ProgressBar.Bar.Icon:SetMask("")
line.ProgressBar.Bar.Icon:SetTexCoord(unpack(E.TexCoords))
line.ProgressBar:CreateBackdrop("Default")
line.ProgressBar.backdrop:SetOutside(line.ProgressBar.Bar.Icon)
end
line.ProgressBar.backdrop:SetShown(line.ProgressBar.Bar.Icon:IsShown())
end)
--World Quest Tracker item buttons
hooksecurefunc(WORLD_QUEST_TRACKER_MODULE, "AddObjective", function(_, block)
local item = block.itemButton
if item and not item.skinned then
......@@ -161,6 +116,7 @@ local function LoadSkin()
end
end)
--Objective Tracker Groupfinder button
local function SkinFindGroupButton(block, button)
block.rightButton = button
if button and not button.skinned then
......@@ -171,6 +127,55 @@ local function LoadSkin()
end
hooksecurefunc("QuestObjectiveSetupBlockButton_AddRightButton", SkinFindGroupButton)
--Quest Tracker ProgressBar
hooksecurefunc(QUEST_TRACKER_MODULE, "AddProgressBar", function(_, _, line)
if not line.ProgressBar.Bar.backdrop then
line.ProgressBar.Bar:Height(18)
line.ProgressBar.Bar:CreateBackdrop("Transparent")
line.ProgressBar.Bar:SetStatusBarTexture(E["media"].normTex)
E:RegisterStatusBar(line.ProgressBar.Bar)
line.ProgressBar.Bar.BarFrame:Hide()
line.ProgressBar.Bar.IconBG:SetAlpha(0)
line.ProgressBar.Bar.BarFrame2:Hide()
line.ProgressBar.Bar.BarFrame3:Hide()
line.ProgressBar.Bar.Icon:ClearAllPoints()
line.ProgressBar.Bar.Icon:SetPoint("LEFT", line.ProgressBar.Bar, "RIGHT", E.Border*3, 0)
line.ProgressBar.Bar.Icon:SetMask("")
line.ProgressBar.Bar.Icon:SetTexCoord(unpack(E.TexCoords))
line.ProgressBar:CreateBackdrop("Default")
line.ProgressBar.backdrop:SetOutside(line.ProgressBar.Bar.Icon)
end
line.ProgressBar.backdrop:SetShown(line.ProgressBar.Bar.Icon:IsShown())
end)
--World Quest Tracker ProgressBar
hooksecurefunc(WORLD_QUEST_TRACKER_MODULE, "AddProgressBar", function(_, _, line)
if not line.ProgressBar.Bar.backdrop then
line.ProgressBar.Bar:Height(18)
line.ProgressBar.Bar:CreateBackdrop("Transparent")
line.ProgressBar.Bar:SetStatusBarTexture(E["media"].normTex)
E:RegisterStatusBar(line.ProgressBar.Bar)
line.ProgressBar.Bar.BarFrame:Hide()
line.ProgressBar.Bar.IconBG:SetAlpha(0)
line.ProgressBar.Bar.BarFrame2:Hide()
line.ProgressBar.Bar.BarFrame3:Hide()
line.ProgressBar.Bar.Icon:ClearAllPoints()
line.ProgressBar.Bar.Icon:SetPoint("LEFT", line.ProgressBar.Bar, "RIGHT", E.Border*3, 0)
line.ProgressBar.Bar.Icon:SetMask("")
line.ProgressBar.Bar.Icon:SetTexCoord(unpack(E.TexCoords))
line.ProgressBar:CreateBackdrop("Default")
line.ProgressBar.backdrop:SetOutside(line.ProgressBar.Bar.Icon)
end
line.ProgressBar.backdrop:SetShown(line.ProgressBar.Bar.Icon:IsShown())
end)
--Scenario Tracker ProgressBar
hooksecurefunc(SCENARIO_TRACKER_MODULE, "AddProgressBar", function(_, _, line)
if not line.ProgressBar.Bar.backdrop then
line.ProgressBar.Bar:Height(18)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment