Commit 2171b0f5 authored by Darth Predator's avatar Darth Predator

Hijacking Simpy's shit :D

parent 0dac285a
......@@ -2,6 +2,7 @@
local SLE, T, E, L, V, P, G = unpack(select(2, ...))
local KF, Info, Timer = unpack(ElvUI_KnightFrame)
local M = E:GetModule("Misc")
--GLOBALS: SLE_ArmoryDB, AceGUIWidgetLSMlists, PaperDollFrame_UpdateStats
local _G = _G
-- local PaperDollFrame_UpdateStats = PaperDollFrame_UpdateStats
......@@ -231,7 +232,7 @@ local function LoadArmoryConfigTable()
order = 2,
desc = '',
get = function() return E.db.sle.Armory.Character.Enable end,
set = function(_, value) E.db.sle.Armory.Character.Enable = value; KF.Modules.CharacterArmory() end
set = function(_, value) E.db.sle.Armory.Character.Enable = value; KF.Modules.CharacterArmory() M:ToggleItemLevelInfo() end
}
local SelectedCABG
......@@ -918,7 +919,7 @@ local function LoadArmoryConfigTable()
name = L["Inspect Armory"],
order = 3,
get = function() return E.db.sle.Armory.Inspect.Enable end,
set = function(_, value) E.db.sle.Armory.Inspect.Enable = value; KF.Modules.InspectArmory() end
set = function(_, value) E.db.sle.Armory.Inspect.Enable = value; KF.Modules.InspectArmory() M:ToggleItemLevelInfo() end
}
E.Options.args.sle.args.modules.args.Armory.args.Inspect = {
......
......@@ -494,9 +494,8 @@ function IA:CreateInspectFrame()
self.Close = CreateFrame('Button', nil, self.Tab)
self.Close:Size(TAB_HEIGHT - 8)
self.Close:SetTemplate()
self.Close.backdropTexture:SetVertexColor(0.1, 0.1, 0.1)
self.Close:Point('RIGHT', -4, 0)
KF:TextSetting(self.Close, 'X', { FontSize = 13, }, 'CENTER', 1, 0)
KF:TextSetting(self.Close, 'X', { FontSize = 13, }, 'CENTER', 2, 0)
self.Close:SetScript('OnEnter', self.Button_OnEnter)
self.Close:SetScript('OnLeave', self.Button_OnLeave)
self.Close:SetScript('OnClick', function() HideUIPanel(self) end)
......@@ -1198,7 +1197,7 @@ function IA:CreateInspectFrame()
'TOP', self.Info.Guild.Banner.Name, 'BOTTOM', 0, -2)
end
end
do --<< Specialization Page >>--
self.Spec = CreateFrame('ScrollFrame', nil, self)
self.Spec:SetFrameLevel(CORE_FRAME_LEVEL + 16)
......@@ -1405,7 +1404,7 @@ function IA:CreateInspectFrame()
self.Spec['PvPTalentSlot'..i]:Point('CENTER', self.Spec['PvPTalentTier'..i])
end
end
do --<< Scanning Tooltip >>--
self.ScanTTForInspecting = CreateFrame('GameTooltip', 'InspectArmoryScanTT_I', nil, 'GameTooltipTemplate')
self.ScanTTForInspecting:SetOwner(UIParent, 'ANCHOR_NONE')
......@@ -1414,7 +1413,7 @@ function IA:CreateInspectFrame()
self.ScanTT2 = CreateFrame('GameTooltip', 'InspectArmoryScanTT2', nil, 'GameTooltipTemplate')
self.ScanTT2:SetOwner(UIParent, 'ANCHOR_NONE')
end
do --<< UnitPopup Setting >>--
_G["InspectArmory_UnitPopup"].Highlight = _G["InspectArmory_UnitPopup"]:CreateTexture(nil, 'BACKGROUND')
_G["InspectArmory_UnitPopup"].Highlight:SetTexture('Interface\\QuestFrame\\UI-QuestTitleHighlight')
......@@ -1586,12 +1585,12 @@ function IA:CreateInspectFrame()
end
end)
end
do --<< Updater >>--
self.Updater = CreateFrame('Frame')
self.Updater:Hide()
end
do --<< Inspector >>--
self.Inspector = CreateFrame('Frame')
self.Inspector:SetScript('OnUpdate', function(_, elapsed)
......@@ -1625,7 +1624,7 @@ function IA:CreateInspectFrame()
end)
self.Inspector:Hide()
end
HideUIPanel(self)
self.CreateInspectFrame = nil
end
......@@ -2991,7 +2990,7 @@ KF.Modules.InspectArmory = function()
IA:CreateInspectFrame()
end
IA:Update_BG()
InspectUnit = IA.InspectUnit
InspectFrame = IA.Inspector
......@@ -3004,6 +3003,5 @@ KF.Modules.InspectArmory = function()
Info.InspectArmory_Activate = nil
end
IA:ToggleOverlay()
end
\ No newline at end of file
......@@ -321,5 +321,41 @@ if not (select(2, GetAddOnInfo('ElvUI_KnightFrame')) and IsAddOnLoaded('ElvUI_Kn
_G["InspectArmory"]:UpdateSettings("all")
end
end
--Hijack SImpy's shit
local M = E:GetModule("Misc")
function M:ToggleItemLevelInfo(setupCharacterPage)
if setupCharacterPage then
M:CreateSlotStrings(_G.CharacterFrame, 'Character')
end
if E.db.general.displayCharacterInfo and not E.db.sle.Armory.Character.Enable then
M:RegisterEvent('PLAYER_EQUIPMENT_CHANGED', 'UpdateCharacterInfo')
M:RegisterEvent('PLAYER_AVG_ITEM_LEVEL_UPDATE', 'UpdateCharacterItemLevel')
_G.CharacterStatsPane.ItemLevelFrame.Value:Hide()
if not _G.CharacterFrame.CharacterInfoHooked then
_G.CharacterFrame:HookScript('OnShow', M.UpdateCharacterInfo)
_G.CharacterFrame.CharacterInfoHooked = true
end
if not setupCharacterPage then
M:UpdateCharacterInfo()
end
else
M:UnregisterEvent('PLAYER_EQUIPMENT_CHANGED')
M:UnregisterEvent('PLAYER_AVG_ITEM_LEVEL_UPDATE')
_G.CharacterStatsPane.ItemLevelFrame.Value:Show()
M:ClearPageInfo(_G.CharacterFrame, 'Character')
end
if E.db.general.displayInspectInfo and not E.db.sle.Armory.Inspect.Enable then
M:RegisterEvent('INSPECT_READY', 'UpdateInspectInfo')
else
M:UnregisterEvent('INSPECT_READY')
M:ClearPageInfo(_G.InspectFrame, 'Inspect')
end
end
SLE:RegisterModule(KF:GetName())
end
\ 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