-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathOptions.lua
203 lines (200 loc) · 8.93 KB
/
Options.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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
local addonName, addon = ...
local RB = RetailBags
local AceConfig = LibStub("AceConfig-3.0")
local AceConfigDialog = LibStub("AceConfigDialog-3.0")
local optionsTable = {
type = "group",
args = {
BagSettings = {
type = "group",
inline = true,
name = "Bag Settings",
width = "full",
args = {
DisplaySearch = {
type = "toggle",
order = 1,
name = "Display search box",
desc = "Display search boxes to filter your bags and bank.",
width = "full",
get = function(info) return RB.DB.profile.displaySearchBox end,
set = function(info, value)
RB.DB.profile.displaySearchBox = value;
if (value) then
RB.BagItemSearchBox:Show();
else
RB.BagItemSearchBox:Hide();
end
end,
},
DisplaySortButton = {
type = "toggle",
order = 2,
name = "Display sort button",
desc = "Display ort buttons to arrange your bags and bank.",
width = "full",
get = function(info) return RB.DB.profile.displaySortButton end,
set = function(info, value)
RB.DB.profile.displaySortButton = value;
if (value) then
RB.BagItemAutoSortButton:Show();
else
RB.BagItemAutoSortButton:Hide();
end
end,
},
SortBagsRightToLeft = {
type = "toggle",
order = 3,
name = "Sort bags right to left",
desc = "Changes sorting direction.",
width = "full",
get = function(info) return RB.DB.profile.sortBagsRightToLeft end,
set = function(info, value)
RB.DB.profile.sortBagsRightToLeft = value;
SetSortBagsRightToLeft(value);
end,
},
DisplayItemBorders = {
type = "toggle",
order = 4,
name = "Display item borders",
desc = "Adds colored borders with item quality colors.",
width = "full",
get = function(info) return RB.DB.profile.displayItemQualityBorders end,
set = function(info, value)
RB.DB.profile.displayItemQualityBorders = value;
end,
},
MakeReagentBorderBlue = {
type = "toggle",
order = 5,
name = "Show reagent borders as colored",
desc = "Instead of item quality color show all reagents with colored border.",
width = "full",
get = function(info) return RB.DB.profile.makeReagentBordersBlue end,
set = function(info, value)
RB.DB.profile.makeReagentBordersBlue = value;
end,
},
MakeConsumableBorderColored = {
type = "toggle",
order = 6,
name = "Show consumable item borders as colored",
desc = "Instead of item quality color show all consumables with colored border.",
width = "full",
get = function(info) return RB.DB.profile.makeConsumableBordersColored end,
set = function(info, value)
RB.DB.profile.makeConsumableBordersColored = value;
end,
},
ContainerScale = {
type = "range",
order = 7,
name = "Bags container scale",
desc = "Change size of bag containers.",
min = 1,
max = 2,
step = .1,
get = function(info) return RB.DB.profile.bagContainerScale end,
set = function(info, value)
RB.DB.profile.bagContainerScale = value;
CONTAINER_SCALE = RB.DB.profile.bagContainerScale;
end,
},
DisplayBagsAutomaticallyWithCharacterPane = {
type = "toggle",
order = 8,
name = "Open all bags automatically when character pane shows up",
desc = "Automatically toggles all bags when character pane visibility changes.",
width = "full",
get = function(info) return RB.DB.profile.displayBagsWithCharacterPane end,
set = function(info, value)
RB.DB.profile.displayBagsWithCharacterPane = value
end,
},
DisplayBagsAutomaticallyWithAuctionHouse = {
type = "toggle",
order = 9,
name = "Open all bags automatically when auction house window shows up",
desc = "Automatically toggles all bags when auction house window visibility changes.",
width = "full",
get = function(info) return RB.DB.profile.displayBagsWithAuctionPane end,
set = function(info, value)
RB.DB.profile.displayBagsWithAuctionPane = value
end,
},
DisplayKeyringAutomaticallyWithCharacterPane = {
type = "toggle",
order = 10,
name = "Open keyring automatically when character pane shows up",
desc = "Automatically toggles keyring when character pane visibility changes.",
width = "full",
get = function(info) return RB.DB.profile.displayKeyringWithCharacterPane end,
set = function(info, value)
RB.DB.profile.displayKeyringWithCharacterPane = value
end,
}
},
}, TooltipSettings = {
type = "group",
inline = true,
name = "Tooltip Settings",
width = "full",
args = {
DisplayItemQuality = {
type = "toggle",
order = 1,
name = "Display item quality",
width = "full",
get = function(info) return RB.DB.profile.displayTooltipItemQuality end,
set = function(info, value)
RB.DB.profile.displayTooltipItemQuality = value
end,
},
DisplayItemLevel = {
type = "toggle",
order = 2,
name = "Display item level",
width = "full",
get = function(info) return RB.DB.profile.displayTooltipItemLevel end,
set = function(info, value)
RB.DB.profile.displayTooltipItemLevel = value
end,
},
DisplayCraftingReagent = {
type = "toggle",
order = 3,
name = "Display crafting reagent label",
width = "full",
get = function(info) return RB.DB.profile.displayTooltipCraftingReagent end,
set = function(info, value)
RB.DB.profile.displayTooltipCraftingReagent = value
end,
},
DisplayMaxStackSize = {
type = "toggle",
order = 4,
name = "Display max. stack size for reagents",
width = "full",
get = function(info) return RB.DB.profile.displayMaxStackSize end,
set = function(info, value)
RB.DB.profile.displayMaxStackSize = value
end,
},
DisplayVendorPrice = {
type = "toggle",
order = 5,
name = "Display vendor price",
width = "full",
get = function(info) return RB.DB.profile.displayTooltipVendorPrice end,
set = function(info, value)
RB.DB.profile.displayTooltipVendorPrice = value
end,
}
},
}
}
}
AceConfig:RegisterOptionsTable(addonName, optionsTable, nil);
AceConfigDialog:AddToBlizOptions(addonName);