Skip to content

Commit

Permalink
Flight master frame is now smaller, the arrow is brighter, a close bu…
Browse files Browse the repository at this point in the history
…tton has been added
  • Loading branch information
Tercioo committed Feb 17, 2021
1 parent e55bda8 commit 4dcb628
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 32 deletions.
28 changes: 4 additions & 24 deletions .vscode/bookmarks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,12 @@
"label": ""
},
{
"line": 1984,
"column": 23,
"label": ""
},
{
"line": 2102,
"column": 0,
"label": ""
},
{
"line": 2215,
"column": 96,
"label": ""
},
{
"line": 2304,
"column": 25,
"label": ""
},
{
"line": 2635,
"column": 4,
"line": 1063,
"column": 5,
"label": ""
},
{
"line": 4202,
"line": 4207,
"column": 5,
"label": ""
}
Expand Down Expand Up @@ -209,7 +189,7 @@
"label": ""
},
{
"line": 1337,
"line": 1348,
"column": 1,
"label": ""
}
Expand Down
30 changes: 22 additions & 8 deletions WorldQuestTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1294,19 +1294,31 @@ function WorldQuestTracker.InitiateFlyMasterTracker()

local oribosFlyMasterFrame = CreateFrame("frame", "WorldQuestTrackerOribosFlyMasterFrame", UIParent, "BackdropTemplate")
oribosFlyMasterFrame:SetPoint("center", "UIParent", "center", 0, 0)
oribosFlyMasterFrame:SetSize(140, 60)
oribosFlyMasterFrame:SetSize(86, 50)
DetailsFramework:ApplyStandardBackdrop(oribosFlyMasterFrame)
oribosFlyMasterFrame:Hide()

oribosFlyMasterFrame.Arrow = oribosFlyMasterFrame:CreateTexture(nil, "overlay")
oribosFlyMasterFrame.Arrow:SetPoint("center", oribosFlyMasterFrame, "center", 4, -14)
oribosFlyMasterFrame.Arrow:SetPoint("center", oribosFlyMasterFrame, "center", 4, -9)
oribosFlyMasterFrame.Arrow:SetSize(32, 32)
oribosFlyMasterFrame.Arrow:SetAlpha(.6)
oribosFlyMasterFrame.Arrow:SetAlpha(1)
oribosFlyMasterFrame.Arrow:SetTexture([[Interface\AddOns\WorldQuestTracker\media\ArrowGridT]])

oribosFlyMasterFrame.Title = DF:CreateLabel(oribosFlyMasterFrame, "World Quest Tracker\nFlight Master")
oribosFlyMasterFrame.Title:SetPoint("center", oribosFlyMasterFrame, "top", 0, -16)
local onCloseButton = function()
oribosFlyMasterFrame:Hide()
WorldQuestTracker.db.profile.flymaster_tracker_enabled = false
end
oribosFlyMasterFrame.CloseButton = DF:CreateButton(oribosFlyMasterFrame, onCloseButton, 20, 20, "X", -1, nil, nil, nil, nil, nil, DF:GetTemplate ("button", "WQT_NEWS_BUTTON"), DF:GetTemplate ("font", "WQT_TOGGLEQUEST_TEXT"))
oribosFlyMasterFrame.CloseButton:SetPoint("bottomleft", oribosFlyMasterFrame, "bottomleft", 5, 7)
oribosFlyMasterFrame.CloseButton:SetSize(20, 20)
oribosFlyMasterFrame.CloseButton:SetAlpha(.2)

oribosFlyMasterFrame.CloseButton.have_tooltip = "Disable this window, can be enabled again in the World Quest Tracker options."

oribosFlyMasterFrame.Title = DF:CreateLabel(oribosFlyMasterFrame, "Flight Master")
oribosFlyMasterFrame.Title:SetPoint("center", oribosFlyMasterFrame, "top", 0, -10)
oribosFlyMasterFrame.Title.align = "|"
oribosFlyMasterFrame.Title.textcolor = {1, 1, 1, .7}

local trackerOnTick = function(self, deltaTime)
--update the player position
Expand Down Expand Up @@ -1340,9 +1352,11 @@ function WorldQuestTracker.InitiateFlyMasterTracker()
oribosFlyMasterFrame:EnableMouse(true)

local enableFlymasterTracker = function()
oribosFlyMasterFrame:Show()
oribosFlyMasterFrame:SetScript("OnUpdate", trackerOnTick)
isFlymasterTrakcerEnabled = true
if (WorldQuestTracker.db.profile.flymaster_tracker_enabled) then
oribosFlyMasterFrame:Show()
oribosFlyMasterFrame:SetScript("OnUpdate", trackerOnTick)
isFlymasterTrakcerEnabled = true
end
end

local disableFlymasterTracker = function()
Expand Down
10 changes: 10 additions & 0 deletions WorldQuestTracker_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1060,6 +1060,11 @@ WorldQuestTracker.OnToggleWorldMap = function (self)
return
end

if (option == "oribos_flight_master") then
WorldQuestTracker.db.profile.flymaster_tracker_enabled = not WorldQuestTracker.db.profile.flymaster_tracker_enabled
GameCooltip:Hide()
end

if (option == "talkinghead") then
if (value == "talking_heads_openworld") then
WorldQuestTracker.db.profile.talking_heads_openworld = not WorldQuestTracker.db.profile.talking_heads_openworld
Expand Down Expand Up @@ -4323,6 +4328,11 @@ WorldQuestTracker.OnToggleWorldMap = function (self)
GameCooltip:AddIcon ([[Interface\BUTTONS\UI-AutoCastableOverlay]], 2, 1, 16, 16, .4, .6, .4, .6)
end
end

--oribos arrow
GameCooltip:AddLine ("Oribos Flight Master")
add_checkmark_icon (WorldQuestTracker.db.profile.flymaster_tracker_enabled, true)
GameCooltip:AddMenu (1, options_on_click, "oribos_flight_master", WorldQuestTracker.db.profile.flymaster_tracker_enabled)
--

GameCooltip:AddLine ("$div")
Expand Down
1 change: 1 addition & 0 deletions WorldQuestTracker_Initialize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,7 @@ do
talking_heads_openworld = true,

flymaster_tracker_frame_pos = {},
flymaster_tracker_enabled = true,

show_faction_frame = true,

Expand Down

0 comments on commit 4dcb628

Please sign in to comment.