Commit 1f8936d6 authored by Azilroka's avatar Azilroka
Browse files

Yoda

parent 18b703b2
......@@ -291,10 +291,6 @@ function AS:StartSkinning()
end
for addonName, funcs in AS:OrderedPairs(AS.skins) do
if AS:CheckAddOn('ElvUI') and AS:GetElvUIBlizzardSkinOption(addonName) then
AS:SetOption(addonName, false)
end
-- Check Blizzard
if AS:CheckOption(addonName) and strfind(addonName, 'Blizzard_') then
for _, func in ipairs(funcs) do
......
......@@ -2,75 +2,6 @@ local AS = unpack(AddOnSkins)
if not AS:CheckAddOn('ElvUI') then return end
local E
-- Cache global variables
--Lua functions
local pairs = pairs
--WoW API / Variables
-- GLOBALS:
local ElvUISkinTable = {
["Blizzard_AchievementUI"] = { 'achievement' },
["Blizzard_AddonManager"] = { 'addonManager' },
["Blizzard_ArchaeologyUI"] = { 'archaeology' },
["Blizzard_AuctionHouse"] = { 'auctionhouse' },
["Blizzard_Bags"] = { 'bags' },
["Blizzard_BlackMarket"] = { 'bmah' },
["Blizzard_BarberShop"] = { 'barber' },
["Blizzard_Calendar"] = { 'calendar' },
["Blizzard_ChallengesUI"] = { 'lfg'},
['Blizzard_CharacterFrame'] = { 'character' },
["Blizzard_Collections"] = { 'collections' },
["Blizzard_DeathRecap"] = { 'deathRecap' },
["Blizzard_DebugTools"] = { 'debug' },
["Blizzard_DressUpFrame"] = { 'dressingroom' },
["Blizzard_EncounterJournal"] = { 'encounterjournal' },
["Blizzard_Friends"] = { 'friends' },
["Blizzard_Garrison"] = { 'garrison' },
["Blizzard_Gossip"] = { 'gossip' },
["Blizzard_Guild"] = { 'gbank', 'guild', 'guildcontrol', 'guildregistrar' },
["Blizzard_Inspect"] = { 'inspect' },
["Blizzard_ItemSocketing"] = { 'socket' },
["Blizzard_LootFrames"] = { 'loot' },
["Blizzard_MacroUI"] = { 'macro' },
["Blizzard_Mail"] = { 'mail' },
["Blizzard_Merchant"] = { 'merchant' },
["Blizzard_Options"] = { 'misc'},
["Blizzard_PvE"] = { 'lfg' },
["Blizzard_PVPUI"] = { 'pvp' },
["Blizzard_Quest"] = { 'quest' },
["Blizzard_RaidUI"] = { 'raid' },
["Blizzard_Spellbook"] = { 'spellbook' },
["Blizzard_StackSplit"] = { 'misc' },
["Blizzard_Talent"] = { 'talent' },
["Blizzard_Taxi"] = { 'taxi' },
["Blizzard_TimeManager"] = { 'timemanager' },
["Blizzard_TradeSkill"] = { 'tradeskill' },
["Blizzard_TradeWindow"] = { 'trade' },
["Blizzard_Trainer"] = { 'trainer' },
["Blizzard_VoidStorage"] = { 'voidstorage' },
["Blizzard_WorldMap"] = { 'worldmap' },
["Blizzard_Others"] = { 'misc' },
}
function AS:SetElvUIBlizzardSkinOption(skin, value)
if ElvUISkinTable[skin] then
for _, option in pairs(ElvUISkinTable[skin]) do
E.private.skins.blizzard[option] = value
end
end
end
function AS:GetElvUIBlizzardSkinOption(skin)
if ElvUISkinTable[skin] then
for _, option in pairs(ElvUISkinTable[skin]) do
if E.private.skins.blizzard[option] == true then
return true
end
end
end
return false
end
function AS:UpdateMedia()
if not ElvUI then return end
if not E then
......
......@@ -423,9 +423,6 @@ AS.Options = {
func = function()
for SkinName in pairs(BlizzardSkins) do
AS:SetOption(SkinName, true)
if AS:CheckAddOn('ElvUI') then
AS:SetElvUIBlizzardSkinOption(SkinName, false)
end
end
end,
},
......@@ -436,9 +433,6 @@ AS.Options = {
func = function()
for SkinName in pairs(BlizzardSkins) do
AS:SetOption(SkinName, false)
if AS:CheckAddOn('ElvUI') then
AS:SetElvUIBlizzardSkinOption(SkinName, true)
end
end
end,
},
......@@ -465,19 +459,26 @@ AS.Options = {
get = function(info) return AS:CheckOption(info[#info]) end,
set = function(info, value) AS:SetOption(info[#info], value) AS:Embed_Check() end,
args = {
EmbedHeader = {
EmbedIsHidden = {
order = 0,
type = 'toggle',
name = ASL['|cFFFF0000Embed is HIDDEN|r'],
hidden = function() return not AS:CheckOption('EmbedIsHidden') end,
width = 'full',
},
EmbedHeader = {
order = 1,
type = 'header',
name = AS:GetColor(ASL['Embed Settings']),
},
EmbedSystemMessage = {
type = 'toggle',
name = ASL['Embed System Message'],
order = 1,
order = 2,
},
HideChatFrame = {
name = ASL['Hide Chat Frame'],
order = 2,
order = 3,
type = 'select',
values = function() return AS:GetChatWindowInfo() end,
disabled = function() return not (AS:CheckOption('EmbedSystemDual') or AS:CheckOption('EmbedSystem')) end,
......@@ -485,54 +486,54 @@ AS.Options = {
EmbedRightChat = {
type = 'toggle',
name = ASL['Embed into Right Chat Panel'],
order = 3,
order = 4,
},
EmbedBelowTop = {
type = 'toggle',
name = ASL['Embed Below Top Tab'],
order = 4,
order = 5,
},
EmbedBackdrop = {
type = 'toggle',
name = ASL['Backdrop'],
order = 5,
order = 6,
},
EmbedBackdropTransparent = {
type = 'toggle',
name = ASL['Transparent Backdrop'],
order = 6,
order = 7,
},
spacer1 = {
order = 7,
order = 8,
type = 'header',
name = '',
},
EmbedSystem = {
order = 8,
order = 9,
type = 'toggle',
name = ASL['One Window Embed System'],
disabled = function() return AS:CheckOption('EmbedSystemDual') end,
},
EmbedMain = {
order = 9,
order = 10,
type = 'select',
name = ASL['Embed for One Window'],
disabled = function() return not AS:CheckOption('EmbedSystem') end,
values = Embeds,
},
spacer2 = {
order = 10,
order = 11,
type = 'header',
name = '',
},
EmbedSystemDual = {
order = 11,
order = 12,
type = 'toggle',
name = ASL['Two Window Embed System'],
disabled = function() return AS:CheckOption('EmbedSystem') end,
},
EmbedLeft = {
order = 12,
order = 13,
type = 'select',
name = ASL["Window One Embed"],
disabled = function() return not AS:CheckOption('EmbedSystemDual') end,
......@@ -540,26 +541,26 @@ AS.Options = {
},
EmbedLeftWidth = {
type = 'range',
order = 13,
order = 14,
name = ASL['Window One Width'],
min = 100, max = 300, step = 1,
disabled = function() return not AS:CheckOption('EmbedSystemDual') end,
},
EmbedRight = {
order = 14,
order = 15,
type = 'select',
name = ASL["Window Two Embed"],
disabled = function() return not AS:CheckOption('EmbedSystemDual') end,
values = Embeds,
},
spacer3 = {
order = 15,
order = 16,
type = 'header',
name = 'Strata, Level and Combat Options',
},
EmbedFrameStrata = {
name = ASL['Embed Frame Strata'],
order = 16,
order = 17,
type = 'select',
values = {
['1-BACKGROUND'] = 'BACKGROUND',
......@@ -575,7 +576,7 @@ AS.Options = {
},
EmbedFrameLevel = {
name = ASL['Embed Frame Level'],
order = 17,
order = 18,
type = 'range',
min = 1,
max = 255,
......@@ -585,11 +586,11 @@ AS.Options = {
EmbedOoC = {
type = 'toggle',
name = ASL['Out of Combat (Hide)'],
order = 18,
order = 19,
},
EmbedOoCDelay = {
name = ASL['Embed OoC Delay'],
order = 19,
order = 20,
type = 'range',
min = 1, max = 30, step = 1,
disabled = function() return not ((AS:CheckOption('EmbedSystemDual') or AS:CheckOption('EmbedSystem')) and AS:CheckOption('EmbedOoC')) end,
......
......@@ -129,6 +129,7 @@ function AS:Embed_Check(Message)
end
AS:EmbedSystem_WindowResize()
EmbedSystem_MainWindow:SetShown(not AS:CheckOption('EmbedIsHidden'))
for _, Window in pairs({EmbedSystem_MainWindow, EmbedSystem_LeftWindow, EmbedSystem_RightWindow}) do
Window:SetFrameStrata(strsub(AS:CheckOption('EmbedFrameStrata'), 3))
......
......@@ -35,11 +35,11 @@ function AS:EmbedSystemHooks()
if btn == 'RightButton' then
if EmbedSystem_MainWindow:IsShown() then
AS:SetOption('EmbedIsHidden', true)
EmbedSystem_MainWindow:Hide()
else
AS:SetOption('EmbedIsHidden', false)
EmbedSystem_MainWindow:Show()
end
EmbedSystem_MainWindow:SetShown(not AS:CheckOption('EmbedIsHidden'))
else
if E.db[self.parent:GetName()..'Faded'] then
E.db[self.parent:GetName()..'Faded'] = nil
......@@ -76,15 +76,6 @@ function AS:EmbedSystemHooks()
_G.GameTooltip:Show()
end
end)
function HideRightChat()
RightChatToggleButton:Click()
end
function HideBothChat()
LeftChatToggleButton:Click()
RightChatToggleButton:Click()
end
end
end
......@@ -92,14 +83,11 @@ function AS:EmbedSystem_WindowResize()
if UnitAffectingCombat('player') or not AS.EmbedSystemCreated then return end
local ChatPanel = AS:CheckOption('EmbedRightChat') and RightChatPanel or LeftChatPanel
local ChatTab = AS:CheckOption('EmbedRightChat') and RightChatTab or LeftChatTab
local ChatData = AS:CheckOption('EmbedRightChat') and RightChatDataPanel or LeftChatToggleButton
local TopRight = ChatData == RightChatDataPanel and (E.db.datatexts.rightChatPanel and 'TOPLEFT' or 'BOTTOMLEFT') or ChatData == LeftChatToggleButton and (E.db.datatexts.leftChatPanel and 'TOPLEFT' or 'BOTTOMLEFT')
local yOffset = (ChatData == RightChatDataPanel and E.db.datatexts.rightChatPanel and (E.PixelMode and 1 or 0)) or (ChatData == LeftChatToggleButton and E.db.datatexts.leftChatPanel and (E.PixelMode and 1 or 0)) or (E.PixelMode and 0 or -1)
EmbedSystem_MainWindow:SetParent(ChatPanel)
EmbedSystem_MainWindow:ClearAllPoints()
EmbedSystem_MainWindow:SetPoint('BOTTOMLEFT', ChatData, TopRight, 0, yOffset)
EmbedSystem_MainWindow:SetPoint('TOPRIGHT', ChatTab, AS:CheckOption('EmbedBelowTop') and 'BOTTOMRIGHT' or 'TOPRIGHT', 0, AS:CheckOption('EmbedBelowTop') and -1 or 0)
EmbedSystem_MainWindow:SetPoint('BOTTOMLEFT', ChatPanel, 'BOTTOMLEFT', 0, (E.PixelMode and 0 or -1))
EmbedSystem_LeftWindow:SetSize(AS:CheckOption('EmbedLeftWidth'), EmbedSystem_MainWindow:GetHeight())
EmbedSystem_RightWindow:SetSize((EmbedSystem_MainWindow:GetWidth() - AS:CheckOption('EmbedLeftWidth')) - 1, EmbedSystem_MainWindow:GetHeight())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment