-
Notifications
You must be signed in to change notification settings - Fork 2
/
Settings.lua
40 lines (34 loc) · 1.17 KB
/
Settings.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
-- Slightly Improved™ Dialogues
-- The MIT License © 2016 Arthur Corenzan
local NAMESPACE = "SlightlyImprovedDialogues"
local settings = {}
local panel =
{
type = "panel",
name = "Slightly Improved™ Dialogues",
displayName = "Slightly Improved™ Dialogues",
author = nil,
version = nil,
}
local options =
{
{
type = "checkbox",
name = "Goodbye Greyed out by Default",
tooltip = "Make the goodbye option always appear faded.",
getFunc = function() return settings.goodbyeAlwaysSeen end,
setFunc = function(value) settings.goodbyeAlwaysSeen = value end,
}, {
type = "checkbox",
name = "Prefix Options with their Numbers",
tooltip = "Add the corresponding number before each option in the dialogue.",
getFunc = function() return settings.addNumberPrefix end,
setFunc = function(value) settings.addNumberPrefix = value end,
},
}
CALLBACK_MANAGER:RegisterCallback(NAMESPACE.."_OnAddOnLoaded", function(savedVars)
settings = savedVars
local LAM = LibStub("LibAddonMenu-2.0")
LAM:RegisterAddonPanel(NAMESPACE, panel)
LAM:RegisterOptionControls(NAMESPACE, options)
end)