-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.lua
117 lines (107 loc) · 3.63 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
-- Settings menu.
function ArcanistJobGauge.LoadSettings()
local LAM = LibAddonMenu2
local panelData = {
type = "panel",
name = ArcanistJobGauge.menuName,
displayName = ArcanistJobGauge.Colorize(ArcanistJobGauge.menuName),
author = ArcanistJobGauge.Colorize(ArcanistJobGauge.author, "92e721"),
registerForRefresh = true,
registerForDefaults = true,
}
LAM:RegisterAddonPanel(ArcanistJobGauge.menuName, panelData)
local optionsTable = {}
table.insert(
optionsTable,
{
type = "checkbox",
name = "Account Wide",
tooltip = "Use the same settings throughout the entire account - instead of per character",
getFunc = function()
return ArcanistJobGauge.savedVars.accountWide
end,
setFunc = function(v)
ArcanistJobGauge.characterSavedVars.accountWide = v
ArcanistJobGauge.accountSavedVars.accountWide = v
end,
width = "full",
requiresReload = true,
}
)
-- Category. --
table.insert(optionsTable, {
type = "header",
name = ZO_HIGHLIGHT_TEXT:Colorize("Settings"),
width = "full",
})
table.insert(optionsTable, {
type = "description",
title = nil,
text = "Pretty way to display how many crux you have in UI",
width = "full",
})
table.insert(
optionsTable,
{
type = "checkbox",
name = "Enabled",
tooltip =
"Use the same settings throughout the entire account - instead of per character. Visible only on the Arcanist class",
getFunc = function()
return ArcanistJobGauge.savedVars.enabled
end,
setFunc = function(isEnabled)
ArcanistJobGauge.savedVars.enabled = isEnabled
ArcanistJobGauge.updateVisibility()
end,
width = "full", --or "half",
requiresReload = false,
}
)
table.insert(
optionsTable,
{
type = "checkbox",
name = "Lock",
tooltip = "Locks ability to drag the job gauge",
getFunc = function() return ArcanistJobGauge.savedVars.isLocked end,
setFunc = function(isLocked)
ArcanistJobGauge.savedVars.isLocked = isLocked
ArcanistJobGaugeWindowLabelBG:SetMouseEnabled(not isLocked)
end,
default = true,
width = "full",
}
)
table.insert(
optionsTable,
{
type = "checkbox",
name = "Simplified",
tooltip = "Displays the simplified version of the gauge",
getFunc = function() return ArcanistJobGauge.savedVars.simplified end,
setFunc = function(simplified)
ArcanistJobGauge.savedVars.simplified = simplified
ArcanistJobGauge.updateSimplified()
end,
default = true,
width = "full",
}
)
table.insert(
optionsTable,
{
type = "checkbox",
name = "Hide out of combat",
tooltip = "Displays only during combat",
getFunc = function() return ArcanistJobGauge.savedVars.hideCombat end,
setFunc = function(hideCombat)
ArcanistJobGauge.savedVars.hideCombat = hideCombat
ArcanistJobGauge.updateCombat()
end,
default = true,
width = "full",
}
)
LAM:RegisterOptionControls(ArcanistJobGauge.menuName, optionsTable)
end