Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Deimos
ProjectAzilroka
Commits
39e80551
Commit
39e80551
authored
Dec 22, 2018
by
Azilroka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stAM
parent
3a05603c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
9 deletions
+40
-9
Init.lua
Init.lua
+24
-5
Modules/stAddonManager.lua
Modules/stAddonManager.lua
+16
-4
No files found.
Init.lua
View file @
39e80551
...
...
@@ -75,6 +75,19 @@ PA.Classes = {}
for
k
,
v
in
pairs
(
LOCALIZED_CLASS_NAMES_MALE
)
do
PA
.
Classes
[
v
]
=
k
end
for
k
,
v
in
pairs
(
LOCALIZED_CLASS_NAMES_FEMALE
)
do
PA
.
Classes
[
v
]
=
k
end
function
PA
:
GetUIScale
()
local
effectiveScale
=
_G
.
UIParent
:
GetEffectiveScale
()
local
magic
=
effectiveScale
local
scale
=
max
(.
64
,
min
(
1
.
15
,
magic
))
if
strlen
(
scale
)
>
6
then
scale
=
tonumber
(
strsub
(
scale
,
0
,
6
))
end
return
magic
/
scale
end
function
PA
:
ClassColorCode
(
class
)
local
color
=
class
and
(
CUSTOM_CLASS_COLORS
and
CUSTOM_CLASS_COLORS
[
PA
.
Classes
[
class
]]
or
RAID_CLASS_COLORS
[
PA
.
Classes
[
class
]])
or
{
r
=
1
,
g
=
1
,
b
=
1
}
...
...
@@ -224,7 +237,7 @@ function PA:ADDON_LOADED(event, addon)
end
function
PA
:
PLAYER_LOGIN
()
PA
.
Multiple
=
P
ixelUtil
.
GetNearestPixelSize
(
1
,
UIParent
:
GetEffective
Scale
()
)
PA
.
Multiple
=
P
A
:
GetUI
Scale
()
PA
.
AS
=
AddOnSkins
and
unpack
(
AddOnSkins
)
...
...
@@ -236,20 +249,26 @@ function PA:PLAYER_LOGIN()
PA
:
BuildProfile
()
if
PA
.
Tukui
and
PA
:
IsAddOnEnabled
(
'Tukui_Config'
,
PA
.
MyName
)
then
PA
:
TukuiOptions
()
end
if
PA
.
EP
then
PA
.
EP
:
RegisterPlugin
(
'ProjectAzilroka'
,
PA
.
GetOptions
)
end
end
function
PA
:
PLAYER_ENTERING_WORLD
()
for
_
,
module
in
PA
:
IterateModules
()
do
if
module
.
Initialize
then
module
:
Initialize
()
end
end
if
PA
.
Tukui
and
PA
:
IsAddOnEnabled
(
'Tukui_Config'
,
PA
.
MyName
)
then
PA
:
TukuiOptions
()
end
self
:
UnregisterEvent
(
"PLAYER_ENTERING_WORLD"
)
end
PA
:
RegisterEvent
(
'ADDON_LOADED'
)
PA
:
RegisterEvent
(
'PLAYER_LOGIN'
)
\ No newline at end of file
PA
:
RegisterEvent
(
'PLAYER_LOGIN'
)
PA
:
RegisterEvent
(
'PLAYER_ENTERING_WORLD'
)
\ No newline at end of file
Modules/stAddonManager.lua
View file @
39e80551
...
...
@@ -350,7 +350,6 @@ function stAM:BuildFrame()
StatusText
:
SetPoint
(
"BOTTOM"
,
CheckButton
,
"BOTTOM"
)
StatusText
:
SetPoint
(
"RIGHT"
,
AddOns
,
"RIGHT"
,
-
10
,
0
)
StatusText
:
SetJustifyH
(
"LEFT"
)
StatusText
:
SetVertexColor
(.
77
,
.
12
,
.
24
)
CheckButton
.
StatusText
=
StatusText
...
...
@@ -358,7 +357,6 @@ function stAM:BuildFrame()
Icon
:
SetTexture
(
[[Interface\AddOns\ProjectAzilroka\Media\Textures\QuestBang]]
)
Icon
:
SetPoint
(
'CENTER'
,
CheckButton
,
'RIGHT'
,
10
,
0
)
Icon
:
SetSize
(
32
,
32
)
Icon
:
SetVertexColor
(.
77
,
.
12
,
.
24
)
CheckButton
.
Icon
=
Icon
...
...
@@ -591,10 +589,21 @@ function stAM:UpdateAddonList()
button
.
name
,
button
.
title
,
button
.
authors
,
button
.
notes
,
button
.
required
,
button
.
optional
=
info
.
Name
,
info
.
Title
,
info
.
Authors
,
info
.
Notes
,
info
.
Required
,
info
.
Optional
button
.
Text
:
SetText
(
button
.
title
)
if
info
.
Missing
then
button
.
Icon
:
SetVertexColor
(.
77
,
.
12
,
.
24
)
button
.
StatusText
:
SetVertexColor
(.
77
,
.
12
,
.
24
)
button
.
Icon
:
Show
()
button
.
Text
:
SetPoint
(
'LEFT'
,
button
.
Icon
,
'CENTER'
,
5
,
0
)
button
.
Text
:
SetPoint
(
"RIGHT"
,
self
.
Frame
.
AddOns
,
"CENTER"
,
0
,
0
)
button
.
StatusText
:
SetText
(
PA
.
ACL
[
'Missing: '
]
..
table.concat
(
info
.
Missing
,
', '
))
elseif
info
.
Disabled
then
button
.
Icon
:
SetVertexColor
(
1
,
.
8
,
.
1
)
button
.
StatusText
:
SetVertexColor
(
1
,
.
8
,
.
1
)
button
.
Icon
:
Show
()
button
.
Text
:
SetPoint
(
'LEFT'
,
button
.
Icon
,
'CENTER'
,
5
,
0
)
button
.
Text
:
SetPoint
(
"RIGHT"
,
self
.
Frame
.
AddOns
,
"CENTER"
,
0
,
0
)
button
.
StatusText
:
SetText
(
PA
.
ACL
[
'Disabled: '
]
..
table.concat
(
info
.
Disabled
,
', '
))
else
button
.
Icon
:
Hide
()
button
.
Text
:
SetPoint
(
'LEFT'
,
button
,
'RIGHT'
,
5
,
0
)
...
...
@@ -817,7 +826,7 @@ function stAM:Initialize()
for
i
=
1
,
GetNumAddOns
()
do
local
Name
,
Title
,
Notes
=
GetAddOnInfo
(
i
)
local
Required
,
Optional
=
nil
,
nil
local
MissingAddons
local
MissingAddons
,
DisabledAddons
if
GetAddOnDependencies
(
i
)
~=
nil
then
Required
=
{
GetAddOnDependencies
(
i
)
}
...
...
@@ -825,6 +834,9 @@ function stAM:Initialize()
if
select
(
5
,
GetAddOnInfo
(
addon
))
==
'MISSING'
then
MissingAddons
=
MissingAddons
or
{}
tinsert
(
MissingAddons
,
addon
)
elseif
select
(
5
,
GetAddOnInfo
(
addon
))
==
'DISABLED'
then
DisabledAddons
=
DisabledAddons
or
{}
tinsert
(
DisabledAddons
,
addon
)
end
end
end
...
...
@@ -835,7 +847,7 @@ function stAM:Initialize()
local
Authors
=
GetAddOnMetadata
(
i
,
"Author"
)
stAM
.
AddOnInfo
[
i
]
=
{
[
'Name'
]
=
Name
,
[
'Title'
]
=
Title
,
[
'Authors'
]
=
Authors
,
[
'Notes'
]
=
Notes
,
[
'Required'
]
=
Required
,
[
'Optional'
]
=
Optional
,
[
'Missing'
]
=
MissingAddons
}
stAM
.
AddOnInfo
[
i
]
=
{
[
'Name'
]
=
Name
,
[
'Title'
]
=
Title
,
[
'Authors'
]
=
Authors
,
[
'Notes'
]
=
Notes
,
[
'Required'
]
=
Required
,
[
'Optional'
]
=
Optional
,
[
'Missing'
]
=
MissingAddons
,
[
'Disabled'
]
=
DisabledAddons
}
end
stAM
.
SelectedCharacter
=
PA
.
MyName
...
...
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