-
Notifications
You must be signed in to change notification settings - Fork 6
/
settings.lua
48 lines (45 loc) · 1.08 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
local _, addon = ...
local L = addon.L
local function formatPercentage(value)
return PERCENTAGE_STRING:format(math.floor((value * 100) + 0.5))
end
addon:RegisterSettings('InteractiveWormholesDB', {
{
key = 'changeMap',
type = 'toggle',
title = L['Change maps'],
tooltip = L['Change to the most appropriate map.\n\n|cffff0000Warning:|r This will cause taint!'],
default = false,
},
{
key = 'mapScale',
type = 'slider',
title = L['Map pin scale'],
tooltip = L['The scale of pins on the map'],
default = 1.0,
minValue = 0.5,
maxValue = 2.0,
valueStep = 0.01,
valueFormat = formatPercentage,
},
{
key = 'zoomFactor',
type = 'slider',
title = L['Pin size zoom factor'],
tooltip = L['How much extra scale to apply when map is zoomed'],
default = 0.2,
minValue = 0,
maxValue = 1,
valueStep = 0.01,
valueFormat = formatPercentage,
},
{
key = 'taxi',
type = 'toggle',
title = L['Taxi world map'],
tooltip = L['Use the normal world map for taxi'],
default = false,
new = true,
},
})
addon:RegisterSettingsSlash('/interactivewormholes', '/iw')