Commit ecb440a3 authored by Azilroka's avatar Azilroka
Browse files

Merge branch 'master' into 'master'

Updated InstanceProfits and hopefully ArkInventory 3.09.31

See merge request Azilroka/AddOnSkins!73
parents 20d988f9 2c4ac2bb
......@@ -19,38 +19,39 @@ function AS:ArkInventory()
end
end)
hooksecurefunc(ArkInventory, 'Frame_Main_Anchor_Set', function(loc_id)
local mainframe = ArkInventory.Frame_Main_Get(loc_id):GetName()
local f = _G[mainframe..ArkInventory.Const.Frame.Search.Name..'Filter']
local b = _G[mainframe..ArkInventory.Const.Frame.Search.Name..'Clear']
if f then
AS:SkinEditBox(f)
local bd = f.backdrop or f.Backdrop or nil
if bd then
local bbc = ArkInventory.GetLocationCodex(loc_id).style.bar.border.colour
bd:SetFrameLevel(f:GetFrameLevel())
AS:SetOutside(bd, nil, 1, -5)
bd:SetBackdropBorderColor(bbc.r, bbc.g, bbc.b, bbc.a or 1)
end
end
if b then
AS:SkinButton(b)
b:SetNormalTexture([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
b:SetHighlightTexture([[Interface\Buttons\UI-GroupLoot-Pass-Highlight]])
b:SetPushedTexture([[Interface\Buttons\UI-GroupLoot-Pass-Down]])
end
end)
hooksecurefunc(ArkInventory, 'Frame_Main_Anchor_Set', function(loc_id)
local mainframe = ArkInventory.Frame_Main_Get(loc_id):GetName()
local f = _G[mainframe..ArkInventory.Const.Frame.Search.Name..'Filter']
local b = _G[mainframe..ArkInventory.Const.Frame.Search.Name..'Clear']
if f then
AS:SkinEditBox(f)
local bd = f.backdrop or f.Backdrop or nil
if bd then
local bbc = ArkInventory.GetLocationCodex(loc_id).style.bar.border.colour
bd:SetFrameLevel(f:GetFrameLevel())
AS:SetOutside(bd, nil, 1, -5)
bd:SetBackdropBorderColor(bbc.r, bbc.g, bbc.b, bbc.a or 1)
end
end
if b then
AS:SkinButton(b)
b:SetNormalTexture([[Interface\Buttons\UI-GroupLoot-Pass-Up]])
b:SetHighlightTexture([[Interface\Buttons\UI-GroupLoot-Pass-Highlight]])
b:SetPushedTexture([[Interface\Buttons\UI-GroupLoot-Pass-Down]])
end
end)
hooksecurefunc(ArkInventory, 'Frame_Bar_Paint', function(bar)
local loc_id = bar.ARK_Data.loc_id
if not bar.IsSkinned then
local name = bar:GetName()
if _G[name..'ArkBorder'] then AS:Kill(_G[name..'ArkBorder']) end
if _G[name..'Background'] then AS:Kill(_G[name..'Background']) end
bar.IsSkinned = true
end
hooksecurefunc(ArkInventory, 'Frame_Bar_Paint', function(bar)
local loc_id = bar.ARK_Data.loc_id
if not bar.IsSkinned then
local name = bar:GetName()
if _G[name..'ArkBorder'] then AS:Kill(_G[name..'ArkBorder']) end
if _G[name..'Background'] then AS:Kill(_G[name..'Background']) end
if bar.ArkBorder then AS:Kill(bar.ArkBorder) end
bar.IsSkinned = true
end
AS:SetTemplate(bar)
AS:SetTemplate(bar)
if ArkInventory.Global.Mode.Edit then
bar:SetBackdropBorderColor(1, 0, 0, 1)
......@@ -60,12 +61,12 @@ function AS:ArkInventory()
end
end)
hooksecurefunc(ArkInventory, 'SetItemButtonTexture', function(frame, texture, r, g, b)
if not (frame and frame.icon) then return end
hooksecurefunc(ArkInventory, 'SetItemButtonTexture', function(frame, texture, r, g, b)
if not (frame and frame.icon) then return end
AS:SkinTexture(frame.icon)
AS:SetInside(frame.icon)
end)
AS:SkinTexture(frame.icon)
AS:SetInside(frame.icon)
end)
hooksecurefunc(ArkInventory, 'Frame_Item_Update_Border', function(frame)
if not ArkInventory.ValidFrame(frame, true) then return end
......@@ -73,32 +74,32 @@ function AS:ArkInventory()
if not obj then return end
AS:Kill(obj)
AS:SetTemplate(frame)
frame:SetBackdropBorderColor(obj:GetBackdropBorderColor())
frame:SetBackdropColor(unpack(AS.BorderColor))
AS:SkinTexture(frame.icon)
frame:SetNormalTexture(nil)
if _G[frame:GetName()] == ARKINV_Frame1ChangerWindowBag1 then
ARKINV_Frame1ChangerWindowBag1IconTexture:SetTexture('interface\\icons\\inv_misc_bag_07_green')
AS:SkinTexture(ARKINV_Frame1ChangerWindowBag1IconTexture)
AS:SetInside(ARKINV_Frame1ChangerWindowBag1IconTexture)
end
end)
AS:SetTemplate(frame)
frame:SetBackdropBorderColor(obj:GetBackdropBorderColor())
frame:SetBackdropColor(unpack(AS.BorderColor))
AS:SkinTexture(frame.icon)
frame:SetNormalTexture(nil)
if _G[frame:GetName()] == ARKINV_Frame1ChangerWindowBag1 then
ARKINV_Frame1ChangerWindowBag1IconTexture:SetTexture('interface\\icons\\inv_misc_bag_07_green')
AS:SkinTexture(ARKINV_Frame1ChangerWindowBag1IconTexture)
AS:SetInside(ARKINV_Frame1ChangerWindowBag1IconTexture)
end
end)
hooksecurefunc(ArkInventory, 'Frame_Border_Paint', function(border, slot, file, size, offset, scale, r, g, b, a)
local parent = border:GetParent()
parent:SetBackdropBorderColor(r, g, b, a)
parent:SetBackdropColor(unpack(AS.BackdropColor))
end)
hooksecurefunc(ArkInventory, 'Frame_Border_Paint', function(border, slot, file, size, offset, scale, r, g, b, a)
local parent = border:GetParent()
parent:SetBackdropBorderColor(r, g, b, a)
parent:SetBackdropColor(unpack(AS.BackdropColor))
end)
if AS:CheckAddOn('ElvUI') then
hooksecurefunc(ArkInventory, 'Frame_Item_Update_Clickable', function(frame)
local obj = _G[frame:GetName()..ArkInventory.Const.Frame.Cooldown.Name]
if obj then
ElvUI[1]:RegisterCooldown(obj)
end
end)
end
if AS:CheckAddOn('ElvUI') then
hooksecurefunc(ArkInventory, 'Frame_Item_Update_Clickable', function(frame)
local obj = _G[frame:GetName()..ArkInventory.Const.Frame.Cooldown.Name]
if obj then
ElvUI[1]:RegisterCooldown(obj)
end
end)
end
end
AS:RegisterSkin('ArkInventory', AS.ArkInventory)
AS:RegisterSkin('ArkInventory', AS.ArkInventory)
\ No newline at end of file
......@@ -3,64 +3,99 @@ local AS = unpack(AddOnSkins)
if not AS:CheckAddOn('InstanceProfits') then return end
function AS:InstanceProfits(event, addon)
InstanceProfits_LiveDisplay:SetHeight(90)
InstanceProfits_LiveDisplay_ButtonClose:ClearAllPoints()
InstanceProfits_LiveDisplay_ButtonClose:SetPoint("TOPRIGHT", InstanceProfits_LiveDisplay, "TOPRIGHT", -5, -5)
InstanceProfits_LiveDisplay_ButtonDetails:ClearAllPoints()
InstanceProfits_LiveDisplay_ButtonDetails:SetPoint("TOPRIGHT", InstanceProfits_LiveDisplay, "TOPRIGHT", -5, -25)
InstanceProfits_LiveDisplay_ButtonDetails:SetWidth(16)
InstanceProfits_LiveDisplay_ButtonDetails:SetHeight(16)
InstanceProfits_LiveDisplay_ButtonDetails.Text:SetText("H")
InstanceProfits_LiveDisplay_ButtonRecent:ClearAllPoints()
InstanceProfits_LiveDisplay_ButtonRecent:SetPoint("TOPRIGHT", InstanceProfits_LiveDisplay, "TOPRIGHT", -5, -45)
InstanceProfits_LiveDisplay_ButtonRecent:SetWidth(16)
InstanceProfits_LiveDisplay_ButtonRecent:SetHeight(16)
InstanceProfits_LiveDisplay_ButtonRecent.Text:SetText("R")
InstanceProfits_LiveDisplay:SetHeight(90)
AS:SkinBackdropFrame(InstanceProfits_LiveDisplay)
InstanceProfits_LiveDisplay:CreateBackdrop("Transparent")
AS:SkinBackdropFrame(InstanceProfits_LiveDisplay)
InstanceProfits_LiveDisplay:CreateBackdrop("Transparent")
AS:SkinButton(InstanceProfits_LiveDisplay_ButtonClose)
AS:SkinButton(InstanceProfits_LiveDisplay_ButtonDetails)
AS:SkinButton(InstanceProfits_LiveDisplay_ButtonRecent)
-- Skin the InstanceProfits_TableDisplay Frame, all Buttons and the Scroll Bar
AS:SkinBackdropFrame(InstanceProfits_TableDisplay)
AS:SkinButton(InstanceProfits_TableDisplay_TitleBar_ButtonClose)
InstanceProfits_TableDisplay_TitleBar:SetBackdropColor(128/255, 128/255, 128/255, 0.75)
InstanceProfits_TableDisplay_TitleBar_TitleString:SetTextColor(1, 1, 1)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonToggleData)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonRecent)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonClose)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonFilter)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonResetChar)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonChangeTextColor)
-- Skin the InstanceProfits_FilterOptions Frame and all Buttons
AS:SkinBackdropFrame(InstanceProfits_FilterOptions)
InstanceProfits_FilterOptions_TitleBar:SetBackdropColor(128/255, 128/255, 128/255, 0.75)
InstanceProfits_FilterOptions_TitleBar_TitleString:SetTextColor(1, 1, 1)
AS:SkinButton(InstanceProfits_FilterOptions_TitleBar_ButtonClose)
AS:SkinButton(InstanceProfits_FilterOptions_ButtonSave)
AS:SkinDropDownBox(InstanceProfits_FilterOptions_SortDropDown)
AS:SkinCheckBox(InstanceProfits_FilterOptionsNormalFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsHeroicFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsTenManFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsTwentyFiveFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsTenHeroicFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsTwentyFiveHeroicFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsLFRFilter)
-- Skin the InstanceProfits_DetailedDisplay Frame and all Buttons
AS:SkinBackdropFrame(InstanceProfits_DetailedDisplay)
AS:SkinButton(InstanceProfits_DetailedDisplay_ButtonClose)
-- Skin the InstanceProfits_RecentHistory Frame and all Buttons
AS:SkinBackdropFrame(InstanceProfits_RecentHistory)
InstanceProfits_RecentHistory_TitleBar:SetBackdropColor(128/255, 128/255, 128/255, 0.75)
InstanceProfits_RecentHistory_TitleBar_TitleString:SetTextColor(1, 1, 1)
AS:SkinButton(InstanceProfits_RecentHistory_TitleBar_ButtonClose)
AS:SkinDropDownBox(InstanceProfits_RecentHistory_LimitDropDown)
AS:SkinButton(InstanceProfits_RecentHistory_ButtonChangeTextColor)
-- Skin Close Button
InstanceProfits_LiveDisplay_ButtonClose:ClearAllPoints()
InstanceProfits_LiveDisplay_ButtonClose:SetPoint("TOPRIGHT", InstanceProfits_LiveDisplay, "TOPRIGHT", -5, -5)
AS:SkinButton(InstanceProfits_LiveDisplay_ButtonClose)
-- Skin Details Button
InstanceProfits_LiveDisplay_ButtonDetails:ClearAllPoints()
InstanceProfits_LiveDisplay_ButtonDetails:SetPoint("TOPRIGHT", InstanceProfits_LiveDisplay, "TOPRIGHT", -5, -25)
InstanceProfits_LiveDisplay_ButtonDetails:SetWidth(16)
InstanceProfits_LiveDisplay_ButtonDetails:SetHeight(16)
InstanceProfits_LiveDisplay_ButtonDetails.Text:SetText("H")
AS:SkinButton(InstanceProfits_LiveDisplay_ButtonDetails)
-- Skin Recent Button
InstanceProfits_LiveDisplay_ButtonRecent:ClearAllPoints()
InstanceProfits_LiveDisplay_ButtonRecent:SetPoint("TOPRIGHT", InstanceProfits_LiveDisplay, "TOPRIGHT", -5, -45)
InstanceProfits_LiveDisplay_ButtonRecent:SetWidth(16)
InstanceProfits_LiveDisplay_ButtonRecent:SetHeight(16)
InstanceProfits_LiveDisplay_ButtonRecent.Text:SetText("R")
AS:SkinButton(InstanceProfits_LiveDisplay_ButtonRecent)
-- Skin Share Button
InstanceProfits_LiveDisplay_ButtonShare:ClearAllPoints()
InstanceProfits_LiveDisplay_ButtonShare:SetPoint("TOPRIGHT", InstanceProfits_LiveDisplay, "TOPRIGHT", -5, -65)
InstanceProfits_LiveDisplay_ButtonShare:SetWidth(16)
InstanceProfits_LiveDisplay_ButtonShare:SetHeight(16)
InstanceProfits_LiveDisplay_ButtonShare.Text:SetText("S")
InstanceProfits_LiveDisplay_ButtonShare.Text:SetTextColor(1, 1, 1, 1)
InstanceProfits_LiveDisplay_ButtonShare.Text:SetJustifyV("CENTER");
InstanceProfits_LiveDisplay_ButtonShare.Text:SetJustifyH("CENTER");
AS:SkinButton(InstanceProfits_LiveDisplay_ButtonShare)
-- Skin the InstanceProfits_TableDisplay Frame, all Buttons and the Scroll Bar
AS:SkinBackdropFrame(InstanceProfits_TableDisplay)
AS:SkinButton(InstanceProfits_TableDisplay_TitleBar_ButtonClose)
InstanceProfits_TableDisplay_TitleBar:SetBackdropColor(128/255, 128/255, 128/255, 0.75)
InstanceProfits_TableDisplay_TitleBar_TitleString:SetTextColor(1, 1, 1)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonToggleData)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonRecent)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonClose)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonFilter)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonResetChar)
AS:SkinButton(InstanceProfits_TableDisplay_ButtonChangeTextColor)
-- Skin the InstanceProfits_FilterOptions Frame and all Buttons
AS:SkinBackdropFrame(InstanceProfits_FilterOptions)
InstanceProfits_FilterOptions_TitleBar:SetBackdropColor(128/255, 128/255, 128/255, 0.75)
InstanceProfits_FilterOptions_TitleBar_TitleString:SetTextColor(1, 1, 1)
AS:SkinButton(InstanceProfits_FilterOptions_TitleBar_ButtonClose)
AS:SkinButton(InstanceProfits_FilterOptions_ButtonSave)
AS:SkinDropDownBox(InstanceProfits_FilterOptions_SortDropDown)
AS:SkinCheckBox(InstanceProfits_FilterOptionsNormalFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsHeroicFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsTenManFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsTwentyFiveFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsTenHeroicFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsTwentyFiveHeroicFilter)
AS:SkinCheckBox(InstanceProfits_FilterOptionsLFRFilter)
-- Skin the InstanceProfits_DetailedDisplay Frame and all Buttons
AS:SkinBackdropFrame(InstanceProfits_DetailedDisplay)
AS:SkinButton(InstanceProfits_DetailedDisplay_ButtonClose)
-- Skin the InstanceProfits_RecentHistory Frame and all Buttons
AS:SkinBackdropFrame(InstanceProfits_RecentHistory)
InstanceProfits_RecentHistory_TitleBar:SetBackdropColor(128/255, 128/255, 128/255, 0.75)
InstanceProfits_RecentHistory_TitleBar_TitleString:SetTextColor(1, 1, 1)
AS:SkinButton(InstanceProfits_RecentHistory_TitleBar_ButtonClose)
AS:SkinDropDownBox(InstanceProfits_RecentHistory_LimitDropDown)
AS:SkinButton(InstanceProfits_RecentHistory_ButtonChangeTextColor)
AS:SkinButton(InstanceProfits_RecentHistory_ButtonResetRecent)
-- Skin Share Dialog
AS:SkinBackdropFrame(InstanceProfits_ShareDialog)
InstanceProfits_ShareDialog_TitleBar:SetBackdropColor(128/255, 128/255, 128/255, 0.75)
InstanceProfits_ShareDialog_TitleBar_TitleString:SetTextColor(1, 1, 1)
AS:SkinButton(InstanceProfits_ShareDialog_ButtonSave)
AS:SkinEditBox(InstanceProfits_ShareDialogWhisperName)
InstanceProfits_ShareDialogWhisperName:SetWidth(120)
InstanceProfits_ShareDialogWhisperName:SetHeight(18)
local point, relativeTo, relativePoint, xOfs, yOfs = InstanceProfits_ShareDialogWhisperName:GetPoint()
InstanceProfits_ShareDialogWhisperName:ClearAllPoints()
InstanceProfits_ShareDialogWhisperName:SetPoint(point, relativeTo, relativePoint, xOfs, -130)
AS:SkinRadioButton(InstanceProfits_ShareDialogSay)
AS:SkinRadioButton(InstanceProfits_ShareDialogGuild)
AS:SkinRadioButton(InstanceProfits_ShareDialogWhisper)
AS:SkinRadioButton(InstanceProfits_ShareDialogGeneral)
AS:SkinRadioButton(InstanceProfits_ShareDialogTrade)
end
AS:RegisterSkin('InstanceProfits', AS.InstanceProfits)
\ No newline at end of file
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