Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
ElvUI Project
ElvUI
Commits
07b9a35c
Commit
07b9a35c
authored
Oct 15, 2018
by
Simpy
🐹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libelvuiplugin: more stuff
parent
9ee17359
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
ElvUI/Libraries/LibElvUIPlugin-1.0/LibElvUIPlugin-1.0.lua
ElvUI/Libraries/LibElvUIPlugin-1.0/LibElvUIPlugin-1.0.lua
+12
-6
No files found.
ElvUI/Libraries/LibElvUIPlugin-1.0/LibElvUIPlugin-1.0.lua
View file @
07b9a35c
...
...
@@ -65,14 +65,19 @@ end
--
------------------------------
function
lib
:
RegisterPlugin
(
name
,
callback
,
isLib
)
local
plugin
=
{}
plugin
.
name
=
name
plugin
.
version
=
name
==
MAJOR
and
MINOR
or
GetAddOnMetadata
(
name
,
'Version'
)
if
isLib
then
plugin
.
isLib
=
true
;
plugin
.
version
=
1
end
plugin
.
callback
=
callback
local
plugin
=
{
name
=
name
,
callback
=
callback
,
version
=
name
==
MAJOR
and
MINOR
or
GetAddOnMetadata
(
name
,
'Version'
)
}
if
isLib
then
plugin
.
isLib
=
true
plugin
.
version
=
1
end
lib
.
plugins
[
name
]
=
plugin
local
loaded
=
IsAddOnLoaded
(
'ElvUI_Config'
)
if
not
lib
.
registeredPrefix
then
C_ChatInfo_RegisterAddonMessagePrefix
(
lib
.
prefix
)
lib
.
VCFrame
:
RegisterEvent
(
'CHAT_MSG_ADDON'
)
...
...
@@ -81,6 +86,7 @@ function lib:RegisterPlugin(name, callback, isLib)
lib
.
registeredPrefix
=
true
end
local
loaded
=
IsAddOnLoaded
(
'ElvUI_Config'
)
if
not
loaded
then
lib
.
CFFrame
:
RegisterEvent
(
'ADDON_LOADED'
)
elseif
loaded
then
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment