-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathInit.lua
More file actions
93 lines (83 loc) · 2.96 KB
/
Init.lua
File metadata and controls
93 lines (83 loc) · 2.96 KB
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
NosCursor = CreateFrame("Frame", nil, UIParent)
NosCursor:RegisterEvent("ADDON_LOADED")
NosCursor.hover = CreateFrame("Frame", "NosCursorFrame", UIParent)
--NosCursor.settings = CreateFrame("Frame", "NosCursorConfig", UIParent)
NosCursor.modules = {}
NosCursor.api = {}
NosCursor.env = {}
NosCursor.config = {
--Mouse Tracker
rotate = 0,
rgb = 0,
customcolor = 1,
mousecolor = { 0, 0.6, 1, 1 },
hovertexture = 9,
width = 20,
height = 20,
--Trail
rainbowtrail = 0,
customcolortrail = 1,
customtrailcolor = { 0, 0.6, 1, 1 },
maxtrails = 50,
maxtrailsize = 30,
mintrailsize = 1,
dottexture = 8,
}
NosCursor.textures = {
"Interface\\AddOns\\NosCursor\\Media\\Circle",
"Interface\\AddOns\\NosCursor\\Media\\CircleFull",
"Interface\\AddOns\\NosCursor\\Media\\Star 1",
"Interface\\AddOns\\NosCursor\\Media\\Swirl",
"Interface\\AddOns\\NosCursor\\Media\\Cross 1",
"Interface\\AddOns\\NosCursor\\Media\\Cross 2",
"Interface\\AddOns\\NosCursor\\Media\\Cross 3",
"Interface\\AddOns\\NosCursor\\Media\\Glow 1",
"Interface\\AddOns\\NosCursor\\Media\\Glow Reversed",
"Interface\\AddOns\\NosCursor\\Media\\Glow",
"Interface\\AddOns\\NosCursor\\Media\\Ring 1",
"Interface\\AddOns\\NosCursor\\Media\\Ring 2",
"Interface\\AddOns\\NosCursor\\Media\\Ring 3",
"Interface\\AddOns\\NosCursor\\Media\\Ring 4",
"Interface\\AddOns\\NosCursor\\Media\\Ring Soft 1",
"Interface\\AddOns\\NosCursor\\Media\\Ring Soft 2",
"Interface\\AddOns\\NosCursor\\Media\\Ring Soft 3",
"Interface\\AddOns\\NosCursor\\Media\\Ring Soft 4",
"Interface\\AddOns\\NosCursor\\Media\\Sphere Edge 2",
}
NosCursor.trailtextures = {
"Interface\\AddOns\\NosCursor\\Media\\CircleCluster",
"Interface\\AddOns\\NosCursor\\Media\\Star 1",
"Interface\\AddOns\\NosCursor\\Media\\Swirl",
"Interface\\AddOns\\NosCursor\\Media\\Cross 1",
"Interface\\AddOns\\NosCursor\\Media\\Cross 2",
"Interface\\AddOns\\NosCursor\\Media\\Cross 3",
"Interface\\AddOns\\NosCursor\\Media\\Glow 1",
"Interface\\AddOns\\NosCursor\\Media\\Glow",
}
NosCursor.L = NosCursor_Locale[GetLocale()] or NosCursor_Locale["enUS"]
NosCursor:SetScript("OnEvent", function()
if event == "ADDON_LOADED" and arg1 == "NosCursor" then
if not NosCursorDB then NosCursorDB = {} end
if NosCursorDB then
for var, data in pairs(NosCursorDB) do
NosCursor.config[var] = data
end
end
NosCursorDB = NosCursor.config
this:UnregisterEvent("ADDON_LOADED")
--NosCursor:Initialize()
end
end)
NosCursor.updateFrame = CreateFrame("Frame", nil, UIParent)
function NosCursor:GetEnvironment()
for name, func in pairs(NosCursor.api) do
self.env[name] = func
end
local _G = getfenv(0)
self.env._G = _G
self.env.C = self.config
self.env.L = self.L
self.env.NosCursor = self
setmetatable(self.env, { __index = _G })
return self.env
end