Commit a7f5e07c authored by Azilroka's avatar Azilroka

Switching to Tree

parent eea1be1a
......@@ -97,9 +97,6 @@ PA.Title = GetAddOnMetadata('ProjectAzilroka', 'Title')
PA.Version = GetAddOnMetadata('ProjectAzilroka', 'Version')
PA.Authors = GetAddOnMetadata('ProjectAzilroka', 'Author'):gsub(", ", " ")
local Color = CUSTOM_CLASS_COLORS and CUSTOM_CLASS_COLORS[PA.MyClass] or RAID_CLASS_COLORS[PA.MyClass]
PA.ClassColor = { Color.r, Color.g, Color.b }
PA.AllPoints = { CENTER = 'CENTER', BOTTOM = 'BOTTOM', TOP = 'TOP', LEFT = 'LEFT', RIGHT = 'RIGHT', BOTTOMLEFT = 'BOTTOMLEFT', BOTTOMRIGHT = 'BOTTOMRIGHT', TOPLEFT = 'TOPLEFT', TOPRIGHT = 'TOPRIGHT' }
PA.ElvUI = PA:IsAddOnEnabled('ElvUI', PA.MyName)
......@@ -117,6 +114,18 @@ local function GetoUF()
end
PA.oUF = GetoUF()
function PA:ClassColorCode(class)
local color = PA:GetClassColor(class)
return format('FF%02x%02x%02x', color.r * 255, color.g * 255, color.b * 255)
end
function PA:GetClassColor(class)
return _G.CUSTOM_CLASS_COLORS and _G.CUSTOM_CLASS_COLORS[class] or _G.RAID_CLASS_COLORS[class] or { r = 1, g = 1, b = 1 }
end
local Color = PA:GetClassColor(PA.MyClass)
PA.ClassColor = { Color.r, Color.g, Color.b }
PA.Classes = {}
PA.ScanTooltip = CreateFrame('GameTooltip', 'PAScanTooltip', _G.UIParent, 'GameTooltipTemplate')
......@@ -143,12 +152,6 @@ function PA:GetUIScale()
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 }
return format('FF%02x%02x%02x', color.r * 255, color.g * 255, color.b * 255)
end
function PA:GetClassName(class)
return PA.Classes[class]
end
......@@ -230,7 +233,7 @@ function PA:SetTemplate(frame)
if PA.AddOnSkins then
_G.AddOnSkins[1]:SetTemplate(frame)
else
if not frame.SetBackdrop then Mixin(frame, BackdropTemplateMixin) end
if not frame.SetBackdrop then _G.Mixin(frame, _G.BackdropTemplateMixin) end
if frame.SetTemplate then
frame:SetTemplate('Transparent', true)
else
......@@ -248,12 +251,7 @@ function PA:CreateBackdrop(frame)
frame.Backdrop = CreateFrame('Frame', nil, frame)
frame.Backdrop:SetFrameLevel(frame:GetFrameLevel() - 1)
frame.Backdrop:SetOutside(frame)
if not frame.Backdrop.SetBackdrop then Mixin(frame.Backdrop, BackdropTemplateMixin) end
if frame.SetTemplate then
frame.Backdrop:SetTemplate('Transparent', true)
else
PA:SetTemplate(frame.Backdrop)
end
PA:SetTemplate(frame.Backdrop)
end
end
......@@ -516,7 +514,7 @@ PA.Defaults = {
}
}
PA.Options = PA.ACH:Group(PA:Color(PA.Title), nil, 6, 'tab')
PA.Options = PA.ACH:Group(PA:Color(PA.Title), nil, 6, 'tree')
function PA:GetOptions()
PA.AceOptionsPanel.Options.args.ProjectAzilroka = PA.Options
......
......@@ -4,8 +4,7 @@ if PA.Classic then return end
local BB = PA:NewModule('BigButtons', 'AceEvent-3.0')
PA.BB, _G.BigButtons = BB, BB
BB.Title = 'BigButtons'
BB.Header = PA.ACL['|cFF16C3F2Big|r|cFFFFFFFFButtons|r']
BB.Title = PA.ACL['|cFF16C3F2Big|r |cFFFFFFFFButtons|r']
BB.Description = PA.ACL['A farm tool for Sunsong Ranch.']
BB.Authors = 'Azilroka NihilisticPandemonium'
BB.isEnabled = false
......@@ -238,7 +237,7 @@ end
function BB:GetOptions()
PA.Options.args.BigButtons = PA.ACH:Group(BB.Title, BB.Description, nil, nil, function(info) return BB.db[info[#info]] end)
PA.Options.args.BigButtons.args.Header = PA.ACH:Header(BB.Header, 0)
PA.Options.args.BigButtons.args.Description = PA.ACH:Description(BB.Description, 0)
PA.Options.args.BigButtons.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) BB.db[info[#info]] = value if not BB.isEnabled then BB:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.BigButtons.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, nil, function(info, value) BB.db[info[#info]] = value BB:Update() end)
......
......@@ -7,8 +7,7 @@ local pairs = pairs
local tinsert = tinsert
local tremove = tremove
BrokerLDB.Title = 'BrokerLDB'
BrokerLDB.Header = PA.ACL['|cFF16C3F2Broker|r|cFFFFFFFFLDB|r']
BrokerLDB.Title = PA.ACL['|cFF16C3F2Broker|r|cFFFFFFFFLDB|r']
BrokerLDB.Description = PA.ACL['Provides a Custom DataBroker Bar']
BrokerLDB.Authors = 'Azilroka'
BrokerLDB.isEnabled = false
......@@ -232,7 +231,7 @@ end
function BrokerLDB:GetOptions()
PA.Options.args.BrokerLDB = PA.ACH:Group(BrokerLDB.Title, BrokerLDB.Description, nil, nil, function(info) return BrokerLDB.db[info[#info]] end)
PA.Options.args.BrokerLDB.args.Header = PA.ACH:Header(BrokerLDB.Header, 0)
PA.Options.args.BrokerLDB.args.Description = PA.ACH:Description(BrokerLDB.Description, 0)
PA.Options.args.BrokerLDB.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) BrokerLDB.db[info[#info]] = value if not BrokerLDB.isEnabled then BrokerLDB:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.BrokerLDB.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, nil, function(info, value) BrokerLDB.db[info[#info]] = value BrokerLDB:Update() end)
......@@ -247,7 +246,7 @@ function BrokerLDB:GetOptions()
PA.Options.args.BrokerLDB.args.General.args.FontSettings = PA.ACH:Group(PA.ACL['Font Settings'], nil, -1)
PA.Options.args.BrokerLDB.args.General.args.FontSettings.inline = true
PA.Options.args.BrokerLDB.args.General.args.FontSettings.args.Font = PA.ACH:SharedMediaFont(PA.ACL['Font'], nil, 1)
PA.Options.args.BrokerLDB.args.General.args.FontSettings.args.FontSize = PA.ACH:Range(FONT_SIZE, nil, 2, { min = 6, max = 22, step = 1 })
PA.Options.args.BrokerLDB.args.General.args.FontSettings.args.FontSize = PA.ACH:Range(PA.ACL['Font Size'], nil, 2, { min = 6, max = 22, step = 1 })
PA.Options.args.BrokerLDB.args.General.args.FontSettings.args.FontFlag = PA.ACH:FontFlags(PA.ACL['Font Outline'], nil, 3)
PA.Options.args.BrokerLDB.args.AuthorHeader = PA.ACH:Header(PA.ACL['Authors:'], -2)
......
......@@ -7,8 +7,7 @@ local pairs, tinsert, select, unpack = pairs, tinsert, select, unpack
local strfind, strsub = strfind, strsub
local UnitIsPlayer, UnitClass, UnitClassification = UnitIsPlayer, UnitClass, UnitClassification
DO.Title = 'Dragon Overlay'
DO.Header = PA.ACL['|cFF16C3F2Dragon|r |cFFFFFFFFOverlay|r']
DO.Title = PA.ACL['|cFF16C3F2Dragon|r |cFFFFFFFFOverlay|r']
DO.Description = PA.ACL['Provides an overlay on UnitFrames for Boss, Elite, Rare and RareElite']
DO.Authors = 'Azilroka NihilisticPandemonium'
DO.ImageCredits = 'Codeblake Kkthnxbye Narley Durandil'
......@@ -61,7 +60,7 @@ end
function DO:GetOptions()
PA.Options.args.DragonOverlay = PA.ACH:Group(DO.Title, DO.Description, nil, nil, function(info) return DO.db[info[#info]] end)
PA.Options.args.DragonOverlay.args.Header = PA.ACH:Header(DO.Header, 0)
PA.Options.args.DragonOverlay.args.Description = PA.ACH:Description(DO.Description, 0)
PA.Options.args.DragonOverlay.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) DO.db[info[#info]] = value if not DO.isEnabled then DO:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.DragonOverlay.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, nil, function(info, value) DO.db[info[#info]] = value DO:SetOverlay() end)
......
......@@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka
local EFL = PA:NewModule('EnhancedFriendsList', 'AceEvent-3.0', 'AceHook-3.0', 'AceTimer-3.0')
PA.EFL, _G.EnhancedFriendsList = EFL, EFL
EFL.Title = 'Enhanced Friends List'
EFL.Header = PA.ACL['|cFF16C3F2Enhanced|r |cFFFFFFFFFriends List|r']
EFL.Title = PA.ACL['|cFF16C3F2Enhanced|r |cFFFFFFFFFriends List|r']
EFL.Description = PA.ACL['Provides Friends List Customization']
EFL.Authors = 'Azilroka'
EFL.Credits = 'Marotheit Merathilis'
......@@ -30,131 +29,31 @@ local isBNConnected = _G.BNConnected()
local LEVEL = LEVEL
--[[
/run for i,v in pairs(_G) do if type(v)=="string" and v:match("Honorable") then print(i,"=",v) end end
/run for i,v in pairs(_G) do if type(v)=="string" and i:match("BNET_CLIENT_") then print(i,"=",v) end end
]]
EFL.Icons = {
Game = {
Alliance = {
Name = _G.FACTION_ALLIANCE,
Order = 1,
Default = "Interface/FriendsFrame/Battlenet-WoWicon",
Launcher = MediaPath..'GameIcons/Launcher/Alliance',
},
Horde = {
Name = _G.FACTION_HORDE,
Order = 2,
Default = 'Interface/FriendsFrame/Battlenet-WoWicon',
Launcher = MediaPath..'GameIcons/Launcher/Horde',
},
Neutral = {
Name = _G.FACTION_STANDING_LABEL4,
Order = 3,
Default = 'Interface/FriendsFrame/Battlenet-WoWicon',
Launcher = MediaPath..'GameIcons/Launcher/WoW',
},
App = {
Name = PA.ACL['App'],
Order = 4,
Color = '82C5FF',
Default = 'Interface/FriendsFrame/Battlenet-Battleneticon',
Launcher = MediaPath..'GameIcons/Launcher/BattleNet',
},
BSAp = {
Name = PA.ACL['Mobile'],
Order = 5,
Color = '82C5FF',
Default = 'Interface/FriendsFrame/Battlenet-Battleneticon',
Launcher = MediaPath..'GameIcons/Launcher/BattleNet',
},
[_G.BNET_CLIENT_D3 or 'D3'] = {
Name = PA.ACL['Diablo 3'],
Color = 'C41F3B',
Default = 'Interface/FriendsFrame/Battlenet-D3icon',
Launcher = MediaPath..'GameIcons/Launcher/D3',
},
[_G.BNET_CLIENT_WTCG or 'WTCG'] = {
Name = PA.ACL['Hearthstone'],
Color = 'FFB100',
Default = 'Interface/FriendsFrame/Battlenet-WTCGicon',
Launcher = MediaPath..'GameIcons/Launcher/Hearthstone',
},
[_G.BNET_CLIENT_SC or 'S1'] = {
Name = PA.ACL['Starcraft'],
Color = 'C495DD',
Default = 'Interface/FriendsFrame/Battlenet-Sc2icon',
Launcher = MediaPath..'GameIcons/Launcher/SC',
},
[_G.BNET_CLIENT_SC2 or 'S2'] = {
Name = PA.ACL['Starcraft 2'],
Color = 'C495DD',
Default = "Interface/ChatFrame/UI-ChatIcon-SC2",
Launcher = MediaPath..'GameIcons/Launcher/SC2',
},
[_G.BNET_CLIENT_HEROES or 'Hero'] = {
Name = PA.ACL['Hero of the Storm'],
Color = '00CCFF',
Default = 'Interface/FriendsFrame/Battlenet-HotSicon',
Launcher = MediaPath..'GameIcons/Launcher/Heroes',
},
[_G.BNET_CLIENT_OVERWATCH or 'Pro'] = {
Name = PA.ACL['Overwatch'],
Color = 'FFFFFF',
Default = 'Interface/FriendsFrame/Battlenet-Overwatchicon',
Launcher = MediaPath..'GameIcons/Launcher/Overwatch',
},
[_G.BNET_CLIENT_COD or 'VIPR'] = {
Name = PA.ACL['Call of Duty 4'],
Color = 'FFFFFF',
Default = 'Interface/FriendsFrame/Battlenet-CallOfDutyBlackOps4icon',
Launcher = MediaPath..'GameIcons/Launcher/COD4',
},
[_G.BNET_CLIENT_COD_MW or 'ODIN'] = {
Name = PA.ACL['Call of Duty Modern Warfare'],
Color = 'FFFFFF',
Default = 'Interface/FriendsFrame/Battlenet-CallOfDutyMWicon',
Launcher = MediaPath..'GameIcons/Launcher/CODMW',
},
[_G.BNET_CLIENT_WC3 or 'W3'] = {
Name = PA.ACL['Warcraft 3 Reforged'],
Color = 'FFFFFF',
Default = "Interface/FriendsFrame/Battlenet-Warcraft3Reforged",
Launcher = MediaPath..'GameIcons/Launcher/WC3R',
},
Alliance = { Name = _G.FACTION_ALLIANCE, Order = 1, Default = "Interface/FriendsFrame/Battlenet-WoWicon", Launcher = MediaPath..'GameIcons/Launcher/Alliance' },
Horde = { Name = _G.FACTION_HORDE, Order = 2, Default = 'Interface/FriendsFrame/Battlenet-WoWicon', Launcher = MediaPath..'GameIcons/Launcher/Horde' },
Neutral = { Name = _G.FACTION_STANDING_LABEL4, Order = 3, Default = 'Interface/FriendsFrame/Battlenet-WoWicon', Launcher = MediaPath..'GameIcons/Launcher/WoW' },
App = { Name = PA.ACL['App'], Order = 4, Color = '82C5FF', Default = 'Interface/FriendsFrame/Battlenet-Battleneticon', Launcher = MediaPath..'GameIcons/Launcher/BattleNet' },
BSAp = { Name = PA.ACL['Mobile'], Order = 5, Color = '82C5FF', Default = 'Interface/FriendsFrame/Battlenet-Battleneticon', Launcher = MediaPath..'GameIcons/Launcher/BattleNet' },
D3 = { Name = PA.ACL['Diablo 3'], Color = 'C41F3B', Default = 'Interface/FriendsFrame/Battlenet-D3icon', Launcher = MediaPath..'GameIcons/Launcher/D3' },
WTCG = { Name = PA.ACL['Hearthstone'], Color = 'FFB100', Default = 'Interface/FriendsFrame/Battlenet-WTCGicon', Launcher = MediaPath..'GameIcons/Launcher/Hearthstone' },
S1 = { Name = PA.ACL['Starcraft'], Color = 'C495DD', Default = 'Interface/FriendsFrame/Battlenet-Sc2icon', Launcher = MediaPath..'GameIcons/Launcher/SC' },
S2 = { Name = PA.ACL['Starcraft 2'], Color = 'C495DD', Default = "Interface/ChatFrame/UI-ChatIcon-SC2", Launcher = MediaPath..'GameIcons/Launcher/SC2' },
Hero = { Name = PA.ACL['Hero of the Storm'], Color = '00CCFF', Default = 'Interface/FriendsFrame/Battlenet-HotSicon', Launcher = MediaPath..'GameIcons/Launcher/Heroes' },
Pro = { Name = PA.ACL['Overwatch'], Color = 'FFFFFF', Default = 'Interface/FriendsFrame/Battlenet-Overwatchicon', Launcher = MediaPath..'GameIcons/Launcher/Overwatch' },
VIPR = { Name = PA.ACL['Call of Duty 4'], Color = 'FFFFFF', Default = 'Interface/FriendsFrame/Battlenet-CallOfDutyBlackOps4icon', Launcher = MediaPath..'GameIcons/Launcher/COD4' },
ODIN = { Name = PA.ACL['Call of Duty Modern Warfare'], Color = 'FFFFFF', Default = 'Interface/FriendsFrame/Battlenet-CallOfDutyMWicon', Launcher = MediaPath..'GameIcons/Launcher/CODMW' },
W3 = { Name = PA.ACL['Warcraft 3 Reforged'], Color = 'FFFFFF', Default = "Interface/FriendsFrame/Battlenet-Warcraft3Reforged", Launcher = MediaPath..'GameIcons/Launcher/WC3R' },
},
Status = {
Online = {
Name = _G.FRIENDS_LIST_ONLINE,
Order = 1,
Default = _G.FRIENDS_TEXTURE_ONLINE,
Square = MediaPath..'StatusIcons/Square/Online',
D3 = MediaPath..'StatusIcons/D3/Online',
Color = {.243, .57, 1},
},
Offline = {
Name = _G.FRIENDS_LIST_OFFLINE,
Order = 2,
Default = _G.FRIENDS_TEXTURE_OFFLINE,
Square = MediaPath..'StatusIcons/Square/Offline',
D3 = MediaPath..'StatusIcons/D3/Offline',
Color = {.486, .518, .541},
},
DND = {
Name = _G.DEFAULT_DND_MESSAGE,
Order = 3,
Default = _G.FRIENDS_TEXTURE_DND,
Square = MediaPath..'StatusIcons/Square/DND',
D3 = MediaPath..'StatusIcons/D3/DND',
Color = {1, 0, 0},
},
AFK = {
Name = _G.DEFAULT_AFK_MESSAGE,
Order = 4,
Default = _G.FRIENDS_TEXTURE_AFK,
Square = MediaPath..'StatusIcons/Square/AFK',
D3 = MediaPath..'StatusIcons/D3/AFK',
Color = {1, 1, 0},
},
Online = { Name = _G.FRIENDS_LIST_ONLINE, Order = 1, Default = _G.FRIENDS_TEXTURE_ONLINE, Square = MediaPath..'StatusIcons/Square/Online', D3 = MediaPath..'StatusIcons/D3/Online', Color = {.243, .57, 1} },
Offline = { Name = _G.FRIENDS_LIST_OFFLINE, Order = 2, Default = _G.FRIENDS_TEXTURE_OFFLINE, Square = MediaPath..'StatusIcons/Square/Offline', D3 = MediaPath..'StatusIcons/D3/Offline', Color = {.486, .518, .541} },
DND = { Name = _G.DEFAULT_DND_MESSAGE, Order = 3, Default = _G.FRIENDS_TEXTURE_DND, Square = MediaPath..'StatusIcons/Square/DND', D3 = MediaPath..'StatusIcons/D3/DND', Color = {1, 0, 0} },
AFK = { Name = _G.DEFAULT_AFK_MESSAGE, Order = 4, Default = _G.FRIENDS_TEXTURE_AFK, Square = MediaPath..'StatusIcons/Square/AFK', D3 = MediaPath..'StatusIcons/D3/AFK', Color = {1, 1, 0} },
}
}
......@@ -299,7 +198,7 @@ end
function EFL:GetOptions()
PA.Options.args.EnhancedFriendsList = PA.ACH:Group(EFL.Title, EFL.Description, nil, nil, function(info) return EFL.db[info[#info]] end, function(info, value) EFL.db[info[#info]] = value _G.FriendsFrame_Update() end)
PA.Options.args.EnhancedFriendsList.args.Header = PA.ACH:Header(EFL.Header, 0)
PA.Options.args.EnhancedFriendsList.args.Description = PA.ACH:Description(EFL.Description, 0)
PA.Options.args.EnhancedFriendsList.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) EFL.db[info[#info]] = value if not EFL.isEnabled then EFL:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.EnhancedFriendsList.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2)
......
......@@ -5,8 +5,7 @@ end
local EPB = PA:NewModule("EnhancedPetBattleUI", "AceEvent-3.0")
EPB.Title = "Enhanced Pet Battle UI"
EPB.Header = "|cFF16C3F2Enhanced|r |cFFFFFFFFPet Battle UI|r"
EPB.Title = "|cFF16C3F2Enhanced|r |cFFFFFFFFPet Battle UI|r"
EPB.Description = ""
EPB.Authors = "Azilroka NihilisticPandemonium"
EPB.isEnabled = false
......@@ -1237,10 +1236,10 @@ function EPB:GetOptions()
EPB:Update()
end,
args = {
Header = {
Description = {
order = 0,
type = "header",
name = EPB.Header
type = "description",
name = EPB.Description
},
Enable = {
order = 1,
......
......@@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka
local ES = PA:NewModule('EnhancedShadows', 'AceEvent-3.0', 'AceTimer-3.0')
PA.ES = ES
ES.Title = 'Enhanced Shadows'
ES.Header = PA.ACL['|cFF16C3F2Enhanced|r |cFFFFFFFFShadows|r']
ES.Title = PA.ACL['|cFF16C3F2Enhanced|r |cFFFFFFFFShadows|r']
ES.Description = PA.ACL['Adds options for registered shadows']
ES.Authors = 'Azilroka NihilisticPandemonium'
ES.isEnabled = false
......@@ -66,7 +65,7 @@ end
function ES:GetOptions()
PA.Options.args.EnhancedShadows = PA.ACH:Group(ES.Title, ES.Description, nil, nil, function(info) return ES.db[info[#info]] end)
PA.Options.args.EnhancedShadows.args.Header = PA.ACH:Header(ES.Header, 0)
PA.Options.args.EnhancedShadows.args.Description = PA.ACH:Description(ES.Description, 0)
PA.Options.args.EnhancedShadows.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) ES.db[info[#info]] = value if not ES.isEnabled then ES:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.EnhancedShadows.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2, nil, nil, function(info, value) ES.db[info[#info]] = value ES:UpdateShadows() end)
......
......@@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka
local FL = PA:NewModule('FasterLoot', 'AceEvent-3.0')
PA.FL, _G.FasterLoot = FL, FL
FL.Title = 'Faster Loot'
FL.Header = PA.ACL['|cFF16C3F2Faster|r |cFFFFFFFFLoot|r']
FL.Title = PA.ACL['|cFF16C3F2Faster|r |cFFFFFFFFLoot|r']
FL.Description = PA.ACL['Increases auto loot speed near instantaneous.']
FL.Authors = 'Azilroka'
FL.isEnabled = false
......@@ -63,7 +62,7 @@ end
function FL:GetOptions()
PA.Options.args.FasterLoot = PA.ACH:Group(FL.Title, FL.Description, nil, nil, function(info) return FL.db[info[#info]] end)
PA.Options.args.FasterLoot.args.Header = PA.ACH:Header(FL.Header, 0)
PA.Options.args.FasterLoot.args.Description = PA.ACH:Header(FL.Description, 0)
PA.Options.args.FasterLoot.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) FL.db[info[#info]] = value if not FL.isEnabled then FL:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.FasterLoot.args.AuthorHeader = PA.ACH:Header(PA.ACL['Authors:'], -2)
......
......@@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka
local FG = PA:NewModule('FriendGroups', 'AceEvent-3.0', 'AceTimer-3.0', 'AceHook-3.0')
_G.FriendGroups= FG
FG.Title = 'Friend Groups'
FG.Header = PA.ACL['|cFF16C3F2Friend|r |cFFFFFFFFGroups|r']
FG.Title = PA.ACL['|cFF16C3F2Friend|r |cFFFFFFFFGroups|r']
FG.Description = PA.ACL['Manage Firends List with Groups']
FG.Authors = 'Azilroka'
FG.Credits = 'Mikeprod frankkkkk'
......@@ -950,10 +949,10 @@ function FG:GetOptions()
get = function(info) return FG.db[info[#info]] end,
set = function(info, value) FG.db[info[#info]] = value end,
args = {
Header = {
Description = {
order = 0,
type = 'header',
name = FG.Header,
type = 'description',
name = FG.Description,
},
Enable = {
order = 1,
......
......@@ -4,8 +4,7 @@ if PA.Retail then return end
local LC = PA:NewModule('LootConfirm', 'AceEvent-3.0')
PA.LC, _G.LootConfirm = LC, LC
LC.Title = 'Loot Confirm'
LC.Header = PA.ACL['|cFF16C3F2Loot|r |cFFFFFFFFConfirm|r']
LC.Title = PA.ACL['|cFF16C3F2Loot|r |cFFFFFFFFConfirm|r']
LC.Description = PA.ACL['Confirms Loot for Solo/Groups (Need/Greed)']
LC.Authors = 'Azilroka NihilisticPandemonium'
LC.isEnabled = false
......@@ -50,7 +49,7 @@ end
function LC:GetOptions()
PA.Options.args.LootConfirm = PA.ACH:Group(LC.Title, LC.Description, nil, nil, function(info) return LC.db[info[#info]] end)
PA.Options.args.LootConfirm.args.Header = PA.ACH:Header(LC.Header, 0)
PA.Options.args.LootConfirm.args.Description = PA.ACH:Description(LC.Description, 0)
PA.Options.args.LootConfirm.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) LC.db[info[#info]] = value if not LC.isEnabled then LC:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.LootConfirm.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2)
......
This diff is collapsed.
......@@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka
local MA = PA:NewModule('MouseoverAuras', 'AceEvent-3.0', 'AceTimer-3.0')
PA.MA = MA
MA.Title = 'MouseoverAuras'
MA.Header = PA.ACL['|cFF16C3F2Mouseover|r|cFFFFFFFFAuras|r']
MA.Title = PA.ACL['|cFF16C3F2Mouseover|r|cFFFFFFFFAuras|r']
MA.Description = PA.ACL['Auras for your mouseover target']
MA.Authors = 'Azilroka'
MA.isEnabled = false
......@@ -207,10 +206,10 @@ function MA:GetOptions()
get = function(info) return MA.db[info[#info]] end,
set = function(info, value) MA.db[info[#info]] = value MA:SetPosition() end,
args = {
Header = {
Description = {
order = 0,
type = 'header',
name = MA.Header,
type = 'description',
name = MA.Description,
},
Enable = {
order = 1,
......
......@@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka
local MF = PA:NewModule('MovableFrames', 'AceEvent-3.0', 'AceHook-3.0')
PA.MF, _G.MovableFrames = MF, MF
MF.Title = 'Movable Frames'
MF.Header = PA.ACL['|cFF16C3F2Movable|r |cFFFFFFFFFrames|r']
MF.Title = PA.ACL['|cFF16C3F2Movable|r |cFFFFFFFFFrames|r']
MF.Description = PA.ACL['Make Blizzard Frames Movable']
MF.Authors = 'Azilroka Simpy'
MF.isEnabled = false
......@@ -289,7 +288,7 @@ end
function MF:GetOptions()
PA.Options.args.MovableFrames = PA.ACH:Group(MF.Title, MF.Description, nil, nil, function(info) return MF.db[info[#info]] end, function(info, value) MF.db[info[#info]] = value MF:Update() end)
PA.Options.args.MovableFrames.args.Header = PA.ACH:Header(MF.Header, 0)
PA.Options.args.MovableFrames.args.Header = PA.ACH:Description(MF.Description, 0)
PA.Options.args.MovableFrames.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) MF.db[info[#info]] = value if (not MF.isEnabled) then MF:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.MovableFrames.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2)
PA.Options.args.MovableFrames.args.General.inline = true
......
......@@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka
local OzCD = PA:NewModule('OzCooldowns', 'AceEvent-3.0', 'AceTimer-3.0')
PA.OzCD = OzCD
OzCD.Title = 'OzCooldowns'
OzCD.Header = '|cFF16C3F2Oz|r|cFFFFFFFFCooldowns|r'
OzCD.Title = '|cFF16C3F2Oz|r|cFFFFFFFFCooldowns|r'
OzCD.Description = 'Minimalistic Cooldowns'
OzCD.Authors = 'Azilroka Nimaear'
OzCD.isEnabled = false
......@@ -447,7 +446,7 @@ function OzCD:GetOptions()
OzCD:UpdateSettings()
PA.Options.args.OzCooldowns = PA.ACH:Group(OzCD.Title, OzCD.Description, nil, nil, function(info) return OzCD.db[info[#info]] end, function(info, value) OzCD.db[info[#info]] = value end)
PA.Options.args.OzCooldowns.args.Header = PA.ACH:Header(OzCD.Header, 0)
PA.Options.args.OzCooldowns.args.Description = PA.ACH:Description(OzCD.Description, 0)
PA.Options.args.OzCooldowns.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) OzCD.db[info[#info]] = value if (not OzCD.isEnabled) then OzCD:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.OzCooldowns.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2)
......
......@@ -2,8 +2,7 @@ local PA = _G.ProjectAzilroka
local QS = PA:NewModule('QuestSounds', 'AceEvent-3.0', 'AceTimer-3.0')
PA.QS = QS
QS.Title = 'QuestSounds'
QS.Header = PA.ACL['|cFF16C3F2Quest|r|cFFFFFFFFSounds|r']
QS.Title = PA.ACL['|cFF16C3F2Quest|r|cFFFFFFFFSounds|r']
QS.Description = PA.ACL['Audio for Quest Progress & Completions.']
QS.Authors = 'Azilroka'
QS.Credits = 'Yoco'
......@@ -141,7 +140,7 @@ end
function QS:GetOptions()
PA.Options.args.QuestSounds = PA.ACH:Group(QS.Title, QS.Description, nil, nil, function(info) return QS.db[info[#info]] end, function(info, value) QS.db[info[#info]] = value end)
PA.Options.args.QuestSounds.args.Header = PA.ACH:Header(QS.Header, 0)
PA.Options.args.QuestSounds.args.Description = PA.ACH:Description(QS.Description, 0)
PA.Options.args.QuestSounds.args.Enable = PA.ACH:Toggle(PA.ACL['Enable'], nil, 1, nil, nil, nil, nil, function(info, value) QS.db[info[#info]] = value if (not QS.isEnabled) then QS:Initialize() else _G.StaticPopup_Show('PROJECTAZILROKA_RL') end end)
PA.Options.args.QuestSounds.args.General = PA.ACH:Group(PA.ACL['General'], nil, 2)
......
......@@ -3,8 +3,7 @@ local AR = PA:NewModule('AuraReminder', 'AceEvent-3.0', 'AceTimer-3.0')
PA.AR = AR
AR.Title = 'Aura Reminder'
AR.Header = '|cFF16C3F2Aura|r |cFFFFFFFFReminder|r'
AR.Title = '|cFF16C3F2Aura|r |cFFFFFFFFReminder|r'
AR.Description = 'Reminder for Buffs / Debuffs'
AR.Authors = 'Azilroka NihilisticPandemonium'
AR.isEnabled = false
......@@ -318,14 +317,14 @@ local addGroupTemplate = { name = '', template = ''}
function AR:GetOptions()
PA.Options.args.AuraReminder = {
type = 'group',
name = 'Aura Reminder',
name = AR.Title,
get = function(info) return AR.db[info[#info]] end,
set = function(info, value) AR.db[info[#info]] = value end,
args = {
Header = {
Description = {
order = 0,
type = 'header',
name = AR.Header,
type = 'description',
name = AR.Description,
},
Enable = {
order = 1,
......
......@@ -4,8 +4,7 @@ if PA.Classic then return end
local RR = PA:NewModule('ReputationReward', 'AceEvent-3.0', 'AceTimer-3.0', 'AceHook-3.0')
PA.RR = RR
RR.Title = 'ReputationRewards'
RR.Header = PA.ACL['|cFF16C3F2Reputation|r|cFFFFFFFFRewards|r']
RR.Title = PA.ACL['|cFF16C3F2Reputation|r|cFFFFFFFFRewards|r']
RR.Description = PA.ACL['Adds Reputation into Quest Log & Quest Frame.']
RR.Authors = 'Azilroka'
RR.isEnabled = false
......@@ -13,6 +12,7 @@ RR.isEnabled = false
local _G = _G
local floor = floor
local pairs = pairs
local ipairs = ipairs
local select = select
local wipe = wipe
local mod = mod
......@@ -24,7 +24,6 @@ local GetNumQuestLogRewardFactions = _G.GetNumQuestLogRewardFactions
local GetQuestLogRewardFactionInfo = _G.GetQuestLogRewardFactionInfo
local GetQuestLogTitle = _G.GetQuestLogTitle
local GetQuestLogSelection = _G.GetQuestLogSelection
local C_QuestLog = _G.C_QuestLog
local GetNumQuestLogChoices = _G.GetNumQuestLogChoices
local GetNumQuestChoices = _G.GetNumQuestChoices
local UnitAura = _G.UnitAura
......@@ -111,7 +110,7 @@ function RR:Show()
if ( _G.QuestInfoFrame.questLog ) then
local questID = select(8, GetQuestLogTitle(GetQuestLogSelection()))
if C_QuestLog.ShouldShowQuestRewards(questID) then
if _G.C_QuestLog.ShouldShowQuestRewards(questID) then
numQuestChoices = GetNumQuestLogChoices()
end
else
......@@ -151,7 +150,7 @@ function RR:Show()
end
end
local rewardsFrame, lastFrame = QuestInfo_ShowRewards()
local rewardsFrame, lastFrame = _G.QuestInfo_ShowRewards()
if not rewardsFrame then return end
local buttonHeight = rewardsFrame.RewardButtons[1]:GetHeight()
......@@ -187,18 +186,13 @@ function RR:Show()
if Info.Base < 0 then r, g, b = 1, 0, 0 elseif Info.Bonus > 0 then r, g, b = 0, 1, 0 end
questItem.Count:SetTextColor(r, g, b)
questItem:ClearAllPoints()
if (buttonIndex > 1) then
if mod(buttonIndex, 2) == 1 then
questItem:SetPoint('TOPLEFT', QuestInfo_GetRewardButton(rewardsFrame, buttonIndex - 2) or lastFrame, 'BOTTOMLEFT', 0, -REWARDS_SECTION_OFFSET)
Height = Height + buttonHeight + REWARDS_SECTION_OFFSET
lastFrame = questItem
else
questItem:SetPoint('TOPLEFT', QuestInfo_GetRewardButton(rewardsFrame, buttonIndex - 1) or lastFrame, 'TOPRIGHT', 2, 0)
end
else
questItem:SetPoint('TOPLEFT', lastFrame, 'BOTTOMLEFT', 0, -REWARDS_SECTION_OFFSET)
Height = Height + buttonHeight + REWARDS_SECTION_OFFSET
lastFrame = questItem
end
......@@ -218,7 +212,7 @@ end
function RR:GetOptions()
PA.Options.args.ReputationReward = PA.ACH:Group(RR.Title, RR.Description, nil, nil, function(info) return RR.db[info[#info]] end, function(info, value) RR.db[info[#info]] = value end)
PA.Options.args.ReputationReward.args.Header = PA.ACH:Header(RR.Header, 0)
PA.Options.args.ReputationReward.args.Description = PA.ACH:Description(RR.Description, 0)