Rework options and hover + fix quests for teldrassil zone
This commit is contained in:
parent
f2641af379
commit
05eb54cbbb
15 changed files with 681 additions and 295 deletions
38
CzechQuests.lua
Normal file → Executable file
38
CzechQuests.lua
Normal file → Executable file
|
@ -1,6 +1,5 @@
|
|||
local lastQuestFrameEvent = nil
|
||||
local addonName, addonDataTable = ...
|
||||
local questFrameBeingHovered = false
|
||||
|
||||
local function GetQuestInfo(maleVersion, femaleVersion)
|
||||
local gender = UnitSex("player")
|
||||
|
@ -127,7 +126,7 @@ end
|
|||
local function UpdateQuestTranslationFrame()
|
||||
local selectedQuestIndex, questId, questData
|
||||
|
||||
if QuestLogFrame:IsShown() and QuestLogFrame:IsMouseOver() then
|
||||
if QuestLogFrame:IsShown() then
|
||||
selectedQuestIndex = GetQuestLogSelection()
|
||||
|
||||
if selectedQuestIndex > 0 then
|
||||
|
@ -136,7 +135,6 @@ local function UpdateQuestTranslationFrame()
|
|||
|
||||
if questData then
|
||||
QuestTranslationFrame:Show()
|
||||
|
||||
SetQuestDetails(
|
||||
questId,
|
||||
questData.title,
|
||||
|
@ -152,7 +150,7 @@ local function UpdateQuestTranslationFrame()
|
|||
end
|
||||
end
|
||||
|
||||
if QuestFrame:IsShown() and QuestFrame:IsMouseOver() then
|
||||
if QuestFrame:IsShown() then
|
||||
questId = GetQuestID()
|
||||
|
||||
if questId then
|
||||
|
@ -201,26 +199,24 @@ local function UpdateQuestTranslationFrame()
|
|||
end
|
||||
|
||||
local function SetQuestHoverScripts(frame, children)
|
||||
local frameName = frame:GetName()
|
||||
--local frameName = frame:GetName()
|
||||
|
||||
if frameName ~= "QuestLogListScrollFrame" and not string.find(frameName, "QuestLogItem") and not string.find(frameName, "QuestProgressItem") then
|
||||
frame:SetScript("OnEnter", function()
|
||||
--if frameName ~= "QuestLogListScrollFrame" and not string.find(frameName, "QuestLogItem") and not string.find(frameName, "QuestProgressItem") then
|
||||
-- frame:SetScript("OnEnter", function()
|
||||
UpdateQuestTranslationFrame()
|
||||
questFrameBeingHovered = true
|
||||
end)
|
||||
--end)
|
||||
|
||||
frame:SetScript("OnLeave", function()
|
||||
QuestTranslationFrame:Hide()
|
||||
questFrameBeingHovered = false
|
||||
end)
|
||||
--frame:SetScript("OnLeave", function()
|
||||
-- QuestTranslationFrame:Hide()
|
||||
--end)
|
||||
|
||||
if children then
|
||||
for i = 1, frame:GetNumChildren() do
|
||||
local child = select(i, frame:GetChildren())
|
||||
SetQuestHoverScripts(child, true)
|
||||
end
|
||||
end
|
||||
end
|
||||
--if children then
|
||||
-- for i = 1, frame:GetNumChildren() do
|
||||
-- local child = select(i, frame:GetChildren())
|
||||
-- SetQuestHoverScripts(child, true)
|
||||
-- end
|
||||
--end
|
||||
--end
|
||||
end
|
||||
|
||||
QuestTranslationFrame:SetScript("OnEvent", function(self, event, ...)
|
||||
|
@ -240,4 +236,4 @@ SetQuestHoverScripts(QuestRewardScrollFrame, true)
|
|||
SetQuestHoverScripts(QuestFrameCompleteButton, true)
|
||||
SetQuestHoverScripts(QuestFrameCompleteQuestButton, true)
|
||||
SetQuestHoverScripts(QuestFrameGoodbyeButton, true)
|
||||
SetQuestHoverScripts(QuestFrameCancelButton, true)
|
||||
SetQuestHoverScripts(QuestFrameCancelButton, true)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue