Skip to content

Commit

Permalink
Updates on Talking Head and Framework
Browse files Browse the repository at this point in the history
  • Loading branch information
Tercioo committed Feb 4, 2021
1 parent 778cfba commit 0d90914
Show file tree
Hide file tree
Showing 8 changed files with 332 additions and 13 deletions.
17 changes: 11 additions & 6 deletions .vscode/bookmarks.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,34 @@
"label": ""
},
{
"line": 1971,
"line": 1984,
"column": 23,
"label": ""
},
{
"line": 2089,
"line": 2102,
"column": 0,
"label": ""
},
{
"line": 2202,
"line": 2215,
"column": 96,
"label": ""
},
{
"line": 2291,
"line": 2304,
"column": 25,
"label": ""
},
{
"line": 2622,
"line": 2635,
"column": 4,
"label": ""
},
{
"line": 4202,
"column": 5,
"label": ""
}
]
},
Expand Down Expand Up @@ -198,7 +203,7 @@
"label": ""
},
{
"line": 1242,
"line": 1268,
"column": 6,
"label": ""
}
Expand Down
30 changes: 28 additions & 2 deletions WorldQuestTracker.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1239,11 +1239,37 @@ local p = CreateFrame("frame")
p:RegisterEvent("TALKINGHEAD_REQUESTED")
p:SetScript("OnEvent", function (self, event, arg1)
if (event == "TALKINGHEAD_REQUESTED") then

--get where the player is
local _, zoneType = GetInstanceInfo()

if (zoneType == "none") then
if (not WorldQuestTracker.db.profile.talking_heads_openworld) then
return
end

elseif (zoneType == "party") then
if (not WorldQuestTracker.db.profile.talking_heads_dungeon) then
return
end

elseif (zoneType == "raid") then
if (not WorldQuestTracker.db.profile.talking_heads_raid) then
return
end

elseif (zoneType == "scenario") then
if (not WorldQuestTracker.db.profile.talking_heads_torgast) then
return
end

end

local displayInfo, cameraID, vo, duration, lineNumber, numLines, name, text, isNewTalkingHead = C_TalkingHead.GetCurrentLineInfo()
if (WorldQuestTracker.db.profile.talking_heads[vo]) then
if (WorldQuestTracker.db.profile.talking_heads_heard[vo]) then
C_Timer.After(0.1, TalkingHeadFrame_CloseImmediately)
else
WorldQuestTracker.db.profile.talking_heads[vo] = true
WorldQuestTracker.db.profile.talking_heads_heard[vo] = true
end
end
end)
Expand Down
39 changes: 37 additions & 2 deletions WorldQuestTracker_Core.lua
Original file line number Diff line number Diff line change
Expand Up @@ -1059,6 +1059,21 @@ WorldQuestTracker.OnToggleWorldMap = function (self)
GameCooltip:Hide()
return
end

if (option == "talkinghead") then
if (value == "talking_heads_openworld") then
WorldQuestTracker.db.profile.talking_heads_openworld = not WorldQuestTracker.db.profile.talking_heads_openworld
elseif (value == "talking_heads_dungeon") then
WorldQuestTracker.db.profile.talking_heads_dungeon = not WorldQuestTracker.db.profile.talking_heads_dungeon
elseif (value == "talking_heads_raid") then
WorldQuestTracker.db.profile.talking_heads_raid = not WorldQuestTracker.db.profile.talking_heads_raid
elseif (value == "talking_heads_torgast") then
WorldQuestTracker.db.profile.talking_heads_torgast = not WorldQuestTracker.db.profile.talking_heads_torgast
end

GameCooltip:Hide()
return
end

if (option == "ignore_quest") then
WorldQuestTracker.OpenQuestBanPanel()
Expand Down Expand Up @@ -4180,8 +4195,28 @@ WorldQuestTracker.OnToggleWorldMap = function (self)
GameCooltip:AddIcon ([[Interface\BUTTONS\UI-CheckBox-Check]], 2, 1, 16, 16)
else
GameCooltip:AddIcon ([[Interface\BUTTONS\UI-AutoCastableOverlay]], 2, 1, 16, 16, .4, .6, .4, .6)
end

end

-- ~talking ~head
GameCooltip:AddLine ("No Talking Head")
GameCooltip:AddIcon ([[Interface\AddOns\WorldQuestTracker\media\icon_talking_head]], 1, 1, IconSize, IconSize)

GameCooltip:AddLine ("Open World", "", 2)
add_checkmark_icon (WorldQuestTracker.db.profile.talking_heads_openworld)
GameCooltip:AddMenu (2, options_on_click, "talkinghead", "talking_heads_openworld", not WorldQuestTracker.db.profile.talking_heads_openworld)

GameCooltip:AddLine ("Dungeon", "", 2)
add_checkmark_icon (WorldQuestTracker.db.profile.talking_heads_dungeon)
GameCooltip:AddMenu (2, options_on_click, "talkinghead", "talking_heads_dungeon", not WorldQuestTracker.db.profile.talking_heads_dungeon)

GameCooltip:AddLine ("Raid", "", 2)
add_checkmark_icon (WorldQuestTracker.db.profile.talking_heads_raid)
GameCooltip:AddMenu (2, options_on_click, "talkinghead", "talking_heads_raid", not WorldQuestTracker.db.profile.talking_heads_raid)

GameCooltip:AddLine ("Torgasth", "", 2)
add_checkmark_icon (WorldQuestTracker.db.profile.talking_heads_torgast)
GameCooltip:AddMenu (2, options_on_click, "talkinghead", "talking_heads_torgast", not WorldQuestTracker.db.profile.talking_heads_torgast)

-- ~accessibility
GameCooltip:AddLine (L["S_OPTIONS_ACCESSIBILITY"])
GameCooltip:AddIcon ([[Interface\PVPFrame\PVP-Banner-Emblem-1]], 1, 1, IconSize, IconSize)
Expand Down
6 changes: 5 additions & 1 deletion WorldQuestTracker_Initialize.lua
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,11 @@ do
tracker_show_time = false,
tracker_textsize = 12,

talking_heads = {},
talking_heads_heard = {},
talking_heads_torgast = true,
talking_heads_dungeon = true,
talking_heads_raid = true,
talking_heads_openworld = true,

show_faction_frame = true,

Expand Down
24 changes: 23 additions & 1 deletion libs/DF/fw.lua
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@


local dversion = 230
local dversion = 233

local major, minor = "DetailsFramework-1.0", dversion
local DF, oldminor = LibStub:NewLibrary (major, minor)
Expand Down Expand Up @@ -3639,6 +3639,28 @@ function DF:GetRoleTypes()
return DF.RoleTypes
end

local roleTexcoord = {
DAMAGER = "72:130:69:127",
HEALER = "72:130:2:60",
TANK = "5:63:69:127",
NONE = "139:196:69:127",
}

function DF:AddRoleIconToText(text, role, size)
if (role and type(role) == "string") then
local coords = GetTexCoordsForRole(role)
if (coords) then
if (type (text) == "string" and role ~= "NONE") then
size = size or 14
text = "|TInterface\\LFGFRAME\\UI-LFG-ICON-ROLES:" .. size .. ":" .. size .. ":0:0:256:256:" .. roleTexcoord[role] .. "|t " .. text
return text
end
end
end

return text
end

DF.CLEncounterID = {
{ID = 2144, Name = "Taloc"},
{ID = 2141, Name = "MOTHER"},
Expand Down
Loading

0 comments on commit 0d90914

Please sign in to comment.