diff --git a/.vscode/bookmarks.json b/.vscode/bookmarks.json index 8fdc5f67..a8e7a29d 100644 --- a/.vscode/bookmarks.json +++ b/.vscode/bookmarks.json @@ -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": "" } @@ -209,7 +189,7 @@ "label": "" }, { - "line": 1337, + "line": 1348, "column": 1, "label": "" } diff --git a/WorldQuestTracker.lua b/WorldQuestTracker.lua index 56221cc7..2e5510cb 100644 --- a/WorldQuestTracker.lua +++ b/WorldQuestTracker.lua @@ -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 @@ -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() diff --git a/WorldQuestTracker_Core.lua b/WorldQuestTracker_Core.lua index 91ec338d..161fcfaa 100644 --- a/WorldQuestTracker_Core.lua +++ b/WorldQuestTracker_Core.lua @@ -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 @@ -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") diff --git a/WorldQuestTracker_Initialize.lua b/WorldQuestTracker_Initialize.lua index da24f4b1..3a96746c 100644 --- a/WorldQuestTracker_Initialize.lua +++ b/WorldQuestTracker_Initialize.lua @@ -214,6 +214,7 @@ do talking_heads_openworld = true, flymaster_tracker_frame_pos = {}, + flymaster_tracker_enabled = true, show_faction_frame = true,