v9.7.2: Ebonhold Database integration and core logic refinements

This commit is contained in:
Xurkon
2026-02-14 21:13:44 -06:00
parent 0a2cc15641
commit 6ef85d4e2d
573 changed files with 1751730 additions and 2 deletions
@@ -0,0 +1,439 @@
-------------------------
--Import modules.
-------------------------
---@type QuestieQuest
local QuestieQuest = QuestieLoader:ImportModule("QuestieQuest");
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions");
---@type QuestieOptionsDefaults
local QuestieOptionsDefaults = QuestieLoader:ImportModule("QuestieOptionsDefaults");
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils");
---@type QuestieTracker
local QuestieTracker = QuestieLoader:ImportModule("QuestieTracker");
---@type IsleOfQuelDanas
local IsleOfQuelDanas = QuestieLoader:ImportModule("IsleOfQuelDanas");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
QuestieOptions.tabs.advanced = {...}
local optionsDefaults = QuestieOptionsDefaults:Load()
local _GetLanguages
function QuestieOptions.tabs.advanced:Initialize()
-- This needs to be called inside of the Init process for l10n to be fully loaded
StaticPopupDialogs["QUESTIE_LANG_CHANGED_RELOAD"] = {
button1 = l10n('Reload UI'),
button2 = l10n('Cancel'),
OnAccept = function()
ReloadUI()
end,
text = l10n('The database needs to be updated to change language. Press reload to apply the new language'),
OnShow = function(self)
self:SetFrameStrata("TOOLTIP")
end,
timeout = 0,
whileDead = true,
hideOnEscape = true,
preferredIndex = 3
}
return {
name = function() return l10n('Advanced'); end,
type = "group",
order = 7,
args = {
map_options = {
type = "header",
order = 1,
name = function() return l10n('Advanced Settings'); end,
},
enableIconLimit = {
type = "toggle",
order = 1.1,
name = function() return l10n('Enable Icon Limit'); end,
desc = function() return l10n('Enable the limit of icons drawn per type.'); end,
width = "full",
get = function (info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieOptionsUtils:Delay(0.5, QuestieQuest.SmoothReset, l10n('Setting icon limit value to %s : Redrawing!', value))
end,
},
iconLimit = {
type = "range",
order = 1.2,
name = function() return l10n('Icon Limit'); end,
desc = function() return l10n('Limits the amount of icons drawn per type. ( Default: %s )', optionsDefaults.profile.iconLimit); end,
width = 1.5,
min = 10,
max = 500,
step = 10,
disabled = function() return (not Questie.db.profile.enableIconLimit); end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieOptionsUtils:Delay(0.5, QuestieQuest.SmoothReset, l10n('Setting icon limit value to %s : Redrawing!', value))
end,
},
iconSpacer = {
type = "description",
order = 1.3,
name = "",
desc = "",
image = "",
imageWidth = 0.3,
width = 0.3,
func = function() end,
},
clusterLevelHotzone = {
type = "range",
order = 1.4,
name = function() return l10n('Objective icon cluster amount'); end,
desc = function() return l10n('How much objective icons should cluster.'); end,
width = 1.5,
disabled = function() return (not Questie.db.profile.enabled); end,
min = 1,
max = 300,
step = 1,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function(info, value)
QuestieOptionsUtils:Delay(0.5, QuestieOptions.ClusterRedraw, l10n('Setting clustering value, clusterLevelHotzone set to %s : Redrawing!', value))
QuestieOptions:SetProfileValue(info, value)
QuestieOptionsUtils.DetermineTheme()
end,
},
quelDanasSpacer1 = QuestieOptionsUtils:Spacer(1.45, (not Questie.IsTBC)),
npcrules_group = {
type = "group",
order = 1.5,
inline = true,
width = 0.5,
hidden = (not Questie.IsTBC),
name = function() return l10n("Quel'Danas Settings"); end,
disabled = function() return not Questie.db.profile.autoaccept end,
args = {
isleOfQuelDanasPhase = {
type = "select",
order = 1.3,
width = 1.5,
values = IsleOfQuelDanas.localizedPhaseNames,
style = 'dropdown',
name = function() return l10n("Isle of Quel'Danas Phase") end,
desc = function() return l10n("Select the phase fitting your realm progress on the Isle of Quel'Danas"); end,
disabled = function() return (not Questie.IsWotlk) end,
get = function() return Questie.db.profile.isleOfQuelDanasPhase; end,
set = function(_, key)
Questie.db.profile.isleOfQuelDanasPhase = key
QuestieQuest:SmoothReset()
end,
},
quelDanasSpacer2 = {
type = "description",
order = 1.4,
name = "",
desc = "",
image = "",
imageWidth = 0.2,
width = 0.2,
func = function() end,
},
isleOfQuelDanasPhaseReminder = {
type = "toggle",
order = 1.5,
name = function() return l10n('Disable Phase reminder'); end,
desc = function() return l10n("Enable or disable the reminder on login to set the Isle of Quel'Danas phase"); end,
disabled = function() return (not Questie.IsWotlk) end,
width = 1,
get = function() return Questie.db.profile.isIsleOfQuelDanasPhaseReminderDisabled; end,
set = function(_, value)
Questie.db.profile.isIsleOfQuelDanasPhaseReminderDisabled = value
end,
},
},
},
Spacer_A = QuestieOptionsUtils:Spacer(2.9),
locale_header = {
type = "header",
order = 3,
name = function() return l10n('Localization Settings'); end,
},
locale_dropdown = {
type = "select",
order = 3.1,
values = _GetLanguages(),
style = 'dropdown',
name = function() return l10n('Select UI Locale'); end,
get = function()
if not Questie.db.global.questieLocaleDiff then
return 'auto'
else
return l10n:GetUILocale();
end
end,
set = function(_, lang)
local previousLocale = Questie.db.global.questieLocale
if lang == 'auto' then
local clientLocale = GetLocale()
if QUESTIE_LOCALES_OVERRIDE ~= nil then
clientLocale = QUESTIE_LOCALES_OVERRIDE.locale
end
l10n:SetUILocale(clientLocale)
Questie.db.global.questieLocale = clientLocale
Questie.db.global.questieLocaleDiff = false
else
l10n:SetUILocale(lang);
Questie.db.global.questieLocale = lang;
Questie.db.global.questieLocaleDiff = true;
end
if previousLocale ~= Questie.db.global.questieLocale then
if Questie.IsSoD then
Questie.db.global.sod.dbIsCompiled = nil -- recompile db with new lang if locale changed
else
Questie.db.global.dbIsCompiled = nil -- recompile db with new lang if locale changed
end
StaticPopup_Show("QUESTIE_LANG_CHANGED_RELOAD")
end
end,
},
Spacer_C = QuestieOptionsUtils:Spacer(3.9),
reset_header = {
type = "header",
order = 4,
name = function() return l10n('Reset Questie'); end,
},
Spacer_D = QuestieOptionsUtils:Spacer(22),
reset_text = {
type = "description",
order = 4.1,
name = function() return l10n('Hitting this button will reset all of the Questie configuration settings back to their default values. (Excluding Localization)'); end,
fontSize = "medium",
},
questieReset = {
type = "execute",
order = 4.2,
name = function() return l10n('Reset Questie'); end,
desc = function() return l10n('Reset Questie to the default values for all settings.'); end,
func = function (_, _)
-- update all values to default
for k,v in pairs(optionsDefaults.profile) do
Questie.db.profile[k] = v
end
-- only toggle questie if it's off (must be called before resetting the value)
if (not Questie.db.profile.enabled) then
Questie.db.profile.enabled = true
--QuestieQuest:ToggleNotes(true);
end
Questie.db.profile.enabled = optionsDefaults.profile.enabled;
Questie.db.profile.lowLevelStyle = optionsDefaults.profile.lowLevelStyle;
Questie.db.profile.migrationVersion = nil
Questie.db.profile.minimap.hide = optionsDefaults.profile.minimap.hide;
if Questie.IsSoD then
Questie.db.global.sod.dbIsCompiled = false
else
Questie.db.global.dbIsCompiled = false
end
Questie.db.char.hidden = nil
Questie.db.char.hiddenDailies = optionsDefaults.char.hiddenDailies;
ReloadUI()
end,
},
Spacer_E = QuestieOptionsUtils:Spacer(4.3),
recompileDatabase = {
type = "execute",
order = 4.4,
name = function() return l10n('Recompile Database'); end,
desc = function() return l10n('Forces a recompile of the Questie database. This will also reload the UI.'); end,
func = function (_, _)
if Questie.IsSoD then
Questie.db.global.sod.dbIsCompiled = false
else
Questie.db.global.dbIsCompiled = false
end
ReloadUI()
end,
},
Spacer_F = QuestieOptionsUtils:Spacer(4.5),
openProfiler = {
type = "execute",
order = 4.6,
name = function() return l10n('Open Profiler'); end,
desc = function() return l10n('Open the Questie profiler, this is useful for tracking down the source of lag / frame spikes.'); end,
func = function (_, _)
QuestieLoader:ImportModule("Profiler"):Start()
end,
},
Spacer_G = QuestieOptionsUtils:Spacer(4.7),
github_text = {
type = "description",
order = 4.8,
name = function() return Questie:Colorize(l10n('Questie is under active development for World of Warcraft: Classic. Please check GitHub for the latest alpha builds or to report issues. Or join us on our discord! (( https://github.com/Questie/Questie/ ))'), 'purple'); end,
fontSize = "medium",
},
HeaderDev = {
type = "header",
order = 5,
name = l10n('Developer Options'),
},
bugWorkarounds = {
type = "toggle",
order = 5.01,
name = function() return l10n('Enable bug workarounds'); end,
desc = function() return l10n('When enabled, Questie will hotfix vanilla UI bugs.'); end,
width = "full",
get = function() return Questie.db.profile.bugWorkarounds; end,
set = function (_, value)
Questie.db.profile.bugWorkarounds = value
end
},
showItemIDs = {
type = "toggle",
order = 5.02,
name = function() return l10n('Show Item IDs'); end,
desc = function() return l10n('When this is checked, the ID of items will shown in tooltips.'); end,
disabled = function() return (not Questie.db.profile.enableTooltips); end,
width = "full",
get = function() return Questie.db.profile.enableTooltipsItemID; end,
set = function (_, value)
Questie.db.profile.enableTooltipsItemID = value
end
},
showNPCIDs = {
type = "toggle",
order = 5.03,
name = function() return l10n('Show NPC IDs'); end,
desc = function() return l10n('When this is checked, the ID of NPCs will be shown in tooltips.'); end,
disabled = function() return (not Questie.db.profile.enableTooltips); end,
width = "full",
get = function() return Questie.db.profile.enableTooltipsNPCID; end,
set = function (_, value)
Questie.db.profile.enableTooltipsNPCID = value
end
},
showObjectIDs = {
type = "toggle",
order = 5.04,
name = function() return l10n('Show Object IDs'); end,
desc = function() return l10n('When this is checked, the ID of objects will be shown in tooltips. These are guesses and only show the first matching ID in the QuestieDB.'); end,
disabled = function() return (not Questie.db.profile.enableTooltips); end,
width = "full",
get = function() return Questie.db.profile.enableTooltipsObjectID; end,
set = function (_, value)
Questie.db.profile.enableTooltipsObjectID = value
end
},
showQuestIDs = {
type = "toggle",
order = 5.05,
name = function() return l10n('Show Quest IDs'); end,
desc = function() return l10n('When this is checked, the ID of quests will show in tooltips and the tracker.'); end,
disabled = function() return (not Questie.db.profile.enableTooltips); end,
width = "full",
get = function() return Questie.db.profile.enableTooltipsQuestID; end,
set = function (_, value)
Questie.db.profile.enableTooltipsQuestID = value
QuestieTracker:Update()
end
},
debugEnabled = {
type = "toggle",
order = 5.06,
name = function() return l10n('Enable Debug'); end,
desc = function() return l10n('Enable or disable debug functionality.'); end,
width = "full",
get = function () return Questie.db.profile.debugEnabled; end,
set = function (_, value)
Questie.db.profile.debugEnabled = value
if Questie.db.profile.debugEnabled then
QuestieLoader:PopulateGlobals()
end
end,
},
skipValidation = {
type = "toggle",
order = 5.07,
name = function() return l10n('Skip Validation'); end,
desc = function() return l10n('Skip database validation upon recompile. Validation is only present with debug enabled in the first place.'); end,
width = "full",
disabled = function() return not Questie.db.profile.debugEnabled; end,
get = function () return Questie.db.profile.skipValidation; end,
set = function (_, value)
Questie.db.profile.skipValidation = value
end,
},
debugEnabledPrint = {
type = "toggle",
order = 5.08,
disabled = function() return not Questie.db.profile.debugEnabled; end,
name = function() return l10n('Enable Debug').."-PRINT" end,
desc = function() return l10n('Enable or disable debug functionality.').."-PRINT" end,
width = "full",
get = function () return Questie.db.profile.debugEnabledPrint; end,
set = function (_, value)
Questie.db.profile.debugEnabledPrint = value
end,
},
debugLevel = {
type = "multiselect",
values = {
[0] = "DEBUG_CRITICAL",
[1] = "DEBUG_ELEVATED",
[2] = "DEBUG_INFO",
[3] = "DEBUG_DEVELOP",
[4] = "DEBUG_SPAM",
},
order = 5.09,
name = function() return l10n('Debug level to print'); end,
width = "normal",
disabled = function() return not (Questie.db.profile.debugEnabledPrint and Questie.db.profile.debugEnabled); end,
get = function(_, key)
--Questie:Debug(Questie.DEBUG_SPAM, "Debug Key:", key, math.pow(2, key), state.option.values[key])
--Questie:Debug(Questie.DEBUG_SPAM, "Debug Level:", Questie.db.profile.debugLevel, bit.band(Questie.db.profile.debugLevel, math.pow(2, key)))
return bit.band(Questie.db.profile.debugLevel, math.pow(2, key)) > 0
end,
set = function (_, value)
local currentValue = Questie.db.profile.debugLevel
local flag = math.pow(2, value)
--Questie:Debug(Questie.DEBUG_SPAM, "Setting Debug:", currentValue, flag, bit.band(currentValue, flag)>0)
-- When current debug level is active, remove it
if (bit.band(currentValue, flag) > 0) then
Questie.db.profile.debugLevel = bit.bxor(flag, currentValue)
-- When current debug level is inactive, add it
else
Questie.db.profile.debugLevel = bit.bor(flag, currentValue)
end
end,
},
},
}
end
_GetLanguages = function()
local languages = {
['auto'] = l10n('Automatic'),
['enUS'] = 'English',
['esES'] = 'Español',
['esMX'] = 'Español (América Latina)',
['ptBR'] = 'Português',
['frFR'] = 'Français',
['deDE'] = 'Deutsch',
['ruRU'] = 'Русский',
['zhCN'] = '简体中文',
['zhTW'] = '正體中文',
['koKR'] = '한국어',
}
if QUESTIE_LOCALES_OVERRIDE ~= nil then
languages[QUESTIE_LOCALES_OVERRIDE.locale] = QUESTIE_LOCALES_OVERRIDE.localeName
end
return languages
end
@@ -0,0 +1,352 @@
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions");
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils");
---@type QuestieTracker
local QuestieTracker = QuestieLoader:ImportModule("QuestieTracker");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
QuestieOptions.tabs.auto = {...}
local _GetShortcuts
function QuestieOptions.tabs.auto:Initialize()
return {
name = function() return l10n('Auto'); end,
type = "group",
order = 4,
childGroups = "tab",
args = {
autoModifier = {
type = "select",
order = 0,
values = _GetShortcuts(),
style = 'dropdown',
name = function() return l10n('Auto Modifier') end,
desc = function() return l10n('The modifier to NOT auto-accept/-complete quests when either option is enabled and you interact with a quest NPC.'); end,
width = 0.65,
--disabled = function() return (not Questie.db.profile.autocomplete) and (not Questie.db.profile.autoaccept) end,
get = function() return Questie.db.profile.autoModifier; end,
set = function(input, key)
Questie.db.profile.autoModifier = key
end,
},
autocomplete_options = {
type = "header",
order = 1,
name = function() return l10n('Auto Complete'); end,
},
autocomplete = {
type = "toggle",
order = 1.1,
name = function() return l10n('Auto Complete Quests'); end,
desc = function() return l10n('When enabled, Questie will automatically hand in finished quests when talking to NPCs.'); end,
get = function () return Questie.db.profile.autocomplete; end,
set = function (info, value)
Questie.db.profile.autocomplete = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Complete toggled to:", value)
end,
},
autocomplete_spacer = QuestieOptionsUtils:Spacer(1.2),
autoaccept_options = {
type = "header",
order = 2,
name = function() return l10n('Auto Accept'); end,
},
autoaccept = {
type = "toggle",
order = 2.1,
name = function() return l10n('Auto Accept Quests'); end,
desc = function() return l10n('When enabled, Questie will automatically accept quest dialogs when they appear, depending on the rules below.'); end,
get = function () return Questie.db.profile.autoaccept; end,
set = function (info, value)
Questie.db.profile.autoaccept = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept toggled to:", value)
end,
},
npcrules_group = {
type = "group",
order = 2.2,
inline = true,
width = 0.5,
name = function() return l10n('Rules for NPCs'); end,
disabled = function() return not Questie.db.profile.autoaccept end,
args = {
npc_normalquests = {
type = "toggle",
order = 1,
name = function() return l10n('Normal Quests'); end,
desc = function() return l10n('Automatically accept normal quests from NPCs.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_npc_normal; end,
-- END
set = function (info, value)
Questie.db.profile.autoaccept_npc_normal = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept NPC Normal toggled to:", value)
end,
},
npc_repeatablequests = {
type = "toggle",
order = 2,
name = function() return l10n('Repeatable Quests'); end,
desc = function() return l10n('Automatically accept repeatable quests (including dailies) from NPCs.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_npc_repeatable; end,
set = function (info, value)
Questie.db.profile.autoaccept_npc_repeatable = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept NPC Repeatable toggled to:", value)
end,
},
npc_dungeonquests = {
type = "toggle",
order = 3,
name = function() return l10n('Dungeon/Raid Quests'); end,
desc = function() return l10n('Automatically accept dungeon and raid quests from NPCs.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_npc_dungeon; end,
set = function (info, value)
Questie.db.profile.autoaccept_npc_dungeon = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept NPC Dungeon toggled to:", value)
end,
},
npc_pvpquests = {
type = "toggle",
order = 4,
name = function() return l10n('PvP Quests'); end,
desc = function() return l10n('Automatically accept PvP quests from NPCs.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_npc_pvp; end,
set = function (info, value)
Questie.db.profile.autoaccept_npc_pvp = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept NPC PvP toggled to:", value)
end,
},
npc_eventquests = {
type = "toggle",
order = 5,
name = function() return l10n('Event Quests'); end,
desc = function() return l10n('Automatically accept event quests (including event dailies) from NPCs.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_npc_event; end,
set = function (info, value)
Questie.db.profile.autoaccept_npc_event = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept NPC Event toggled to:", value)
end,
},
npc_trivialquests = {
type = "toggle",
order = 6,
name = function() return l10n('Trivial Quests'); end,
desc = function() return l10n('Automatically accept trivial (low-level) quests from NPCs.'); end,
width = 1,
-- AUTO 1.0
get = function() return Questie.db.profile.acceptTrivial; end,
set = function(_, value)
Questie.db.profile.acceptTrivial = value
end,
-- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_npc_trivial; end,
-- set = function (info, value)
-- Questie.db.profile.autoaccept_npc_trivial = value
-- Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept NPC Trivial toggled to:", value)
-- end,
},
},
},
playerrules_group = {
type = "group",
order = 2.3,
inline = true,
width = 0.5,
disabled = function() return not Questie.db.profile.autoaccept end,
name = function() return l10n('Rules for players'); end,
args = {
player_normalquests = {
type = "toggle",
order = 1,
name = function() return l10n('Normal Quests'); end,
desc = function() return l10n('Automatically accept normal quests from players.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_player_normal; end,
set = function (info, value)
Questie.db.profile.autoaccept_player_normal = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept Player Normal toggled to:", value)
end,
},
player_repeatablequests = {
type = "toggle",
order = 2,
name = function() return l10n('Repeatable Quests'); end,
desc = function() return l10n('Automatically accept repeatable quests (including dailies) from players.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_player_repeatable; end,
set = function (info, value)
Questie.db.profile.autoaccept_player_repeatable = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept Player Repeatable toggled to:", value)
end,
},
player_dungeonquests = {
type = "toggle",
order = 3,
name = function() return l10n('Dungeon/Raid Quests'); end,
desc = function() return l10n('Automatically accept dungeon and raid quests from players.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_player_dungeon; end,
set = function (info, value)
Questie.db.profile.autoaccept_player_dungeon = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept Player Dungeon toggled to:", value)
end,
},
player_pvpquests = {
type = "toggle",
order = 4,
name = function() return l10n('PvP Quests'); end,
desc = function() return l10n('Automatically accept PvP quests from players.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_player_pvp; end,
set = function (info, value)
Questie.db.profile.autoaccept_player_pvp = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept Player PvP toggled to:", value)
end,
},
player_eventquests = {
type = "toggle",
order = 5,
name = function() return l10n('Event Quests'); end,
desc = function() return l10n('Automatically accept event quests (including event dailies) from players.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_player_event; end,
set = function (info, value)
Questie.db.profile.autoaccept_player_event = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept Player Event toggled to:", value)
end,
},
player_trivialquests = {
type = "toggle",
order = 6,
name = function() return l10n('Trivial Quests'); end,
desc = function() return l10n('Automatically accept trivial (low-level) quests from players.'); end,
width = 1,
-- AUTO 1.0
disabled = true,
get = function () return true; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoaccept_player_trivial; end,
set = function (info, value)
Questie.db.profile.autoaccept_player_trivial = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Accept Player Trivial toggled to:", value)
end,
},
},
},
autoaccept_spacer = QuestieOptionsUtils:Spacer(2.4),
--Spacer_H = QuestieOptionsUtils:HorizontalSpacer(7, 1),
--acceptTrivial = {
-- type = "toggle",
-- order = 8,
-- name = function() return l10n('Accept trivial (low level) quests'); end,
-- desc = function() return l10n('When this is enabled trivial (gray) quests will be auto accepted as well.'); end,
-- disabled = function() return (not Questie.db.profile.autoaccept) end,
-- width = 1.5,
-- get = function () return Questie.db.profile.acceptTrivial; end,
-- set = function (info, value)
-- Questie.db.profile.acceptTrivial = value
-- end,
--},
autoreject_options = {
type = "header",
order = 3,
name = function() return l10n('Auto Reject'); end,
},
autoreject_battlegrounds = {
type = "toggle",
order = 3.1,
name = function() return l10n('Reject quests shared in battlegrounds'); end,
desc = function() return l10n('Automatically reject quests shared by players while in a battleground instance. This feature overrides autoaccept behavior.'); end,
width = 1.6,
-- AUTO 1.0
disabled = true,
get = function () return false; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoreject_battleground; end,
set = function (info, value)
Questie.db.profile.autoreject_battleground = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Reject Battleground toggled to:", value)
end,
},
autoreject_randoms = {
type = "toggle",
order = 3.2,
name = function() return l10n('Reject quests shared by non-friends'); end,
desc = function() return l10n('Automatically reject quests shared by players that aren\'t on your friends list. This feature overrides autoaccept behavior.'); end,
width = 1.6,
-- AUTO 1.0
disabled = true,
get = function () return false; end,
-- -- AUTO 2.0
-- get = function () return Questie.db.profile.autoreject_nonfriend; end,
set = function (info, value)
Questie.db.profile.autoreject_nonfriend = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Auto Reject Nonfriend toggled to:", value)
end,
},
wip_spacer = QuestieOptionsUtils:Spacer(4),
wip_text = {
type = "description",
order = 5,
name = function() return l10n('Further Auto customization is coming in a future Questie update.'); end,
fontSize = "medium",
},
}
}
end
_GetShortcuts = function()
return {
['shift'] = l10n('Shift'),
['ctrl'] = l10n('Control'),
['alt'] = l10n('Alt'),
['disabled'] = l10n('Disabled'),
}
end
@@ -0,0 +1,200 @@
-------------------------
--Import modules.
-------------------------
---@type QuestieQuest
local QuestieQuest = QuestieLoader:ImportModule("QuestieQuest");
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions");
---@type QuestieOptionsDefaults
local QuestieOptionsDefaults = QuestieLoader:ImportModule("QuestieOptionsDefaults");
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils");
---@type QuestieDBMIntegration
local QuestieDBMIntegration = QuestieLoader:ImportModule("QuestieDBMIntegration");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
QuestieOptions.tabs.dbm = {...}
local optionsDefaults = QuestieOptionsDefaults:Load()
--TODO, hid hud tab if DBMHudMap global doesn't exist? Or at very least gray out options?
--dbmHUDEnable, dbmHUDShowAlert, DBMHUDZoom, dbmHUDRadius, dbmHUDShowQuest, dbmHUDShowSlay, dbmHUDShowLoot, dbmHUDShowInteract
function QuestieOptions.tabs.dbm:Initialize()
return {
name = function() return l10n('DBM HUD'); end,
type = "group",
disabled = function() if DBM and DBM.HudMap then return false else return true end end,
hidden = function() if DBM and DBM.HudMap then return false else return true end end,
order = 6,
args = {
info_prespacer = QuestieOptionsUtils:Spacer(0),
info_text = {
type = "description",
order = 0.1,
name = function() return Questie:Colorize(l10n('The DBM HUD integrates with the addon DeadlyBossMods to show a radar of objective icons on your entire screen. Enabling this feature usually requires a /reload to take effect.'), 'gray'); end,
fontSize = "medium",
},
info_postspacer = QuestieOptionsUtils:Spacer(0.2),
hud_options = {
type = "header",
order = 1,
name = function() return l10n('DBM HUD'); end,
},
dbmHUDEnable = {
type = "toggle",
order = 1.1,
name = function() return l10n('Show DBM HUD'); end,
desc = function() return l10n('Enable or disable the DBM Heads Up Display (HUD) overlay for showing map objects.'); end,
width = "full",
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
if value then
QuestieDBMIntegration:EnableHUD()
--Hud Integration is completely innert when disabled, so QuestieDBMIntegration:SoftReset() cannot be used since it has no local tables
--Questies SmoothReset must be used after enabling hud so that HUD can build it's own tables when initial icons get added
QuestieQuest:SmoothReset()
else
QuestieDBMIntegration:ClearAll(true)--Passing true unregisters events and completely disables HUD activity after the ClearAll
end
end,
},
dbmHUDShowAlert = {
type = "toggle",
order = 1.2,
name = function() return l10n('Enable proximity visual for HUD icons'); end,
desc = function() return l10n('Changes the color of a HUD icon to red when you are near it.'); end,
width = "full",
disabled = function() return not Questie.db.profile.dbmHUDEnable end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieDBMIntegration:SoftReset()
end,
},
DBMHUDRefresh = {
type = "range",
disabled = function()
if not Questie.db.profile.dbmHUDEnable then
return true
elseif DBM and DBM.HudMap and not DBM.HudMap.Version then
return true
else
return false
end
end,
order = 1.3,
name = function() return l10n('Refresh rate for HUD (Requires turning HUD off/on)'); end,
desc = function() return l10n('Adjusts the fresh rate for HUD Icons which affects how often UI refreshes their position. (Default: %s)', optionsDefaults.profile.DBMHUDRefresh); end,
width = "double",
min = 0.01,
max = 0.05,
step = 0.01,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieDBMIntegration:ChangeRefreshRate(value)
end,
},
Spacer_A = QuestieOptionsUtils:Spacer(1.9),
mapnote_options = {
type = "header",
order = 2,
name = function() return l10n('Size & Scale Options'); end,
},
Spacer_B = QuestieOptionsUtils:Spacer(2.1),
DBMHUDZoom = {
type = "range",
order = 2.2,
name = function() return l10n('Global zoom level for HUD Icons'); end,
desc = function() return l10n('Adjusts the zoom level for HUD Icons which affects how close in or how far out you see them. (Default: %s)', optionsDefaults.profile.DBMHUDZoom); end,
width = "double",
min = 40,
max = 200,
step = 20,
disabled = function() return not Questie.db.profile.dbmHUDEnable end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieDBMIntegration:ChangeZoomLevel(value)
end,
},
dbmHUDRadius = {
type = "range",
order = 2.3,
name = function() return l10n('Global radius/size for HUD Icons'); end,
desc = function() return l10n('Adjusts the size of the icons that appear on the DBM HUD. (Default: %s)', optionsDefaults.profile.dbmHUDRadius); end,
width = "double",
min = 1,
max = 5,
step = 0.5,
disabled = function() return not Questie.db.profile.dbmHUDEnable end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieDBMIntegration:SoftReset()
end,
},
Spacer_C = QuestieOptionsUtils:Spacer(2.9),
fade_options = {
type = "header",
order = 3,
name = function() return l10n('Filter Options'); end,
},
dbmHUDShowQuest = {
type = "toggle",
order = 3.1,
name = function() return l10n('Show quest giver icons'); end,
desc = function() return l10n('Toggles whether or not available/complete quest icons appear on the DBM HUD. (Default: %s)', optionsDefaults.profile.dbmHUDShowQuest); end,
width = "full",
disabled = function() return not Questie.db.profile.dbmHUDEnable end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieDBMIntegration:SoftReset()
end,
},
dbmHUDShowSlay = {
type = "toggle",
order = 3.2,
name = function() return l10n('Show slay icons'); end,
desc = function() return l10n('Toggles whether or not slay icons appear on the DBM HUD. (Default: %s)', optionsDefaults.profile.dbmHUDShowSlay); end,
width = "full",
disabled = function() return not Questie.db.profile.dbmHUDEnable end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieDBMIntegration:SoftReset()
end,
},
dbmHUDShowLoot = {
type = "toggle",
order = 3.3,
name = function() return l10n('Show loot icons'); end,
desc = function() return l10n('Toggles whether or not loot icons appear on the DBM HUD. (Default: %s)', optionsDefaults.profile.dbmHUDShowLoot); end,
width = "full",
disabled = function() return not Questie.db.profile.dbmHUDEnable end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieDBMIntegration:SoftReset()
end,
},
dbmHUDShowInteract = {
type = "toggle",
order = 3.4,
name = function() return l10n('Show object interact icons'); end,
desc = function() return l10n('Toggles whether or not object (gear) icons appear on the DBM HUD. (Default: %s)', optionsDefaults.profile.dbmHUDShowInteract); end,
width = "full",
disabled = function() return not Questie.db.profile.dbmHUDEnable end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieDBMIntegration:SoftReset()
end,
},
},
}
end
@@ -0,0 +1,779 @@
-------------------------
--Import modules.
-------------------------
---@type QuestieQuest
local QuestieQuest = QuestieLoader:ImportModule("QuestieQuest");
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions");
---@type QuestieOptionsDefaults
local QuestieOptionsDefaults = QuestieLoader:ImportModule("QuestieOptionsDefaults");
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils");
---@type QuestiePlayer
local QuestiePlayer = QuestieLoader:ImportModule("QuestiePlayer");
---@type QuestieMenu
local QuestieMenu = QuestieLoader:ImportModule("QuestieMenu");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
---@type QuestieTooltips
local QuestieTooltips = QuestieLoader:ImportModule("QuestieTooltips");
---@type WorldMapButton
local WorldMapButton = QuestieLoader:ImportModule("WorldMapButton")
---@type QuestieCoords
local QuestieCoords = QuestieLoader:ImportModule("QuestieCoords");
---@type QuestieTracker
local QuestieTracker = QuestieLoader:ImportModule("QuestieTracker");
---@type QuestieShutUp
local QuestieShutUp = QuestieLoader:ImportModule("QuestieShutUp")
---@type Sounds
local Sounds = QuestieLoader:ImportModule("Sounds")
---@type AvailableQuests
local AvailableQuests = QuestieLoader:ImportModule("AvailableQuests")
---@class QuestieMap
local QuestieMap = QuestieLoader:CreateModule("QuestieMap");
QuestieOptions.tabs.general = { ... }
local optionsDefaults = QuestieOptionsDefaults:Load()
local _GetAnnounceChannels
local _IsAnnounceDisabled
local _GetQuestSoundChoices
local _GetQuestSoundChoicesSort
local _GetObjectiveSoundChoices
local _GetObjectiveSoundChoicesSort
local _GetObjectiveProgressSoundChoices
local _GetObjectiveProgressSoundChoicesSort
function QuestieOptions.tabs.general:Initialize()
return {
name = function() return l10n('General'); end,
type = "group",
order = 1,
args = {
questie_header = {
type = "header",
order = 1,
name = function() return l10n('General Options'); end,
},
social_spacer = QuestieOptionsUtils:Spacer(1.5,nil,"minimal"),
social_options_group = {
type = "group",
order = 2,
inline = true,
name = function() return l10n('Social Options'); end,
args = {
filterQuestieAnnounce = {
type = "toggle",
order = 7.1,
name = function() return l10n('Questie ShutUp!'); end,
desc = function() return l10n('Remove all Questie chat messages coming from other players and disable sending your own.'); end,
descStyle = "inline",
disabled = function() return false end,
width = 2,
get = function () return Questie.db.profile.questieShutUp end,
set = function (_, value)
Questie.db.profile.questieShutUp = value
QuestieShutUp:ToggleFilters(value)
end,
},
questAnnounceChannel = {
type = "select",
order = 7.2,
values = _GetAnnounceChannels(),
style = 'dropdown',
disabled = function() return Questie.db.profile.questieShutUp end,
name = function() return l10n('Channels to announce in') end,
desc = function() return l10n('Announce quest updates to other players in your group'); end,
get = function() return Questie.db.profile.questAnnounceChannel; end,
set = function(_, key)
Questie.db.profile.questAnnounceChannel = key
Questie:Debug(Questie.DEBUG_DEVELOP, "Channels to announce changed to:", key)
end,
},
printLocalMessages = {
type = "toggle",
order = 7.3,
name = function() return l10n('Display announcements locally when outside of a group'); end,
desc = function() return l10n("Questie will print your progress messages to chat when not in a group. Other players will NOT be able to see this."); end,
disabled = function() return Questie.db.profile.questieShutUp end,
width = 2.5,
get = function () return Questie.db.profile.questAnnounceLocally end,
set = function (_, value)
Questie.db.profile.questAnnounceLocally = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Quest announce locally changed to:", value)
end,
},
shareQuestsNearby = {
type = "toggle",
order = 7.4,
name = function() return l10n('Share quest progress with nearby players'); end,
desc = function() return l10n("Your quest progress will be periodically sent to nearby players. Disabling this doesn't affect sharing progress with party members."); end,
disabled = function() return false end,
width = 1.7,
hidden = true, -- does this even do anything anymore after YELL removed?
get = function () return not Questie.db.profile.disableYellComms end,
set = function (info, value)
Questie.db.profile.disableYellComms = not value
if not value then
QuestieLoader:ImportModule("QuestieComms"):RemoveAllRemotePlayers()
end
end,
},
questAnnounceTypes = {
type = "group",
order = 7.5,
inline = true,
name = function() return l10n('Types of updates to announce in chat'); end,
disabled = function() return _IsAnnounceDisabled() or Questie.db.profile.questieShutUp; end,
args = {
questAnnounceItems = {
type = "toggle",
order = 1,
name = function() return l10n('Items starting a quest'); end,
desc = function() return l10n('Announce looted items that start a quest to other players'); end,
width = 1.5,
get = function () return Questie.db.profile.questAnnounceItems; end,
set = function (_, value)
Questie.db.profile.questAnnounceItems = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Items starting a quest changed to:", value)
end,
},
questAnnounceAccepted = {
type = "toggle",
order = 2,
name = function() return l10n('Quest accepted'); end,
desc = function() return l10n('Announce quest acceptance to other players'); end,
width = 1.5,
get = function () return Questie.db.profile.questAnnounceAccepted; end,
set = function (_, value)
Questie.db.profile.questAnnounceAccepted = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Quest accepted announce changed to:", value)
end,
},
questAnnounceAbandoned = {
type = "toggle",
order = 3,
name = function() return l10n('Quest abandoned'); end,
desc = function() return l10n('Announce quest abortion to other players'); end,
width = 1.5,
get = function () return Questie.db.profile.questAnnounceAbandoned; end,
set = function (_, value)
Questie.db.profile.questAnnounceAbandoned = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Quest abandoned announce changed to:", value)
end,
},
questAnnounceObjectives = {
type = "toggle",
order = 4,
name = function() return l10n('Objective completed'); end,
desc = function() return l10n('Announce completed objectives to other players'); end,
width = 1.5,
get = function () return Questie.db.profile.questAnnounceObjectives; end,
set = function (_, value)
Questie.db.profile.questAnnounceObjectives = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Objective completed announce changed to:", value)
end,
},
questAnnounceCompleted = {
type = "toggle",
order = 5,
name = function() return l10n('Quest completed'); end,
desc = function() return l10n('Announce quest completion to other players'); end,
width = 1.5,
get = function () return Questie.db.profile.questAnnounceCompleted; end,
set = function (_, value)
Questie.db.profile.questAnnounceCompleted = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Quest completed announce changed to:", value)
end,
},
},
},
},
},
interface_spacer = QuestieOptionsUtils:Spacer(2.5,nil,"minimal"),
interface_options_group = {
type = "group",
order = 3,
inline = true,
name = function() return l10n('Interface Options'); end,
args = {
instantQuest = {
type = "toggle",
order = 5.1,
name = function() return l10n('Enable Instant Quest Text'); end,
desc = function() return l10n('Toggles the default Instant Quest Text option. This is just a shortcut for the WoW option in Interface.'); end,
width = 1.55,
get = function()
if GetCVar("instantQuestText") == '1' then
return true;
else
return false;
end
end,
set = function(info, value)
if value then
SetCVar("instantQuestText", 1);
else
SetCVar("instantQuestText", 0);
end
end,
},
showCustomQuestFrameIcons = {
type = "toggle",
order = 5.2,
name = function() return l10n('Show custom quest frame icons'); end,
desc = function() return l10n('Use custom Questie icons for NPC dialogs, reflecting the status and type of each quest.'); end,
width = 1.55,
get = function() return Questie.db.profile.enableQuestFrameIcons; end,
set = function(info, value)
Questie.db.profile.enableQuestFrameIcons = value
end,
},
mapShowHideEnabled = {
type = "toggle",
order = 5.25,
name = function() return l10n('Show Questie Map Button'); end,
desc = function() return l10n('Enable or disable the Show/Hide Questie Button on Map (May fix some Map Addon interactions).'); end,
width = 1.55,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
WorldMapButton.Toggle(value)
end,
},
minimapButtonEnabled = {
type = "toggle",
order = 5.3,
name = function() return l10n('Enable Minimap Button'); end,
desc = function() return l10n('Enable or disable the Questie minimap button. You can still access the options menu with /questie.'); end,
width = 1.55,
get = function() return not Questie.db.profile.minimap.hide; end,
set = function(info, value)
Questie.db.profile.minimap.hide = not value;
if value then
Questie.minimapConfigIcon:Show("Questie");
else
Questie.minimapConfigIcon:Hide("Questie");
end
end,
},
mapCoordinatesEnabled = {
type = "toggle",
order = 5.4,
name = function() return l10n('Show Map Coordinates'); end,
desc = function() return l10n("Place the Player's coordinates and Cursor's coordinates on the Map's title."); end,
width = 1.55,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
if not value then
QuestieCoords.ResetMapText();
QuestieCoords:ResetMiniWorldMapText();
end
end,
},
minimapCoordinatesEnabled = {
type = "toggle",
order = 5.5,
name = function() return l10n('Show Minimap Coordinates'); end,
desc = function() return l10n("Place the Player's coordinates on the Minimap title."); end,
width = 1.55,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
if not value then
QuestieCoords:ResetMinimapText();
end
end,
},
mapCoordinatePrecision = {
type = "range",
order = 5.6,
name = function() return l10n('Map Coordinates Decimal Precision'); end,
desc = function() return l10n('How many decimals to include in the precision on the Map for Player and Cursor coordinates.\n(Default: %s)', optionsDefaults.profile.mapCoordinatePrecision); end,
width = 1.4,
min = 1,
max = 5,
step = 1,
disabled = function() return not Questie.db.profile.mapCoordinatesEnabled end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
end,
},
},
},
level_spacer = QuestieOptionsUtils:Spacer(3.5,nil,"minimal"),
level_options_group = {
type = "group",
order = 4,
inline = true,
name = function() return l10n('Quest Level Options'); end,
args = {
level_text = {
type = "description",
order = 1,
name = function() return Questie:Colorize(l10n('By default, Questie only shows quests that are relevant for your level. You can change this behavior below.'), 'gray'); end,
fontSize = "small",
},
ascensionScaling = {
type = "toggle",
order = 1.5,
name = "Ascension Level Scaling",
desc = "Scale low-level quests to player level (player - 4) instead of treating them as trivial/gray.",
width = "full",
get = function()
return Questie.db.profile.enableAscensionScaling
end,
set = function(_, value)
Questie.db.profile.enableAscensionScaling = value
AvailableQuests.CalculateAndDrawAll()
QuestieTracker:Update()
end,
},
level_spacer = QuestieOptionsUtils:Spacer(2),
radio = {
order = 3.0,
type = "select",
style = "radio",
width = 3,
name = l10n("Which available quests should be displayed"),
values = {
[Questie.LOWLEVEL_NONE] = l10n("Show only quests granting experience (Default)"),
[Questie.LOWLEVEL_ALL] = l10n("Show all low level quests"),
[Questie.LOWLEVEL_OFFSET] = l10n("Show quests to a set level below the player"),
[Questie.LOWLEVEL_RANGE] = l10n("Show quests between two set levels"),
},
get = function () return Questie.db.profile.lowLevelStyle end,
set = function (_, value)
Questie.db.profile.lowLevelStyle = value
AvailableQuests.CalculateAndDrawAll()
Questie:Debug(Questie.DEBUG_DEVELOP, "Lowlevel Quests set to:", value)
end,
},
manualOffset = {
type = "range",
order = 3.1,
name = function() return l10n('Player level offset'); end,
desc = function()
return l10n('How many levels below your character to show. ( Default: %s )', optionsDefaults.profile.manualLevelOffset);
end,
width = 1.063,
min = 0,
max = 60 + 10 * GetExpansionLevel(),
step = 1,
disabled = function() return (Questie.db.profile.lowLevelStyle ~= Questie.LOWLEVEL_OFFSET) end,
get = function() return Questie.db.profile.manualLevelOffset end,
set = function(info, value)
Questie.db.profile.manualLevelOffset = value;
QuestieOptionsUtils:Delay(0.3, AvailableQuests.CalculateAndDrawAll, "manualLevelOffset set to " .. value)
end,
},
minLevelFilter = {
type = "range",
order = 3.2,
name = function() return l10n('Level from'); end,
desc = function() return l10n('Minimum quest level to show.'); end,
width = 1.063,
min = 0,
max = 60 + 10 * GetExpansionLevel(),
step = 1,
disabled = function() return (Questie.db.profile.lowLevelStyle ~= Questie.LOWLEVEL_RANGE) end,
get = function() return Questie.db.profile.minLevelFilter; end,
set = function(info, value)
if value > Questie.db.profile.maxLevelFilter then
value = Questie.db.profile.maxLevelFilter
end
Questie.db.profile.minLevelFilter = value;
QuestieOptionsUtils:Delay(0.3, AvailableQuests.CalculateAndDrawAll, "minLevelFilter set to " .. value)
end,
},
maxLevelFilter = {
type = "range",
order = 3.3,
name = function()
return l10n('Level to');
end,
desc = function()
return l10n('Maximum quest level to show.');
end,
width = 1.063,
min = 0,
max = 60 + 10 * GetExpansionLevel(),
step = 1,
disabled = function() return (Questie.db.profile.lowLevelStyle ~= Questie.LOWLEVEL_RANGE) end,
get = function(info) return Questie.db.profile.maxLevelFilter; end,
set = function(info, value)
if value < Questie.db.profile.minLevelFilter then
value = Questie.db.profile.minLevelFilter
end
Questie.db.profile.maxLevelFilter = value;
QuestieOptionsUtils:Delay(0.3, AvailableQuests.CalculateAndDrawAll, "maxLevelFilter set to " .. value)
end,
},
},
},
tooltip_spacer = QuestieOptionsUtils:Spacer(4.5,nil,"minimal"),
tooltip_options_group = {
type = "group",
order = 5,
inline = true,
name = function() return l10n('Tooltip Options'); end,
args = {
enableTooltipsToggle = {
type = "toggle",
order = 8.1,
name = function() return l10n('Enable World Tooltips'); end,
desc = function() return l10n('When this is enabled, quest info will be added to relevant mob/item tooltips.'); end,
width = 1.5,
get = function () return Questie.db.profile.enableTooltips; end,
set = function (_, value) Questie.db.profile.enableTooltips = value end
},
questsInNpcTooltip = {
type = "toggle",
order = 8.2,
name = function() return l10n('Show quests in NPC tooltips'); end,
desc = function() return l10n('Show quests (available/complete) in the NPC tooltips.'); end,
width = 1.5,
disabled = function() return not Questie.db.profile.enableTooltips; end,
get = function () return Questie.db.profile.showQuestsInNpcTooltip; end,
set = function (_, value) Questie.db.profile.showQuestsInNpcTooltip = value end
},
showQuestLevels = {
type = "toggle",
order = 8.3,
name = function() return l10n('Show quest level in tooltips'); end,
desc = function() return l10n('When this is checked, the level of quests will show in the tooltips.'); end,
width = 1.5,
get = function() return Questie.db.profile.enableTooltipsQuestLevel; end,
set = function (_, value)
Questie.db.profile.enableTooltipsQuestLevel = value
if value and not Questie.db.profile.trackerShowQuestLevel then
Questie.db.profile.trackerShowQuestLevel = true
QuestieTracker:Update()
end
end
},
questXpAtMaxLevel = {
type = "toggle",
order = 8.4,
name = function() return l10n('Show quest XP at max level'); end,
desc = function() return l10n('Shows the quest XP values on quests even at max level.'); end,
width = 1.5,
get = function () return Questie.db.profile.showQuestXpAtMaxLevel; end,
set = function (_, value) Questie.db.profile.showQuestXpAtMaxLevel = value end
},
showNextInChain = {
type = "toggle",
order = 8.5,
name = function() return l10n('Show next quests in chain'); end,
desc = function() return l10n('When this is checked, the next quests in the chain will show in the expanded map tooltips.'); end,
width = 1.5,
get = function() return Questie.db.profile.enableTooltipsNextInChain; end,
set = function (_, value)
Questie.db.profile.enableTooltipsNextInChain = value
end
},
partyOnlyToggle = {
type = "toggle",
order = 8.6,
name = function() return l10n('Only show party members'); end,
desc = function() return l10n('When this is enabled, shared quest info will only show players in your party.'); end,
width = 1.5,
hidden = true, -- does this even do anything anymore after YELL removed?
get = function () return Questie.db.profile.onlyPartyShared; end,
set = function (_, value) Questie.db.profile.onlyPartyShared = value end
},
},
},
sound_spacer = QuestieOptionsUtils:Spacer(5.5,nil,"minimal"),
sound_options_group = {
type = "group",
order = 6,
inline = true,
name = function() return l10n('Sound Options'); end,
args = {
questCompleteSound = {
type = "toggle",
order = 9.01,
name = function() return l10n('Quest completed'); end,
desc = function() return l10n('Play a short sound when completing a quest when it is ready to turn in.'); end,
width = 1.2,
get = function() return Questie.db.profile.soundOnQuestComplete; end,
set = function(_, value)
Questie.db.profile.soundOnQuestComplete = value
end,
},
questCompleteSoundButton = {
type = "execute",
order = 9.02,
name = "",
width = 0.5,
image = function()
return "Interface\\OptionsFrame\\VoiceChat-Play", 15, 15
end,
func = function()
PlaySoundFile(Sounds.GetSelectedSoundFile(Questie.db.profile.questCompleteSoundChoiceName), "Master")
end
},
questCompleteSoundChoice = {
type = "select",
order = 9.03,
values = _GetQuestSoundChoices(),
sorting = _GetQuestSoundChoicesSort(),
style = 'dropdown',
name = function() return l10n('Quest Complete Sound Selection') end,
desc = function() return l10n('The sound you hear when a quest is completed'); end,
get = function() return Questie.db.profile.questCompleteSoundChoiceName or "None"; end,
disabled = function() return (not Questie.db.profile.soundOnQuestComplete); end,
set = function(_, value)
Questie.db.profile.questCompleteSoundChoiceName = value
end,
},
soundLineBreak = {
type = "description",
name = " ",
width = 0.1,
order = 9.04,
},
objectiveCompleteSound = {
type = "toggle",
order = 9.05,
name = function() return l10n('Quest objective completed'); end,
desc = function() return l10n('Play a short sound when completing a quest objective.'); end,
width = 1.2,
get = function() return Questie.db.profile.soundOnObjectiveComplete; end,
set = function(_, value)
Questie.db.profile.soundOnObjectiveComplete = value
end,
},
objectiveCompleteSoundButton = {
type = "execute",
order = 9.06,
name = "",
width = 0.5,
image = function()
return "Interface\\OptionsFrame\\VoiceChat-Play", 15, 15
end,
func = function()
PlaySoundFile(Sounds.GetSelectedSoundFile(Questie.db.profile.objectiveCompleteSoundChoiceName), "Master")
end
},
objectiveCompleteSoundChoice = {
type = "select",
order = 9.07,
values = _GetObjectiveSoundChoices(),
sorting = _GetObjectiveSoundChoicesSort(),
style = 'dropdown',
name = function() return l10n('Objective Complete Sound Selection') end,
desc = function() return l10n('The sound you hear when an objective is completed'); end,
get = function() return Questie.db.profile.objectiveCompleteSoundChoiceName; end,
disabled = function() return (not Questie.db.profile.soundOnObjectiveComplete); end,
set = function(_, value)
Questie.db.profile.objectiveCompleteSoundChoiceName = value
end,
},
objectiveProgressSound = {
type = "toggle",
order = 9.08,
name = function() return l10n('Quest objective progress'); end,
desc = function() return l10n('Play a short sound when making progress on a quest objective.'); end,
width = 1.2,
get = function() return Questie.db.profile.soundOnObjectiveProgress; end,
set = function(_, value)
Questie.db.profile.soundOnObjectiveProgress = value
end,
},
objectiveProgressSoundButton = {
type = "execute",
order = 9.09,
name = "",
width = 0.5,
image = function()
return "Interface\\OptionsFrame\\VoiceChat-Play", 15, 15
end,
func = function()
PlaySoundFile(Sounds.GetSelectedSoundFile(Questie.db.profile.objectiveProgressSoundChoiceName), "Master")
end
},
objectiveProgressSoundChoice = {
type = "select",
order = 9.10,
values = _GetObjectiveProgressSoundChoices(),
sorting = _GetObjectiveProgressSoundChoicesSort(),
style = 'dropdown',
name = function() return l10n('Objective Progress Sound Selection') end,
desc = function() return l10n('The sound you hear when you make progress on a quest objective'); end,
get = function() return Questie.db.profile.objectiveProgressSoundChoiceName; end,
disabled = function() return (not Questie.db.profile.soundOnObjectiveProgress); end,
set = function(_, value)
Questie.db.profile.objectiveProgressSoundChoiceName = value
end,
},
},
},
},
}
end
_GetAnnounceChannels = function()
return {
['disabled'] = l10n('Disabled'),
['party'] = l10n('Party'),
['raid'] = l10n('Raid'),
['both'] = l10n('Both'),
}
end
---@return boolean
_IsAnnounceDisabled = function()
return (not Questie.db.profile.questAnnounceChannel) or (Questie.db.profile.questAnnounceChannel == "disabled")
end
_GetQuestSoundChoices = function()
return {
["QuestDefault"] = "Default",
["GameDefault"] = "Game Default",
["Troll Male"] = "Troll Male",
["Troll Female"] = "Troll Female",
["Tauren Male"] = "Tauren Male",
["Tauren Female"] = "Tauren Female",
["Undead Male"] = "Undead Male",
["Undead Female"] = "Undead Female",
["Orc Male"] = "Orc Male",
["Orc Female"] = "Orc Female",
["Night Elf Female"] = "Night Elf Female",
["Night Elf Male"] = "Night Elf Male",
["Human Female"] = "Human Female",
["Human Male"] = "Human Male",
["Gnome Male"] = "Gnome Male",
["Gnome Female"] = "Gnome Female",
["Dwarf Male"] = "Dwarf Male",
["Dwarf Female"] = "Dwarf Female",
["Draenei Male"] = "Draenei Male",
["Draenei Female"] = "Draenei Female",
["Blood Elf Female"] = "Blood Elf Female",
["Blood Elf Male"] = "Blood Elf Male",
}
end
_GetQuestSoundChoicesSort = function()
return {
"QuestDefault",
"GameDefault",
"Troll Male",
"Troll Female",
"Tauren Male",
"Tauren Female",
"Undead Male",
"Undead Female",
"Orc Male",
"Orc Female",
"Night Elf Female",
"Night Elf Male",
"Human Female",
"Human Male",
"Gnome Male",
"Gnome Female",
"Dwarf Male",
"Dwarf Female",
"Draenei Male",
"Draenei Female",
"Blood Elf Female",
"Blood Elf Male",
}
end
_GetObjectiveSoundChoices = function()
local choices = {
["ObjectiveDefault"] = "Default",
["Map Ping"] = "Map Ping",
["Window Close"] = "Window Close",
["Window Open"] = "Window Open",
["Boat Docked"] = "Boat Docked",
["Bell Toll Alliance"] = "Bell Toll Alliance",
["Bell Toll Horde"] = "Bell Toll Horde",
}
if Questie.IsWotlk or QuestieCompat.Is335 then
choices["Explosion"] = "Explosion"
choices["Shing!"] = "Shing!"
choices["Wham!"] = "Wham!"
choices["Simon Chime"] = "Simon Chime"
choices["War Drums"] = "War Drums"
choices["Humm"] = "Humm"
choices["Short Circuit"] = "Short Circuit"
end
return choices
end
_GetObjectiveSoundChoicesSort = function()
local sorting = {
"ObjectiveDefault",
"Map Ping",
"Window Close",
"Window Open",
"Boat Docked",
"Bell Toll Alliance",
"Bell Toll Horde",
}
if Questie.IsWotlk or QuestieCompat.Is335 then
tinsert(sorting, "Explosion")
tinsert(sorting, "Shing!")
tinsert(sorting, "Wham!")
tinsert(sorting, "Simon Chime")
tinsert(sorting, "War Drums")
tinsert(sorting, "Humm")
tinsert(sorting, "Short Circuit")
end
return sorting
end
_GetObjectiveProgressSoundChoices = function()
local choices = {
["ObjectiveProgress"] = "Default",
["ObjectiveDefault"] = "Objective Complete",
["Map Ping"] = "Map Ping",
["Window Close"] = "Window Close",
["Window Open"] = "Window Open",
["Boat Docked"] = "Boat Docked",
["Bell Toll Alliance"] = "Bell Toll Alliance",
["Bell Toll Horde"] = "Bell Toll Horde",
}
if Questie.IsWotlk or QuestieCompat.Is335 then
choices["Explosion"] = "Explosion"
choices["Shing!"] = "Shing!"
choices["Wham!"] = "Wham!"
choices["Simon Chime"] = "Simon Chime"
choices["War Drums"] = "War Drums"
choices["Humm"] = "Humm"
choices["Short Circuit"] = "Short Circuit"
end
return choices
end
_GetObjectiveProgressSoundChoicesSort = function()
local sorting = {
"ObjectiveProgress",
"ObjectiveDefault",
"Map Ping",
"Window Close",
"Window Open",
"Boat Docked",
"Bell Toll Alliance",
"Bell Toll Horde",
}
if Questie.IsWotlk or QuestieCompat.Is335 then
tinsert(sorting, "Explosion")
tinsert(sorting, "Shing!")
tinsert(sorting, "Wham!")
tinsert(sorting, "Simon Chime")
tinsert(sorting, "War Drums")
tinsert(sorting, "Humm")
tinsert(sorting, "Short Circuit")
end
return sorting
end
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,30 @@
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions");
---@type QuestieOptionsDefaults
local QuestieOptionsDefaults = QuestieLoader:ImportModule("QuestieOptionsDefaults");
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils");
---@type QuestieFramePool
local QuestieFramePool = QuestieLoader:ImportModule("QuestieFramePool");
---@type QuestieCoords
local QuestieCoords = QuestieLoader:ImportModule("QuestieCoords");
---@type QuestieMap
local QuestieMap = QuestieLoader:ImportModule("QuestieMap");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
---@type WorldMapButton
local WorldMapButton = QuestieLoader:ImportModule("WorldMapButton")
QuestieOptions.tabs.map = {...}
local optionsDefaults = QuestieOptionsDefaults:Load()
function QuestieOptions.tabs.map:Initialize()
return {
name = function() return l10n('Map'); end,
type = "group",
order = 12,
args = {
},
}
end
@@ -0,0 +1,31 @@
-------------------------
--Import modules.
-------------------------
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions");
---@type QuestieOptionsDefaults
local QuestieOptionsDefaults = QuestieLoader:ImportModule("QuestieOptionsDefaults");
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils");
---@type QuestieFramePool
local QuestieFramePool = QuestieLoader:ImportModule("QuestieFramePool");
---@type QuestieCoords
local QuestieCoords = QuestieLoader:ImportModule("QuestieCoords");
---@type QuestieMap
local QuestieMap = QuestieLoader:ImportModule("QuestieMap");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
QuestieOptions.tabs.minimap = {...}
local optionsDefaults = QuestieOptionsDefaults:Load()
function QuestieOptions.tabs.minimap:Initialize()
return {
name = function() return l10n('Minimap'); end,
type = "group",
order = 11,
args = {
},
}
end
@@ -0,0 +1,320 @@
-------------------------
--Import modules.
-------------------------
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions");
---@type QuestieOptionsDefaults
local QuestieOptionsDefaults = QuestieLoader:ImportModule("QuestieOptionsDefaults");
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils");
---@type QuestieNameplate
local QuestieNameplate = QuestieLoader:ImportModule("QuestieNameplate");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
QuestieOptions.tabs.nameplate = {...}
local optionsDefaults = QuestieOptionsDefaults:Load()
function QuestieOptions.tabs.nameplate:Initialize()
return {
name = function() return l10n('Nameplates'); end,
type = "group",
order = 5,
args = {
nameplate_options_group = {
type = "group",
order = 1,
inline = true,
name = " ",
args = {
nameplate_options = {
type = "header",
order = 1.05,
name = function() return l10n('Nameplate Icon Options'); end,
},
nameplateDescSpacer = {
type = "description",
order = 1.06,
name = "",
desc = "",
image = "",
imageWidth = 0.4,
width = 0.4,
func = function() end,
},
nameplateEnabled = {
type = "toggle",
order = 1.1,
name = function() return l10n('Enable Nameplate Quest Objectives'); end,
desc = function() return l10n('Enable or disable the quest objective icons over creature nameplates.'); end,
descStyle = "inline",
width = 2.6,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
-- on false, hide current nameplates
if not value then
QuestieNameplate:HideCurrentFrames();
end
end,
},
Spacer_A = QuestieOptionsUtils:Spacer(1.2),
nameplateSpacerX = {
type = "description",
order = 1.25,
name = "",
desc = "",
image = "",
imageWidth = 0.3,
width = 0.3,
func = function() end,
},
nameplateX = {
type = "range",
order = 1.3,
name = function() return l10n('Icon Position X'); end,
desc = function() return l10n('Where on the X axis the nameplate icon should be. ( Default: %s )', optionsDefaults.profile.nameplateX ); end,
width = 1.2,
min = -200,
max = 200,
step = 1,
disabled = function() return not Questie.db.profile.nameplateEnabled; end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieNameplate:RedrawIcons()
QuestieOptions:SetProfileValue(info, value)
end,
},
nameplateSpacerY = {
type = "description",
order = 1.35,
name = "",
desc = "",
image = "",
imageWidth = 0.3,
width = 0.3,
func = function() end,
},
nameplateY = {
type = "range",
order = 1.4,
name = function() return l10n('Icon Position Y'); end,
desc = function() return l10n('Where on the Y axis the nameplate icon should be. ( Default: %s )', optionsDefaults.profile.nameplateY); end,
width = 1.2,
min = -200,
max = 200,
step = 1,
disabled = function() return not Questie.db.profile.nameplateEnabled; end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieNameplate:RedrawIcons()
QuestieOptions:SetProfileValue(info, value)
end,
},
Spacer_C = QuestieOptionsUtils:Spacer(1.45),
nameplateSpacerScale = {
type = "description",
order = 1.46,
name = "",
desc = "",
image = "",
imageWidth = 0.3,
width = 0.3,
func = function() end,
},
nameplateScale = {
type = "range",
order = 1.5,
name = function() return l10n('Nameplate Icon Scale'); end,
desc = function() return l10n('Scale the size of the quest icons on creature nameplates. ( Default: %s )', optionsDefaults.profile.nameplateScale); end,
width = 2.7,
min = 0.01,
max = 4,
step = 0.01,
disabled = function() return not Questie.db.profile.nameplateEnabled; end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieNameplate:RedrawIcons()
end,
},
},
},
targetframe_options_group = {
type = "group",
order = 2,
inline = true,
name = " ",
args = {
targetframe_header = {
type = "header",
order = 2,
name = function() return l10n('Target Frame Icon Options'); end,
},
targetplateDescSpacer = {
type = "description",
order = 2.06,
name = "",
desc = "",
image = "",
imageWidth = 0.4,
width = 0.4,
func = function() end,
},
nameplateTargetFrameEnabled = {
type = "toggle",
order = 2.1,
name = function() return l10n('Enable Target Frame Quest Objectives'); end,
desc = function() return l10n('Enable or disable the quest objective icons over creature target frame.'); end,
descStyle = "inline",
width = 2.6,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
-- on false, hide current nameplates
if not value then
QuestieNameplate:HideCurrentTargetFrame();
else
QuestieNameplate:DrawTargetFrame();
end
end,
},
Spacer_E = QuestieOptionsUtils:Spacer(2.2),
targetframeSpacerX = {
type = "description",
order = 2.25,
name = "",
desc = "",
image = "",
imageWidth = 0.3,
width = 0.3,
func = function() end,
},
nameplateTargetFrameX = {
type = "range",
order = 2.3,
name = function() return l10n('Icon Position X'); end,
desc = function() return l10n('Where on the X axis the nameplate icon should be. ( Default: %s )', optionsDefaults.profile.nameplateTargetFrameX); end,
width = 1.2,
min = -300,
max = 300,
step = 1,
disabled = function() return not Questie.db.profile.nameplateTargetFrameEnabled; end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieNameplate:RedrawFrameIcon()
QuestieOptions:SetProfileValue(info, value)
end,
},
targetframeSpacerY = {
type = "description",
order = 2.35,
name = "",
desc = "",
image = "",
imageWidth = 0.3,
width = 0.3,
func = function() end,
},
nameplateTargetFrameY = {
type = "range",
order = 2.4,
name = function() return l10n('Icon Position Y'); end,
desc = function() return l10n('Where on the Y axis the nameplate icon should be. ( Default: %s )', optionsDefaults.profile.nameplateTargetFrameY); end,
width = 1.2,
min = -200,
max = 200,
step = 1,
disabled = function() return not Questie.db.profile.nameplateTargetFrameEnabled; end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieNameplate:RedrawFrameIcon()
QuestieOptions:SetProfileValue(info, value)
end,
},
Spacer_G = QuestieOptionsUtils:Spacer(2.45),
targetframeSpacerScale = {
type = "description",
order = 2.46,
name = "",
desc = "",
image = "",
imageWidth = 0.3,
width = 0.3,
func = function() end,
},
nameplateTargetFrameScale = {
type = "range",
order = 2.5,
name = function() return l10n('Nameplate Icon Scale'); end,
desc = function() return l10n('Scale the size of the quest icons on creature nameplates. ( Default: %s )', optionsDefaults.profile.nameplateTargetFrameScale); end,
width = 2.7,
min = 0.01,
max = 4,
step = 0.01,
disabled = function() return not Questie.db.profile.nameplateTargetFrameEnabled; end,
get = function(info) return QuestieOptions:GetProfileValue(info); end,
set = function (info, value)
QuestieOptions:SetProfileValue(info, value)
QuestieNameplate:RedrawFrameIcon()
end,
},
},
},
Spacer_end = QuestieOptionsUtils:Spacer(2.5),
resetSpacerPrefix = {
type = "description",
order = 3,
name = "",
desc = "",
image = "",
imageWidth = 0.55,
width = 0.55,
func = function() end,
},
nameplateReset = {
type = "execute",
order = 4,
name = function() return l10n('Reset Nameplates'); end,
desc = function() return l10n('Reset to default nameplate position and scale.'); end,
width = 1,
disabled = function() return not Questie.db.profile.nameplateEnabled; end,
func = function (info, value)
Questie.db.profile.nameplateX = optionsDefaults.profile.nameplateX;
Questie.db.profile.nameplateY = optionsDefaults.profile.nameplateY;
Questie.db.profile.nameplateScale = optionsDefaults.profile.nameplateScale;
QuestieNameplate:RedrawIcons();
end,
},
resetSpacerMid = {
type = "description",
order = 5,
name = "",
desc = "",
image = "",
imageWidth = 0.3,
width = 0.3,
func = function() end,
},
targetFrameReset = {
type = "execute",
order = 6,
name = function() return l10n('Reset Target Frame'); end,
desc = function() return l10n('Reset to default target frame position and scale.'); end,
width = 1,
disabled = function() return not Questie.db.profile.nameplateTargetFrameEnabled; end,
func = function (info, value)
Questie.db.profile.nameplateTargetFrameX = optionsDefaults.profile.nameplateTargetFrameX;
Questie.db.profile.nameplateTargetFrameY = optionsDefaults.profile.nameplateTargetFrameY;
Questie.db.profile.nameplateTargetFrameScale = optionsDefaults.profile.nameplateTargetFrameScale;
QuestieNameplate:RedrawFrameIcon();
end,
},
},
}
end
+156
View File
@@ -0,0 +1,156 @@
---@class QuestieOptions
local QuestieOptions = QuestieLoader:CreateModule("QuestieOptions");
-------------------------
--Import modules.
-------------------------
---@type QuestieQuest
local QuestieQuest = QuestieLoader:ImportModule("QuestieQuest");
---@type QuestieJourney
local QuestieJourney = QuestieLoader:ImportModule("QuestieJourney");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
---@type QuestieCombatQueue
local QuestieCombatQueue = QuestieLoader:ImportModule("QuestieCombatQueue")
QuestieOptions.tabs = { ... }
QuestieConfigFrame = nil
local AceGUI = LibStub("AceGUI-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
-- Forward declaration
local _CreateOptionsTable
---Initializes the frames for the options menu
function QuestieOptions:Initialize()
Questie:Debug(Questie.DEBUG_DEVELOP, "[QuestieOptions]: Initializing...")
local optionsTable = _CreateOptionsTable()
coroutine.yield()
LibStub("AceConfig-3.0"):RegisterOptionsTable("Questie", optionsTable)
AceConfigDialog:AddToBlizOptions("Questie", "Questie");
coroutine.yield()
---@type AceGUIFrame, AceGUIFrame
local configFrame = AceGUI:Create("Frame")
configFrame:Hide()
coroutine.yield()
AceConfigDialog:SetDefaultSize("Questie", 640, 700)
AceConfigDialog:Open("Questie", configFrame) -- load the options into configFrame
configFrame:SetLayout("Fill")
configFrame:EnableResize(false)
QuestieCompat.SetResizeBounds(configFrame.frame, 550, 400)
configFrame:Hide()
coroutine.yield()
local journeyButton = CreateFrame("Button", nil, configFrame.frame, "UIPanelButtonTemplate")
journeyButton:SetSize(140, 24)
journeyButton:SetPoint("TOPRIGHT", configFrame.frame, "TOPRIGHT", -50, -13)
journeyButton:SetText(l10n('My Journey'))
journeyButton:SetScript("OnClick", function()
QuestieCombatQueue:Queue(function()
QuestieJourney:ToggleJourneyWindow()
QuestieOptions:OpenConfigWindow()
end)
end)
configFrame:Hide()
coroutine.yield()
QuestieConfigFrame = configFrame
table.insert(UISpecialFrames, "QuestieConfigFrame")
Questie:Debug(Questie.DEBUG_DEVELOP, "[QuestieOptions]: Initialization done")
end
-- Generic function to hide the config frame.
function QuestieOptions:HideFrame()
if QuestieConfigFrame and QuestieConfigFrame:IsShown() then
QuestieConfigFrame:Hide();
end
end
-- Open the configuration window
function QuestieOptions:OpenConfigWindow()
if not QuestieConfigFrame:IsShown() then
PlaySound(882)
-- AceConfigDialog:Open("Questie", QuestieConfigFrame)
QuestieConfigFrame:Show()
else
QuestieConfigFrame:Hide()
end
end
-- get option value
function QuestieOptions:GetProfileValue(info)
return Questie.db.profile[info[#info]]
end
-- set option value
function QuestieOptions:SetProfileValue(info, value)
if debug and Questie.db.profile[info[#info]] ~= value then
Questie:Debug(Questie.DEBUG_SPAM, "DEBUG: global option", info[#info], "changed from '" .. tostring(Questie.db.profile[info[#info]]) .. "' to '" .. tostring(value) .. "'")
end
Questie.db.profile[info[#info]] = value
end
function QuestieOptions:ClusterRedraw()
Questie:Debug(Questie.DEBUG_INFO, "Clustering changed, redrawing!")
--Redraw clusters here
QuestieQuest:SmoothReset();
end
---@return table
_CreateOptionsTable = function()
local general_tab = QuestieOptions.tabs.general:Initialize()
coroutine.yield()
--local social_tab = QuestieOptions.tabs.social:Initialize()
--coroutine.yield()
--local minimap_tab = QuestieOptions.tabs.minimap:Initialize()
--coroutine.yield()
--local map_tab = QuestieOptions.tabs.map:Initialize()
--coroutine.yield()
local icons_tab = QuestieOptions.tabs.icons:Initialize()
coroutine.yield()
local tracker_tab = QuestieOptions.tabs.tracker:Initialize()
coroutine.yield()
local auto_tab = QuestieOptions.tabs.auto:Initialize()
coroutine.yield()
--local tooltip_tab = QuestieOptions.tabs.tooltip:Initialize()
--coroutine.yield()
--local sounds_tab = QuestieOptions.tabs.sounds:Initialize()
--coroutine.yield()
local nameplate_tab = QuestieOptions.tabs.nameplate:Initialize()
coroutine.yield()
local dbm_hud_tab = QuestieOptions.tabs.dbm:Initialize()
coroutine.yield()
local advanced_tab = QuestieOptions.tabs.advanced:Initialize()
coroutine.yield()
return {
name = "Questie",
handler = Questie,
type = "group",
childGroups = "tab",
args = {
general_tab = general_tab,
--social_tab = social_tab,
--minimap_tab = minimap_tab,
--map_tab = map_tab,
icons_tab = icons_tab,
tracker_tab = tracker_tab,
auto_tab = auto_tab,
--tooltip_tab = tooltip_tab,
--sounds_tab = sounds_tab,
nameplate_tab = nameplate_tab,
dbm_hud_tab = dbm_hud_tab,
advanced_tab = advanced_tab,
profiles_tab = LibStub("AceDBOptions-3.0"):GetOptionsTable(Questie.db)
}
}
end
+217
View File
@@ -0,0 +1,217 @@
---@class QuestieOptionsDefaults
local QuestieOptionsDefaults = QuestieLoader:CreateModule("QuestieOptionsDefaults");
function QuestieOptionsDefaults:Load()
return {
profile = {
--Ascension
enableAscensionScaling = false,
ascensionScalingAsked = false,
--Ascension
clusterLevelHotzone = 50,
enableIconLimit = false,
iconLimit = 200,
availableScale = 1.2,
eventScale = 1.35,
lootScale = 1,
iconFadeLevel = 0.3,
trackerLocked = true,
monsterScale = 1,
objectScale = 1,
globalScale = 0.6,
globalMiniMapScale = 0.7,
fadeLevel = 20,
fadeOverPlayer = true,
fadeOverPlayerLevel = 0.5,
fadeOverPlayerDistance = 5,
nameplateX = -17,
nameplateY = -7,
nameplateScale = 1,
nameplateEnabled = true,
minimapCoordinatesEnabled = false,
mapCoordinatesEnabled = true,
mapCoordinatePrecision = 1,
dbmHUDEnable = false,
dbmHUDShowAlert = true,
DBMHUDRefresh = 0.03,
DBMHUDZoom = 100,
dbmHUDRadius = 3,
dbmHUDShowQuest = true,
dbmHUDShowSlay = false,
dbmHUDShowLoot = false,
dbmHUDShowInteract = true,
mapShowHideEnabled = true,
nameplateTargetFrameEnabled = true,
nameplateTargetFrameX = -30,
nameplateTargetFrameY = 25,
nameplateTargetFrameScale = 1.7,
alwaysGlowMap = true,
alwaysGlowMinimap = false,
questObjectiveColors = false,
questMinimapObjectiveColors = false,
arrowEnabled = true,
arrowScale = 1,
enableObjectives = true,
enableTurnins = true,
enableAvailable = true,
hideMiniMapQuestIcons = false,
enableTooltips = true,
enableTooltipsItemID = false,
enableTooltipsNPCID = false,
enableTooltipsObjectID = false,
enableTooltipsQuestID = false,
enableTooltipsQuestLevel = true,
showQuestXpAtMaxLevel = true,
enableTooltipsNextInChain = true,
enableMapIcons = true,
enableMiniMapIcons = true,
questieShutUp = false,
bugWorkarounds = true,
hideIconsOnContinents = false,
-- Tracker Settings Tab
autoTrackQuests = true,
trackerShowCompleteQuests = true,
trackerShowQuestLevel = true,
collapseCompletedQuests = false,
hideCompletedQuestObjectives = false,
hideBlizzardCompletionText = false,
hideCompletedAchieveObjectives = true,
showBlizzardQuestTimer = false,
trackerHeaderEnabled = true,
moveHeaderToBottom = false,
stickyDurabilityFrame = false,
hideTrackerInCombat = false,
hideTrackerInDungeons = true,
trackerFadeMinMaxButtons = false,
trackerFadeQuestItemButtons = false,
trackerBackdropEnabled = false,
currentBackdropEnabled = false,
trackerBorderEnabled = false,
currentBorderEnabled = false,
trackerBackdropFader = false,
currentBackdropFader = false,
sizerHidden = false,
listAchievementsFirst = false,
stickyVoiceOverFrame = false,
alwaysShowTracker = false,
trackerColorObjectives = 'minimal',
trackerSortObjectives = 'byZone',
trackerbindSetTomTom = 'ctrlleft',
trackerbindOpenQuestLog = 'left',
trackerbindUntrack = "shiftleft",
trackerSetpoint = "TOPLEFT",
trackerFontSizeHeader = 12,
trackerFontHeader = 'Friz Quadrata TT',
trackerFontSizeZone = 12,
trackerFontZone = 'Friz Quadrata TT',
trackerFontSizeQuest = 10,
trackerFontQuest = 'Friz Quadrata TT',
trackerFontSizeObjective = 10,
trackerFontObjective = 'Friz Quadrata TT',
trackerQuestPadding = 4,
trackerFontOutline = "None",
trackerBackdropAlpha = 1,
trackerHeightRatio = 0.50,
lowLevelStyle = 1, -- Questie.LOWLEVEL_NONE
manualLevelOffset = 7,
minLevelFilter = 1,
maxLevelFilter = 10,
enabled = true,
searchType = 1,
autoaccept = false,
autocomplete = false,
autoModifier = "shift",
acceptTrivial = false,
questAnnounceChannel = "party",
questAnnounceItems = true,
questAnnounceAccepted = false,
questAnnounceAbandoned = false,
questAnnounceObjectives = true,
questAnnounceCompleted = false,
questAnnounceLocally = false,
hideUnexploredMapIcons = false,
hideUntrackedQuestsMapIcons = false,
showRepeatableQuests = true,
showEventQuests = true,
showDungeonQuests = true,
showRaidQuests = true,
showPvPQuests = true,
showAQWarEffortQuests = false,
showSoDRunes = false,
showRunesOfPhase = {
phase1 = false,
phase2 = false,
phase3 = false,
phase4 = false,
},
showQuestsInNpcTooltip = true,
trackerEnabled = true,
ldbDisplayText = "Questie",
enableQuestFrameIcons = true,
soundOnQuestComplete = false,
questCompleteSoundChoiceName = "QuestDefault",
soundOnObjectiveComplete = false,
objectiveCompleteSoundChoiceName = "ObjectiveDefault",
soundOnObjectiveProgress = false,
objectiveProgressSoundChoiceName = "ObjectiveProgress",
iconTheme = "questie",
minimap = {
hide = false
},
TrackerWidth = 0,
TrackerHeight = 0,
townsfolkConfig = {
["Repair"] = false,
["Innkeeper"] = true,
["Class Trainer"] = false,
["Banker"] = false,
["Spirit Healer"] = false,
["Flight Master"] = true,
["Battlemaster"] = false,
["Weapon Master"] = false,
["Mailbox"] = true,
["Auctioneer"] = false,
["Meeting Stones"] = true,
["Reagents"] = false,
},
-- Migration
migrationVersion = 0,
globalMigrationSteps = {},
debugEnabled = false,
debugEnabledPrint = false,
debugLevel = 0,
skipValidation = false,
},
char = {
complete = {},
hidden = {},
hiddenDailies = {
nhc = {},
hc = {},
cooking = {},
fishing = {},
pvp = {},
},
journey = {},
isTrackerExpanded = true,
},
global = {
-- TBC Isle of Quel'Danas
isleOfQuelDanasPhase = 1,
isIsleOfQuelDanasPhaseReminderDisabled = false,
--
lastDailyRequestResetTime = 0,
lastDailyRequestDate = "",
questieLocale = 'enUS',
questieLocaleDiff = false,
sod = {}, -- Special place for the SoD database
}
}
end
+54
View File
@@ -0,0 +1,54 @@
---@class QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:CreateModule("QuestieOptionsUtils");
--- Creates a vertical spacer with the given height
---@param order number
---@param hidden boolean?
---@param fontSize string?
function QuestieOptionsUtils:Spacer(order, hidden, fontSize)
local name = " "
if fontSize == "small" or fontSize == "medium" or fontSize == "large" then
fontSize = fontSize
elseif fontSize == "minimal" then
name = "" -- removing the space from name reduces the height further, but still larger than nothing
fontSize = "small"
else
fontSize = "large"
end
return {
type = "description",
order = order,
hidden = hidden,
name = name,
fontSize = fontSize,
}
end
--- Creates a horizonal spacer with the given width.
---@param order number
---@param width number?
---@param hidden boolean?
function QuestieOptionsUtils:HorizontalSpacer(order, width, hidden)
if not width then
width = 0.5
end
return {
type = "description",
order = order,
name = " ",
width = width,
hidden = hidden,
}
end
local _optionsTimer = nil;
function QuestieOptionsUtils:Delay(time, func, message)
if(_optionsTimer) then
Questie:CancelTimer(_optionsTimer, true)
_optionsTimer = nil;
end
_optionsTimer = Questie:ScheduleTimer(function()
func()
Questie:Debug(Questie.DEBUG_DEVELOP, message)
end, time)
end
@@ -0,0 +1,181 @@
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions")
---@type QuestieOptionsDefaults
local QuestieOptionsDefaults = QuestieLoader:ImportModule("QuestieOptionsDefaults")
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils");
---@type QuestieShutUp
local QuestieShutUp = QuestieLoader:ImportModule("QuestieShutUp")
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
QuestieOptions.tabs.social = {...}
local optionsDefaults = QuestieOptionsDefaults:Load()
local _GetAnnounceChannels
local _IsAnnounceDisabled
function QuestieOptions.tabs.social:Initialize()
return {
name = function() return l10n("Social"); end,
type = "group",
order = 10,
args = {
social_header = {
type = "header",
order = 1,
name = function() return l10n("Social Options"); end,
},
questAnnounceEvents = {
type = "group",
order = 2,
inline = true,
name = function() return l10n('Announce quest updates via chat') end,
args = {
filterQuestieAnnounce = {
type = "toggle",
order = 1,
name = function() return l10n('Questie ShutUp!'); end,
desc = function() return l10n('Remove all Questie chat messages coming from other players and disable sending your own.'); end,
disabled = function() return false end,
width = 1.7,
get = function () return Questie.db.profile.questieShutUp end,
set = function (_, value)
Questie.db.profile.questieShutUp = value
QuestieShutUp:ToggleFilters(value)
end,
},
questAnnounceChannel = {
type = "select",
order = 2,
values = _GetAnnounceChannels(),
style = 'dropdown',
disabled = function() return Questie.db.profile.questieShutUp end,
name = function() return l10n('Channels to announce in') end,
desc = function() return l10n('Announce quest updates to other players in your group'); end,
get = function() return Questie.db.profile.questAnnounceChannel; end,
set = function(_, key)
Questie.db.profile.questAnnounceChannel = key
Questie:Debug(Questie.DEBUG_DEVELOP, "Channels to announce changed to:", key)
end,
},
questAnnounceTypes = {
type = "group",
order = 3,
inline = true,
name = function() return l10n('Types of updates to announce in chat'); end,
args = {
questAnnounceItems = {
type = "toggle",
order = 1,
name = function() return l10n('Items starting a quest'); end,
desc = function() return l10n('Announce looted items that start a quest to other players'); end,
width = 1.5,
disabled = function() return _IsAnnounceDisabled(); end,
get = function () return Questie.db.profile.questAnnounceItems; end,
set = function (_, value)
Questie.db.profile.questAnnounceItems = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Items starting a quest changed to:", value)
end,
},
questAnnounceAccepted = {
type = "toggle",
order = 2,
name = function() return l10n('Quest accepted'); end,
desc = function() return l10n('Announce quest acceptance to other players'); end,
width = 1.5,
disabled = function() return _IsAnnounceDisabled() or Questie.db.profile.questieShutUp; end,
get = function () return Questie.db.profile.questAnnounceAccepted; end,
set = function (_, value)
Questie.db.profile.questAnnounceAccepted = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Quest accepted announce changed to:", value)
end,
},
questAnnounceAbandoned = {
type = "toggle",
order = 3,
name = function() return l10n('Quest abandoned'); end,
desc = function() return l10n('Announce quest abortion to other players'); end,
width = 1.5,
disabled = function() return _IsAnnounceDisabled() or Questie.db.profile.questieShutUp; end,
get = function () return Questie.db.profile.questAnnounceAbandoned; end,
set = function (_, value)
Questie.db.profile.questAnnounceAbandoned = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Quest abandoned announce changed to:", value)
end,
},
questAnnounceObjectives = {
type = "toggle",
order = 4,
name = function() return l10n('Objective completed'); end,
desc = function() return l10n('Announce completed objectives to other players'); end,
width = 1.5,
disabled = function() return _IsAnnounceDisabled() or Questie.db.profile.questieShutUp; end,
get = function () return Questie.db.profile.questAnnounceObjectives; end,
set = function (_, value)
Questie.db.profile.questAnnounceObjectives = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Objective completed announce changed to:", value)
end,
},
questAnnounceCompleted = {
type = "toggle",
order = 5,
name = function() return l10n('Quest completed'); end,
desc = function() return l10n('Announce quest completion to other players'); end,
width = 1.5,
disabled = function() return _IsAnnounceDisabled() or Questie.db.profile.questieShutUp; end,
get = function () return Questie.db.profile.questAnnounceCompleted; end,
set = function (_, value)
Questie.db.profile.questAnnounceCompleted = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Quest completed announce changed to:", value)
end,
},
},
},
shareQuestsNearby = {
type = "toggle",
order = 4,
name = function() return l10n('Share quest progress with nearby players'); end,
desc = function() return l10n("Your quest progress will be periodically sent to nearby players. Disabling this doesn't affect sharing progress with party members."); end,
disabled = function() return false end,
width = 1.7,
get = function () return not Questie.db.profile.disableYellComms end,
set = function (info, value)
Questie.db.profile.disableYellComms = not value
if not value then
QuestieLoader:ImportModule("QuestieComms"):RemoveAllRemotePlayers()
end
end,
},
printLocalMessages = {
type = "toggle",
order = 5,
name = function() return l10n('Display announcements locally when outside of a group'); end,
desc = function() return l10n("Questie will print your progress messages to chat when not in a group. Other players will NOT be able to see this."); end,
disabled = function() return Questie.db.profile.questieShutUp end,
width = 2.5,
get = function () return Questie.db.profile.questAnnounceLocally end,
set = function (_, value)
Questie.db.profile.questAnnounceLocally = value
Questie:Debug(Questie.DEBUG_DEVELOP, "Quest announce locally changed to:", value)
end,
},
},
},
}
}
end
_GetAnnounceChannels = function()
return {
['disabled'] = l10n('Disabled'),
['party'] = l10n('Party'),
['raid'] = l10n('Raid'),
['both'] = l10n('Both'),
}
end
---@return boolean
_IsAnnounceDisabled = function()
return (not Questie.db.profile.questAnnounceChannel) or (Questie.db.profile.questAnnounceChannel == "disabled")
end
@@ -0,0 +1,292 @@
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions")
---@type Sounds
local Sounds = QuestieLoader:ImportModule("Sounds")
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
local tinsert = table.insert
local _GetQuestSoundChoices
local _GetQuestSoundChoicesSort
local _GetObjectiveSoundChoices
local _GetObjectiveSoundChoicesSort
local _GetObjectiveProgressSoundChoices
local _GetObjectiveProgressSoundChoicesSort
QuestieOptions.tabs.sounds = {...}
function QuestieOptions.tabs.sounds:Initialize()
return {
name = function()
return l10n('Sounds');
end,
type = "group",
order = 17,
args = {
questCompleteSound = {
type = "toggle",
order = 2.11,
name = function() return l10n('Quest completed'); end,
desc = function() return l10n('Play a short sound when completing a quest when it is ready to turn in.'); end,
width = 1.2,
get = function() return Questie.db.profile.soundOnQuestComplete; end,
set = function(_, value)
Questie.db.profile.soundOnQuestComplete = value
end,
},
questCompleteSoundButton = {
type = "execute",
order = 2.12,
name = "",
width = 0.5,
image = function()
return "Interface\\OptionsFrame\\VoiceChat-Play", 15, 15
end,
func = function()
PlaySoundFile(Sounds.GetSelectedSoundFile(Questie.db.profile.questCompleteSoundChoiceName), "Master")
end
},
questCompleteSoundChoice = {
type = "select",
order = 2.13,
values = _GetQuestSoundChoices(),
sorting = _GetQuestSoundChoicesSort(),
style = 'dropdown',
name = function() return l10n('Quest Complete Sound Selection') end,
desc = function() return l10n('The sound you hear when a quest is completed'); end,
get = function() return Questie.db.profile.questCompleteSoundChoiceName or "None"; end,
disabled = function() return (not Questie.db.profile.soundOnQuestComplete); end,
set = function(_, value)
Questie.db.profile.questCompleteSoundChoiceName = value
end,
},
soundLineBreak = {
type = "description",
name = " ",
width = 0.1,
order = 2.135,
},
objectiveCompleteSound = {
type = "toggle",
order = 2.14,
name = function() return l10n('Quest objective completed'); end,
desc = function() return l10n('Play a short sound when completing a quest objective.'); end,
width = 1.2,
get = function() return Questie.db.profile.soundOnObjectiveComplete; end,
set = function(_, value)
Questie.db.profile.soundOnObjectiveComplete = value
end,
},
objectiveCompleteSoundButton = {
type = "execute",
order = 2.15,
name = "",
width = 0.5,
image = function()
return "Interface\\OptionsFrame\\VoiceChat-Play", 15, 15
end,
func = function()
PlaySoundFile(Sounds.GetSelectedSoundFile(Questie.db.profile.objectiveCompleteSoundChoiceName), "Master")
end
},
objectiveCompleteSoundChoice = {
type = "select",
order = 2.16,
values = _GetObjectiveSoundChoices(),
sorting = _GetObjectiveSoundChoicesSort(),
style = 'dropdown',
name = function() return l10n('Objective Complete Sound Selection') end,
desc = function() return l10n('The sound you hear when an objective is completed'); end,
get = function() return Questie.db.profile.objectiveCompleteSoundChoiceName; end,
disabled = function() return (not Questie.db.profile.soundOnObjectiveComplete); end,
set = function(_, value)
Questie.db.profile.objectiveCompleteSoundChoiceName = value
end,
},
objectiveProgressSound = {
type = "toggle",
order = 2.17,
name = function() return l10n('Quest objective progress'); end,
desc = function() return l10n('Play a short sound when making progress on a quest objective.'); end,
width = 1.2,
get = function() return Questie.db.profile.soundOnObjectiveProgress; end,
set = function(_, value)
Questie.db.profile.soundOnObjectiveProgress = value
end,
},
objectiveProgressSoundButton = {
type = "execute",
order = 2.18,
name = "",
width = 0.5,
image = function()
return "Interface\\OptionsFrame\\VoiceChat-Play", 15, 15
end,
func = function()
PlaySoundFile(Sounds.GetSelectedSoundFile(Questie.db.profile.objectiveProgressSoundChoiceName), "Master")
end
},
objectiveProgressSoundChoice = {
type = "select",
order = 2.19,
values = _GetObjectiveProgressSoundChoices(),
sorting = _GetObjectiveProgressSoundChoicesSort(),
style = 'dropdown',
name = function() return l10n('Objective Progress Sound Selection') end,
desc = function() return l10n('The sound you hear when you make progress on a quest objective'); end,
get = function() return Questie.db.profile.objectiveProgressSoundChoiceName; end,
disabled = function() return (not Questie.db.profile.soundOnObjectiveProgress); end,
set = function(_, value)
Questie.db.profile.objectiveProgressSoundChoiceName = value
end,
},
}
}
end
_GetQuestSoundChoices = function()
return {
["QuestDefault"] = "Default",
["GameDefault"] = "Game Default",
["Troll Male"] = "Troll Male",
["Troll Female"] = "Troll Female",
["Tauren Male"] = "Tauren Male",
["Tauren Female"] = "Tauren Female",
["Undead Male"] = "Undead Male",
["Undead Female"] = "Undead Female",
["Orc Male"] = "Orc Male",
["Orc Female"] = "Orc Female",
["Night Elf Female"] = "Night Elf Female",
["Night Elf Male"] = "Night Elf Male",
["Human Female"] = "Human Female",
["Human Male"] = "Human Male",
["Gnome Male"] = "Gnome Male",
["Gnome Female"] = "Gnome Female",
["Dwarf Male"] = "Dwarf Male",
["Dwarf Female"] = "Dwarf Female",
["Draenei Male"] = "Draenei Male",
["Draenei Female"] = "Draenei Female",
["Blood Elf Female"] = "Blood Elf Female",
["Blood Elf Male"] = "Blood Elf Male",
}
end
_GetQuestSoundChoicesSort = function()
return {
"QuestDefault",
"GameDefault",
"Troll Male",
"Troll Female",
"Tauren Male",
"Tauren Female",
"Undead Male",
"Undead Female",
"Orc Male",
"Orc Female",
"Night Elf Female",
"Night Elf Male",
"Human Female",
"Human Male",
"Gnome Male",
"Gnome Female",
"Dwarf Male",
"Dwarf Female",
"Draenei Male",
"Draenei Female",
"Blood Elf Female",
"Blood Elf Male",
}
end
_GetObjectiveSoundChoices = function()
local choices = {
["ObjectiveDefault"] = "Default",
["Map Ping"] = "Map Ping",
["Window Close"] = "Window Close",
["Window Open"] = "Window Open",
["Boat Docked"] = "Boat Docked",
["Bell Toll Alliance"] = "Bell Toll Alliance",
["Bell Toll Horde"] = "Bell Toll Horde",
}
if Questie.IsWotlk or QuestieCompat.Is335 then
choices["Explosion"] = "Explosion"
choices["Shing!"] = "Shing!"
choices["Wham!"] = "Wham!"
choices["Simon Chime"] = "Simon Chime"
choices["War Drums"] = "War Drums"
choices["Humm"] = "Humm"
choices["Short Circuit"] = "Short Circuit"
end
return choices
end
_GetObjectiveSoundChoicesSort = function()
local sorting = {
"ObjectiveDefault",
"Map Ping",
"Window Close",
"Window Open",
"Boat Docked",
"Bell Toll Alliance",
"Bell Toll Horde",
}
if Questie.IsWotlk or QuestieCompat.Is335 then
tinsert(sorting, "Explosion")
tinsert(sorting, "Shing!")
tinsert(sorting, "Wham!")
tinsert(sorting, "Simon Chime")
tinsert(sorting, "War Drums")
tinsert(sorting, "Humm")
tinsert(sorting, "Short Circuit")
end
return sorting
end
_GetObjectiveProgressSoundChoices = function()
local choices = {
["ObjectiveProgress"] = "Default",
["ObjectiveDefault"] = "Objective Complete",
["Map Ping"] = "Map Ping",
["Window Close"] = "Window Close",
["Window Open"] = "Window Open",
["Boat Docked"] = "Boat Docked",
["Bell Toll Alliance"] = "Bell Toll Alliance",
["Bell Toll Horde"] = "Bell Toll Horde",
}
if Questie.IsWotlk or QuestieCompat.Is335 then
choices["Explosion"] = "Explosion"
choices["Shing!"] = "Shing!"
choices["Wham!"] = "Wham!"
choices["Simon Chime"] = "Simon Chime"
choices["War Drums"] = "War Drums"
choices["Humm"] = "Humm"
choices["Short Circuit"] = "Short Circuit"
end
return choices
end
_GetObjectiveProgressSoundChoicesSort = function()
local sorting = {
"ObjectiveProgress",
"ObjectiveDefault",
"Map Ping",
"Window Close",
"Window Open",
"Boat Docked",
"Bell Toll Alliance",
"Bell Toll Horde",
}
if Questie.IsWotlk or QuestieCompat.Is335 then
tinsert(sorting, "Explosion")
tinsert(sorting, "Shing!")
tinsert(sorting, "Wham!")
tinsert(sorting, "Simon Chime")
tinsert(sorting, "War Drums")
tinsert(sorting, "Humm")
tinsert(sorting, "Short Circuit")
end
return sorting
end
@@ -0,0 +1,75 @@
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions");
---@type QuestieTracker
local QuestieTracker = QuestieLoader:ImportModule("QuestieTracker");
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
QuestieOptions.tabs.tooltip = {...}
function QuestieOptions.tabs.tooltip:Initialize()
return {
name = function() return l10n('Tooltips'); end,
type = "group",
order = 16,
args = {
tooltip_options = {
type = "header",
order = 1,
name = function() return l10n('Tooltip Options'); end,
},
enableTooltipsToggle = {
type = "toggle",
order = 1.1,
name = function() return l10n('Enable Tooltips'); end,
desc = function() return l10n('When this is enabled, quest info will be added to relevant mob/item tooltips.'); end,
width = 1.5,
get = function () return Questie.db.profile.enableTooltips; end,
set = function (_, value) Questie.db.profile.enableTooltips = value end
},
showQuestLevels = {
type = "toggle",
order = 1.2,
name = function() return l10n('Show Quest Level in Tooltips'); end,
desc = function() return l10n('When this is checked, the level of quests will show in the tooltips.'); end,
width = 1.5,
disabled = function() return not Questie.db.profile.enableTooltips; end,
get = function() return Questie.db.profile.enableTooltipsQuestLevel; end,
set = function (_, value)
Questie.db.profile.enableTooltipsQuestLevel = value
if value and not Questie.db.profile.trackerShowQuestLevel then
Questie.db.profile.trackerShowQuestLevel = true
QuestieTracker:Update()
end
end
},
partyOnlyToggle = {
type = "toggle",
order = 1.3,
name = function() return l10n('Only show party members'); end,
desc = function() return l10n('When this is enabled, shared quest info will only show players in your party.'); end,
width = 1.5,
get = function () return Questie.db.profile.onlyPartyShared; end,
set = function (_, value) Questie.db.profile.onlyPartyShared = value end
},
questsInNpcTooltip = {
type = "toggle",
order = 1.4,
name = function() return l10n('Show quests in NPC tooltips'); end,
desc = function() return l10n('Show quests (available/complete) in the NPC tooltips.'); end,
width = 1.5,
get = function () return Questie.db.profile.showQuestsInNpcTooltip; end,
set = function (_, value) Questie.db.profile.showQuestsInNpcTooltip = value end
},
questXpAtMaxLevel = {
type = "toggle",
order = 1.5,
name = function() return l10n('Show quest XP at max level'); end,
desc = function() return l10n('Shows the quest XP values on quests even at max level.'); end,
width = 1.5,
get = function () return Questie.db.profile.showQuestXpAtMaxLevel; end,
set = function (_, value) Questie.db.profile.showQuestXpAtMaxLevel = value end
},
}
}
end
@@ -0,0 +1,967 @@
-------------------------
--Import modules.
-------------------------
---@type QuestieOptions
local QuestieOptions = QuestieLoader:ImportModule("QuestieOptions")
---@type QuestieOptionsUtils
local QuestieOptionsUtils = QuestieLoader:ImportModule("QuestieOptionsUtils")
---@type QuestieTracker
local QuestieTracker = QuestieLoader:ImportModule("QuestieTracker")
---@type TrackerBaseFrame
local TrackerBaseFrame = QuestieLoader:ImportModule("TrackerBaseFrame")
---@type TrackerLinePool
local TrackerLinePool = QuestieLoader:ImportModule("TrackerLinePool")
---@type TrackerQuestTimers
local TrackerQuestTimers = QuestieLoader:ImportModule("TrackerQuestTimers")
---@type QuestieArrow
local QuestieArrow = QuestieLoader:ImportModule("QuestieArrow")
---@type l10n
local l10n = QuestieLoader:ImportModule("l10n")
--- COMPATIBILITY ---
local C_Timer = QuestieCompat.C_Timer
QuestieOptions.tabs.tracker = { ... }
local _GetShortcuts
local trackerOptions = {}
local SharedMedia = LibStub("LibSharedMedia-3.0")
function QuestieOptions.tabs.tracker:Initialize()
trackerOptions = {
name = function() return l10n('Tracker') end,
type = "group",
order = 3,
args = {
header = {
type = "header",
order = 1,
name = function() return l10n('Tracker Options') end,
},
enableQuestieTracker = {
type = "toggle",
order = 2,
width = 1.5,
name = function() return l10n('Enable Tracker') end,
desc = function() return l10n("Enabling the Tracker will replace the default Blizzard Quest Tracker with the Questie Tracker.\n\nNOTE: Changing this setting will reload the UI.") end,
disabled = function() return InCombatLockdown() end,
get = function() return Questie.db.profile.trackerEnabled end,
set = function()
if Questie.db.profile.trackerEnabled then
QuestieTracker:Disable()
else
QuestieTracker:Enable()
end
end
},
arrowEnabled = {
type = "toggle",
order = 2.5,
width = 1.5,
name = function() return "Enable Arrow"; end,
desc = function() return "Show the QuestieArrow and auto-track the nearest objective/turn-in."; end,
get = function() return Questie.db.profile.arrowEnabled ~= false; end,
set = function(_, value)
Questie.db.profile.arrowEnabled = value
if QuestieArrow and QuestieArrow.Refresh then
if not value and QuestieArrow.ClearTarget then
QuestieArrow:ClearTarget()
end
QuestieArrow:Refresh()
end
end,
},
Space_X = QuestieOptionsUtils:HorizontalSpacer(3, 0.1),
resetTrackerLocation = {
type = "execute",
order = 4,
width = 0.8,
name = function() return l10n('Reset Tracker') end,
desc = function() return l10n("If the Questie Tracker is stuck offscreen or lost, you can reset it's location to the center of the screen with this button.") end,
disabled = function() return not Questie.db.profile.trackerEnabled or InCombatLockdown() end,
func = function()
QuestieTracker:ResetLocation()
QuestieTracker:Update()
end
},
Spacer_S = QuestieOptionsUtils:Spacer(5),
group_quests = {
type = "group",
order = 6,
inline = true,
width = 0.5,
name = function()
if Questie.IsWotlk then
return l10n("Quest and Achievement Options")
else
return l10n('Quest Options')
end
end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
args = {
autoTrackQuests = {
type = "toggle",
order = 1,
width = 1.5,
name = function() return l10n('Auto Track Quests') end,
desc = function() return l10n("This is the same as 'Enable Automatic Quest Tracking' in the Blizzard Interface Options. When enabled, the Questie Tracker will automatically track all Quests in your Quest Log. Disabling this option will untrack all Quests. You will have to manually select which Quests to track.\n\nNOTE: 'Show Complete Quests' is disabled while this option is not being used.") end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.autoTrackQuests end,
set = function(_, value)
Questie.db.profile.autoTrackQuests = value
if value then
Questie.db.char.TrackedQuests = {}
else
Questie.db.char.AutoUntrackedQuests = {}
end
-- Update Quest Log and mark tracked Quests
local questLogFrame = QuestLogExFrame or ClassicQuestLog or QuestLogFrame
if questLogFrame:IsShown() then
QuestLog_Update()
end
QuestieTracker:Update()
end
},
showQuestLevels = {
type = "toggle",
order = 2,
width = 1.5,
name = function() return l10n('Show Quest Level') end,
desc = function() return l10n('When this is checked, the Quest Level Tags for Quest Titles will show in the Questie Tracker.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerShowQuestLevel end,
set = function(_, value)
Questie.db.profile.trackerShowQuestLevel = value
QuestieTracker:Update()
end
},
showQuestTimer = {
type = "toggle",
order = 3,
width = 1.5,
name = function() return l10n('Show Blizzard Timer') end,
desc = function() return l10n('When this is checked, the default Blizzard Timer Frame for Quests will be shown instead of being embedded inside the Questie Tracker.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.showBlizzardQuestTimer end,
set = function(_, value)
Questie.db.profile.showBlizzardQuestTimer = value
if value == true then
TrackerQuestTimers:ShowBlizzardTimer()
else
TrackerQuestTimers:HideBlizzardTimer()
end
QuestieTracker:Update()
end
},
listAchievementsFirst = {
type = "toggle",
order = 4,
width = 1.5,
name = function() return l10n("List Achievements First") end,
desc = function() return l10n("When this is checked, the Questie Tracker will list Achievements first then Quests.") end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
hidden = function() return not (Questie.IsWotlk or QuestieCompat.Is335) end,
get = function() return Questie.db.profile.listAchievementsFirst end,
set = function(_, value)
Questie.db.profile.listAchievementsFirst = value
QuestieTracker:Update()
end
},
Spacer_Dropdowns = QuestieOptionsUtils:Spacer(5),
openQuestLog = {
type = "select",
order = 7,
values = _GetShortcuts(),
style = 'dropdown',
name = function()
if Questie.IsWotlk then
return l10n('Show Quest / Achievement')
else
return l10n('Show in Quest Log')
end
end,
desc = function()
if Questie.IsWotlk then
return l10n('This shortcut will open the Quest Log with the clicked Quest selected or open Achievements with the clicked Achievement selected.')
else
return l10n('This shortcut will open the Quest Log with the clicked Quest selected.')
end
end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerbindOpenQuestLog end,
set = function(_, key)
Questie.db.profile.trackerbindOpenQuestLog = key
end
},
Space_Y = QuestieOptionsUtils:HorizontalSpacer(7.1, 0.1),
untrackQuest = {
type = "select",
order = 8,
values = _GetShortcuts(),
style = 'dropdown',
name = function()
if Questie.IsWotlk then
return l10n('Untrack / Link')
else
return l10n('Untrack / Link Quest')
end
end,
desc = function()
if Questie.IsWotlk then
return l10n('This shortcut removes a Quest or an Achievement from the Questie Tracker when the chat input box is NOT visible, otherwise this will link a Quest or an Achievement to chat.')
else
return l10n('This shortcut removes a Quest from the Questie Tracker when the chat input box is NOT visible, otherwise this will link a Quest to chat.')
end
end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerbindUntrack end,
set = function(_, key)
Questie.db.profile.trackerbindUntrack = key
end
},
Spacer_Sliders = QuestieOptionsUtils:Spacer(9),
questPadding = {
type = "range",
order = 10,
name = function() return l10n('Padding Between Quests') end,
desc = function() return l10n('The amount of padding between Quests in the Questie Tracker.\n\nNOTE: Changing this setting while in Sizer Manual Mode will reset the Sizer back to Auto Mode') end,
width = 3,
min = 2,
max = 15,
step = 1,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerQuestPadding end,
set = function(_, value)
Questie.db.profile.trackerQuestPadding = value
local trackerHeightByManual = Questie.db.profile.TrackerHeight
if IsMouseButtonDown("LeftButton") and trackerHeightByManual == 0 then
QuestieTracker:Update()
elseif IsMouseButtonDown("LeftButton") and trackerHeightByManual > 0 then
Questie.db.profile.TrackerWidth = 0
Questie.db.profile.TrackerHeight = 0
QuestieTracker:Update()
end
end
},
group_tracker = {
type = "group",
order = 11,
inline = true,
width = 0.5,
name = function() return l10n('Objectives'); end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
args = {
showCompleteQuests = {
type = "toggle",
order = 1,
width = 1.5,
name = function() return l10n('Show Completed Quests') end,
desc = function() return l10n("When this is checked, completed Quests will show in the Questie Tracker.\n\nNOTE: This setting only works when 'Auto Track Quests' is enabled.") end,
disabled = function() return (not Questie.db.profile.trackerEnabled) or (not Questie.db.profile.autoTrackQuests) end,
get = function() return Questie.db.profile.trackerShowCompleteQuests end,
set = function(_, value)
Questie.db.profile.trackerShowCompleteQuests = value
QuestieTracker:Update()
end
},
collapseCompletedQuests = {
type = "toggle",
order = 2,
width = 1.5,
name = function() return l10n('Auto Minimize Completed Quests') end,
desc = function() return l10n('When this is checked, completed Quests will automatically minimize.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.collapseCompletedQuests end,
set = function(_, value)
Questie.db.profile.collapseCompletedQuests = value
if Questie.db.profile.collapseCompletedQuests == false then
Questie.db.char.collapsedQuests = {}
end
QuestieTracker:Update()
end
},
hideCompletedQuestObjectives = {
type = "toggle",
order = 3,
width = 1.5,
name = function() return l10n('Hide Completed Quest Objectives') end,
desc = function() return l10n('When this is checked, completed Quest Objectives will automatically be removed from the Questie Tracker.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.hideCompletedQuestObjectives end,
set = function(_, value)
Questie.db.profile.hideCompletedQuestObjectives = value
QuestieTracker:Update()
end
},
hideCompletedAchieveObjectives = {
type = "toggle",
order = 4,
width = 1.5,
name = function() return l10n('Hide Completed Achieve Objectives') end,
desc = function() return l10n('When this is checked, completed Achievement Objectives will automatically be removed from the Questie Tracker.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
hidden = function() return not Questie.IsWotlk end,
get = function() return Questie.db.profile.hideCompletedAchieveObjectives end,
set = function(_, value)
Questie.db.profile.hideCompletedAchieveObjectives = value
QuestieTracker:Update()
end
},
Spacer_X = QuestieOptionsUtils:Spacer(5),
colorObjectives = {
type = "select",
order = 6,
values = function()
return {
['white'] = l10n('White'),
['whiteToGreen'] = l10n('White to Green'),
['whiteAndGreen'] = l10n('White and Green'),
['redToGreen'] = l10n('Red to Green'),
['minimal'] = l10n('Minimalistic')
}
end,
style = 'dropdown',
name = function() return l10n('Objective Color') end,
desc = function() return l10n('Change the color of Objectives in the Questie Tracker by how complete they are.\n\nNOTE: The Minimalistic option will not display the "Blizzard Completion Text" and just label the Quest as either "Quest Complete!" or "Quest Failed!".') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerColorObjectives end,
set = function(_, key)
Questie.db.profile.trackerColorObjectives = key
QuestieTracker:Update()
end
},
Space_Y = QuestieOptionsUtils:HorizontalSpacer(7, 0.1),
hideBlizzardCompletionText = {
type = "toggle",
order = 8,
width = 1.5,
name = function() return l10n('Hide Blizzard Completion Text') end,
desc = function() return l10n('When this is checked, Blizzard Completion Text will be hidden for completed Quests and instead show the old Questie tags: "Quest Complete!" or "Quest Failed!"') end,
disabled = function() return not Questie.db.profile.trackerEnabled or Questie.db.profile.trackerColorObjectives == "minimal" end,
get = function() return Questie.db.profile.hideBlizzardCompletionText end,
set = function(_, value)
Questie.db.profile.hideBlizzardCompletionText = value
if Questie.db.profile.hideBlizzardCompletionText == false then
Questie.db.char.collapsedQuests = {}
end
QuestieTracker:Update()
end
},
Spacer_Z = QuestieOptionsUtils:Spacer(9),
sortObjectives = {
type = "select",
order = 10,
values = function()
return {
['byComplete'] = l10n('By %% Complete'),
['byCompleteReversed'] = l10n('By %% Complete (Reversed)'),
['byLevel'] = l10n('By Level'),
['byLevelReversed'] = l10n('By Level (Reversed)'),
['byProximity'] = l10n('By Proximity'),
['byProximityReversed'] = l10n('By Proximity (Reversed)'),
['byZone'] = l10n('By Zone'),
['byZonePlayerProximity'] = l10n('By Zone Prox'),
['byZonePlayerProximityReversed'] = l10n('By Zone Prox (Reversed)'),
}
end,
style = 'dropdown',
name = function() return l10n('Objective Sorting') end,
desc = function() return l10n('How Objectives are sorted in the Questie Tracker.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerSortObjectives end,
set = function(_, key)
Questie.db.profile.trackerSortObjectives = key
QuestieTracker:Update()
end
},
},
},
}
},
group_tracker = {
type = "group",
order = 7,
inline = true,
width = 0.5,
name = function() return l10n('Tracker Window Options'); end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
args = {
minimizeInCombat = {
type = "toggle",
order = 1,
width = 1.5,
name = function() return l10n('Minimize In Combat') end,
desc = function() return l10n('When this is checked, the Questie Tracker will automatically be minimized while entering combat.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.hideTrackerInCombat end,
set = function(_, value)
Questie.db.profile.hideTrackerInCombat = value
end
},
minimizeInDungeons = {
type = "toggle",
order = 2,
width = 1.5,
name = function() return l10n('Minimize In Dungeons') end,
desc = function() return l10n('When this is checked, the Questie Tracker will automatically be minimized when entering a dungeon.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.hideTrackerInDungeons end,
set = function(_, value)
Questie.db.profile.hideTrackerInDungeons = value
if value and IsInInstance() then
QuestieTracker:Collapse()
else
QuestieTracker:Expand()
end
end
},
fadeMinMaxButtons = {
type = "toggle",
order = 3,
width = 1.5,
name = function() return l10n('Fade Min/Max Buttons') end,
desc = function() return l10n('When this is checked, the Minimize and Maximize Buttons will fade and become transparent when not in use.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFadeMinMaxButtons end,
set = function(_, value)
Questie.db.profile.trackerFadeMinMaxButtons = value
if value == true then
local fadeTicker
local fadeTickerValue = 1
fadeTicker = C_Timer.NewTicker(0.02, function()
if fadeTickerValue <= 1 then
fadeTickerValue = fadeTickerValue - 0.05
if fadeTickerValue < 0 then
fadeTickerValue = 0
fadeTicker:Cancel()
end
if (Questie.db.char.isTrackerExpanded) then
TrackerLinePool.SetAllExpandQuestAlpha(fadeTickerValue)
end
else
fadeTickerValue:Cancel()
TrackerLinePool.SetAllExpandQuestAlpha(0)
end
end)
else
TrackerLinePool.SetAllExpandQuestAlpha(1)
end
QuestieTracker:Update()
end
},
fadeQuestItemButtons = {
type = "toggle",
order = 4,
width = 1.5,
name = function() return l10n('Fade Quest Item Buttons') end,
desc = function() return l10n('When this is checked, the Quest Item Buttons will fade and become transparent when not in use.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFadeQuestItemButtons end,
set = function(_, value)
Questie.db.profile.trackerFadeQuestItemButtons = value
if value == true then
local fadeTicker
local fadeTickerValue = 1
fadeTicker = C_Timer.NewTicker(0.02, function()
if fadeTickerValue <= 1 then
fadeTickerValue = fadeTickerValue - 0.05
if fadeTickerValue < 0 then
fadeTickerValue = 0
fadeTicker:Cancel()
end
if (Questie.db.char.isTrackerExpanded) then
TrackerLinePool.SetAllItemButtonAlpha(fadeTickerValue)
end
else
fadeTickerValue:Cancel()
TrackerLinePool.SetAllItemButtonAlpha(0)
end
end)
else
TrackerLinePool.SetAllItemButtonAlpha(1)
end
QuestieTracker:Update()
end
},
hideSizer = {
type = "toggle",
order = 5,
width = 1.5,
name = function() return l10n("Hide Tracker Sizer") end,
desc = function() return l10n("When this is checked, the Questie Tracker Sizer that appears in the bottom or top right hand corner will be hidden.") end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.sizerHidden end,
set = function(_, value)
Questie.db.profile.sizerHidden = value
QuestieTracker:UpdateFormatting()
end
},
lockTracker = {
type = "toggle",
order = 6,
width = 1.5,
name = function() return l10n("Lock Tracker") end,
desc = function() return l10n("When this is checked, the Questie Tracker is locked and you need to hold CTRL when you want to move it.") end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerLocked end,
set = function(_, value)
Questie.db.profile.trackerLocked = value
TrackerBaseFrame:Update()
end
},
stickyDurabilityFrame = {
type = "toggle",
order = 7,
width = 1.5,
name = function() return l10n('Sticky Durability Frame') end,
desc = function() return l10n('When this is checked, the durability frame will be placed on the left or right side of the Questie Tracker depending on where the Tracker is placed on your screen.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.stickyDurabilityFrame end,
set = function(_, value)
Questie.db.profile.stickyDurabilityFrame = value
if value == false then
QuestieTracker:ResetDurabilityFrame()
end
QuestieTracker:Update()
end
},
stickyVoiceOverFrame = {
type = "toggle",
order = 8,
width = 1.5,
name = function() return l10n("Sticky VoiceOver Frame") end,
desc = function() return l10n("When this is checked, the VoiceOver talking head / sound queue frame will be placed on the left or right side of the Questie Tracker depending on where the Tracker is placed on your screen.") end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
hidden = function() return not (IsAddOnLoaded("AI_VoiceOver") and IsAddOnLoaded("AI_VoiceOverData_Vanilla")) end,
get = function() return Questie.db.profile.stickyVoiceOverFrame end,
set = function(_, value)
Questie.db.profile.stickyVoiceOverFrame = value
if value == false then
QuestieTracker:ResetVoiceOverFrame()
end
QuestieTracker:Update()
end
},
Spacer_Dropdowns = QuestieOptionsUtils:Spacer(9),
setTomTom = {
type = "select",
order = 10,
values = _GetShortcuts(),
style = 'dropdown',
name = function() return l10n('Set |cFF54e33bTomTom|r Target') end,
desc = function()
if Questie.IsWotlk then
return l10n('This shortcut will set the TomTom arrow to point to either an NPC or the first incomplete Quest Objective (if location data is available).\n\nNOTE: This will not work with Achievements.')
else
return l10n('This shortcut will set the TomTom arrow to point to either an NPC or the first incomplete Quest Objective (if location data is available).')
end
end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
hidden = function() return not IsAddOnLoaded("TomTom") end,
get = function() return Questie.db.profile.trackerbindSetTomTom end,
set = function(_, key)
Questie.db.profile.trackerbindSetTomTom = key
end
},
trackerSetpoint = {
type = "select",
order = 11,
values = function()
return {
["TOPLEFT"] = l10n('Down & Right'),
["BOTTOMLEFT"] = l10n('Up & Right'),
["TOPRIGHT"] = l10n('Down & Left'),
["BOTTOMRIGHT"] = l10n('Up & Left'),
}
end,
style = 'dropdown',
name = function() return l10n('Tracker Growth Direction') end,
desc = function()
return l10n("This determines the direction in which the Questie Tracker grows when you add or remove Quests. For example, if you use the 'Up & Right' option then the ideal place for the Tracker should be in the lower left-hand corner of your screen. This allows the 'Sizer Mode: Auto' to push the Tracker Height and Width 'Up & Right' so the Tracker doesn't inadvertently cover up elements of your UI.")
end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerSetpoint end,
set = function(_, key)
Questie.db.profile.trackerSetpoint = key
QuestieTracker:ResetLocation()
QuestieTracker:Update()
end
},
Spacer_Sliders = QuestieOptionsUtils:Spacer(12),
trackerHeightRatio = {
type = "range",
order = 13,
name = function() return l10n('Tracker Height Ratio') end,
desc = function() return l10n('The height of the Questie Tracker based on percentage of usable screen height. A setting of 100 percent would make the Tracker fill the players entire screen height.\n\nNOTE: This setting only applies while in Sizer Mode: Auto') end,
width = 3,
min = 20,
max = 100,
step = 1,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerHeightRatio * 100 end,
set = function(_, value)
Questie.db.profile.trackerHeightRatio = value / 100
if IsMouseButtonDown("LeftButton") and Questie.db.profile.TrackerHeight == 0 then
TrackerBaseFrame.isSizing = true
Questie.db.profile.trackerBackdropEnabled = true
Questie.db.profile.trackerBorderEnabled = true
Questie.db.profile.trackerBackdropFader = false
QuestieTracker:UpdateFormatting()
else
TrackerBaseFrame.isSizing = false
Questie.db.profile.trackerBackdropEnabled = Questie.db.profile.currentBackdropEnabled
Questie.db.profile.trackerBorderEnabled = Questie.db.profile.currentBorderEnabled
Questie.db.profile.trackerBackdropFader = Questie.db.profile.currentBackdropFader
QuestieTracker:UpdateFormatting()
end
end
},
group_header = {
type = "group",
order = 14,
inline = true,
width = 0.5,
name = function() return l10n('Tracker Header') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
args = {
enableHeader = {
type = "toggle",
order = 1,
width = 1.5,
name = function() return l10n("Enable Tracker Header") end,
desc = function() return l10n("When this is enabled the Tracker Header with the number of active quests and the Questie Icon will be permanently visible.\n\nWhen this is disabled the Questie Icon will fade in while your mouse is over the Tracker.") end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerHeaderEnabled end,
set = function(_, value)
Questie.db.profile.trackerHeaderEnabled = value
QuestieTracker:UpdateFormatting()
end
},
moveHeaderToBottom = {
type = "toggle",
order = 2,
width = 1.5,
name = function() return l10n("Show Tracker Header At The Bottom") end,
desc = function() return l10n("When this is enabled the Tracker Header and/or the Questie Icon will be moved to the bottom of the Questie Tracker and the sizer to the top.") end,
disabled = function() return (not Questie.db.profile.trackerEnabled) end,
get = function() return Questie.db.profile.moveHeaderToBottom end,
set = function(_, value)
Questie.db.profile.moveHeaderToBottom = value
QuestieTracker:UpdateFormatting()
end
},
alwaysShowTracker = {
type = "toggle",
order = 3,
width = 1.5,
name = function() return l10n("Show Header For Empty Tracker") end,
desc = function() return l10n("When this is enabled the Tracker Header will be visible even when no quests are being tracked versus the Tracker being hidden completely.") end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.alwaysShowTracker end,
set = function(_, value)
Questie.db.profile.alwaysShowTracker = value
if (Questie.db.profile.alwaysShowTracker == true) and (Questie.db.char.isTrackerExpanded == false) then
Questie.db.char.isTrackerExpanded = true
end
QuestieTracker:UpdateFormatting()
end
},
},
},
group_background = {
type = "group",
order = 15,
inline = true,
width = 0.5,
name = function() return l10n('Tracker Background') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
args = {
enableBackground = {
type = "toggle",
order = 1,
width = 1.5,
name = function() return l10n('Enable Background') end,
desc = function() return l10n('When this is checked, the Questie Tracker Background becomes visible.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerBackdropEnabled end,
set = function(_, value)
Questie.db.profile.trackerBackdropEnabled = value
Questie.db.profile.currentBackdropEnabled = value
if value == true and not Questie.db.profile.trackerBackdropFader then
TrackerBaseFrame.baseFrame:SetBackdropColor(0, 0, 0, Questie.db.profile.trackerBackdropAlpha)
else
TrackerBaseFrame.baseFrame:SetBackdropColor(0, 0, 0, 0)
end
QuestieTracker:UpdateFormatting()
end
},
enableBorder = {
type = "toggle",
order = 2,
width = 1.5,
name = function() return l10n('Enable Border') end,
desc = function() return l10n('When this is checked, the Questie Tracker Border becomes visible.') end,
disabled = function() return not Questie.db.profile.trackerEnabled or not Questie.db.profile.trackerBackdropEnabled end,
get = function() return Questie.db.profile.trackerBorderEnabled end,
set = function(_, value)
Questie.db.profile.trackerBorderEnabled = value
Questie.db.profile.currentBorderEnabled = value
if value == true and not Questie.db.profile.trackerBackdropFader then
TrackerBaseFrame.baseFrame:SetBackdropBorderColor(1, 1, 1, Questie.db.profile.trackerBackdropAlpha)
else
TrackerBaseFrame.baseFrame:SetBackdropBorderColor(1, 1, 1, 0)
end
QuestieTracker:UpdateFormatting()
end
},
fadeTrackerBackdrop = {
type = "toggle",
order = 3,
width = 1.5,
name = function() return l10n('Fade Background') end,
desc = function() return l10n('When this is checked, the Questie Tracker Backdrop and Border (if enabled) will fade and become transparent when not in use.') end,
disabled = function() return not Questie.db.profile.trackerEnabled or not Questie.db.profile.trackerBackdropEnabled end,
get = function() return Questie.db.profile.trackerBackdropFader end,
set = function(_, value)
Questie.db.profile.trackerBackdropFader = value
Questie.db.profile.currentBackdropFader = value
if value == true then
local fadeTicker
local fadeTickerValue = 1
fadeTicker = C_Timer.NewTicker(0.02, function()
if fadeTickerValue <= 1 then
fadeTickerValue = fadeTickerValue - 0.05
if fadeTickerValue < 0 then
fadeTickerValue = 0
fadeTicker:Cancel()
end
if Questie.db.char.isTrackerExpanded then
TrackerBaseFrame.baseFrame:SetBackdropColor(0, 0, 0, fadeTickerValue)
if Questie.db.profile.trackerBorderEnabled then
TrackerBaseFrame.baseFrame:SetBackdropBorderColor(1, 1, 1, fadeTickerValue)
end
end
else
fadeTickerValue:Cancel()
end
end)
end
QuestieTracker:UpdateFormatting()
end
},
questBackdropAlpha = {
type = "range",
order = 4,
name = function() return l10n('Tracker Backdrop Alpha') end,
desc = function() return l10n('The alpha level of the Questie Trackers backdrop. A setting of 100 percent is fully visible.') end,
width = 3,
min = 0,
max = 100,
step = 5,
disabled = function() return not Questie.db.profile.trackerBackdropEnabled or not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerBackdropAlpha * 100 end,
set = function(_, value)
Questie.db.profile.trackerBackdropAlpha = value / 100
QuestieTracker:UpdateFormatting()
end
},
},
},
}
},
group_fonts = {
type = "group",
order = 8,
inline = true,
width = 0.5,
name = function() return l10n('Font Options'); end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
args = {
fontSizeHeader = {
type = "range",
order = 1,
name = function() return l10n("Font Size for Active Quests Header") end,
desc = function() return l10n("The font size used for the Active Quests Header.") end,
width = "double",
min = 8,
max = 26,
step = 1,
disabled = function() return not Questie.db.profile.trackerEnabled or not Questie.db.profile.trackerHeaderEnabled end,
get = function() return Questie.db.profile.trackerFontSizeHeader end,
set = function(_, value)
Questie.db.profile.trackerFontSizeHeader = value
QuestieTracker:Update()
end
},
fontHeader = {
type = "select",
dialogControl = 'LSM30_Font',
order = 2,
values = SharedMedia:HashTable("font"),
style = 'dropdown',
name = function() return l10n("Font for Active Quests Header") end,
desc = function() return l10n("The font used for the Active Quests Header.") end,
disabled = function() return not Questie.db.profile.trackerEnabled or not Questie.db.profile.trackerHeaderEnabled end,
get = function() return Questie.db.profile.trackerFontHeader or "Friz Quadrata TT" end,
set = function(_, value)
Questie.db.profile.trackerFontHeader = value
QuestieTracker:Update()
end
},
fontSizeZone = {
type = "range",
order = 3,
name = function() return l10n('Font Size for Zone Names') end,
desc = function() return l10n('The font size used for zone names.') end,
width = "double",
min = 8,
max = 26,
step = 1,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFontSizeZone end,
set = function(_, value)
Questie.db.profile.trackerFontSizeZone = value
QuestieTracker:Update()
end
},
fontZone = {
type = "select",
dialogControl = 'LSM30_Font',
order = 4,
values = SharedMedia:HashTable("font"),
style = 'dropdown',
name = function() return l10n('Font for Zone Names') end,
desc = function() return l10n('The font used for zone names.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFontZone or "Friz Quadrata TT" end,
set = function(_, value)
Questie.db.profile.trackerFontZone = value
QuestieTracker:Update()
end
},
fontSizeQuest = {
type = "range",
order = 5,
name = function() return l10n('Font Size for Quest Titles') end,
desc = function() return l10n("The font size used for Quest Titles.\n\nNOTE: Objective font size will auto adjust to less than or equal to Quest font size. This is necessary to avoid any text collisions and formatting abnormalities.") end,
width = "double",
min = 8,
max = 26,
step = 1,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFontSizeQuest end,
set = function(_, value)
Questie.db.profile.trackerFontSizeQuest = value
if Questie.db.profile.trackerFontSizeObjective > value then
Questie.db.profile.trackerFontSizeObjective = value
end
QuestieTracker:Update()
end
},
fontQuest = {
type = "select",
dialogControl = 'LSM30_Font',
order = 6,
values = SharedMedia:HashTable("font"),
style = 'dropdown',
name = function() return l10n('Font for Quest Titles') end,
desc = function() return l10n('The font used for Quest Titles.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFontQuest or "Friz Quadrata TT" end,
set = function(_, value)
Questie.db.profile.trackerFontQuest = value
QuestieTracker:Update()
end
},
fontSizeObjective = {
type = "range",
order = 7,
name = function() return l10n('Font Size for Objectives') end,
desc = function() return l10n("The font size used for Objectives.\n\nNOTE: Objective font size will auto adjust to less than or equal to Quest font size. This is necessary to avoid any text collisions and formatting abnormalities.") end,
width = "double",
min = 8,
max = 26,
step = 1,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFontSizeObjective end,
set = function(_, value)
if Questie.db.profile.trackerFontSizeQuest < value then
Questie.db.profile.trackerFontSizeObjective = Questie.db.profile.trackerFontSizeQuest
else
Questie.db.profile.trackerFontSizeObjective = value
end
QuestieTracker:Update()
end
},
fontObjective = {
type = "select",
dialogControl = 'LSM30_Font',
order = 8,
values = SharedMedia:HashTable("font"),
style = 'dropdown',
name = function() return l10n('Font for Objectives') end,
desc = function() return l10n('The font used for Objectives.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFontObjective or "Friz Quadrata TT" end,
set = function(_, value)
Questie.db.profile.trackerFontObjective = value
QuestieTracker:Update()
end
},
fontOutline = {
type = "select",
dialogControl = 'LSM30_Font',
order = 9,
width = 1.5,
values = {
["None"] = "",
["Outline"] = "OUTLINE",
["Monochrome"] = "MONOCHROME"
},
style = 'dropdown',
name = function() return l10n('Outline for Zones, Titles, and Objectives') end,
desc = function() return l10n('The outline used for Quest Zones, Titles, and Objectives in the Questie Tracker.') end,
disabled = function() return not Questie.db.profile.trackerEnabled end,
get = function() return Questie.db.profile.trackerFontOutline end,
set = function(_, value)
Questie.db.profile.trackerFontOutline = value
QuestieTracker:Update()
end
},
}
},
}
}
return trackerOptions
end
_GetShortcuts = function()
return {
['left'] = l10n('Left Click'),
['right'] = l10n('Right Click'),
['shiftleft'] = l10n('Shift') .. " + " .. l10n('Left Click'),
['shiftright'] = l10n('Shift') .. " + " .. l10n('Right Click'),
['ctrlleft'] = l10n('Control') .. " + " .. l10n('Left Click'),
['ctrlright'] = l10n('Control') .. " + " .. l10n('Right Click'),
['altleft'] = l10n('Alt') .. " + " .. l10n('Left Click'),
['altright'] = l10n('Alt') .. " + " .. l10n('Right Click'),
['disabled'] = l10n('Disabled'),
}
end