forked from phuein/UserScripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStartup.lua
More file actions
43 lines (32 loc) · 976 Bytes
/
Copy pathStartup.lua
File metadata and controls
43 lines (32 loc) · 976 Bytes
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
NBUI = {}
NBUI.name = "Notebook2018"
NBUI.version = "4.13"
NBUI.settings = {}
function ProtectText(text)
return text:gsub([[\]], [[%%92]])
end
function UnprotectText(text)
return text:gsub([[%%92]], [[\]])
end
function NBUI.Initialize()
-- Load saved variables.
NBUI.db = ZO_SavedVars:New("NBUISVDB", 1, nil, NBUI.defaults)
-- NBUISVDB = NBUISVDB or {}
-- for k,v in pairs(NBUI.defaults) do
-- if type(NBUISVDB[k]) == "nil" then
-- NBUISVDB[k] = v
-- end
-- end
-- NBUISVDB.NB1Pages = NBUISVDB.NB1Pages or {}
NB1_IndexPool = ZO_ObjectPool:New(Create_NB1_IndexButton, Remove_NB1_IndexButton)
CreateNBUISettings()
end
function NBUI.OnAddOnLoaded(event, addonName)
if addonName == NBUI.name then
NBUI.Initialize()
CreateNB1()
Populate_NB1_ScrollList()
ZO_CreateStringId("SI_BINDING_NAME_NBUI_NB1TOGGLE", GetString(SI_NBUI_NB1KEYBIND_LABEL))
end
end
EVENT_MANAGER:RegisterForEvent(NBUI.name, EVENT_ADD_ON_LOADED, NBUI.OnAddOnLoaded)