Nenue@115: -- Veneer Nenue@115: -- FriendsFrame.lua Nenue@115: -- Created: 10/27/2016 8:50 PM Nenue@115: -- %file-revision% Nenue@115: -- Nenue@121: local m = {} Nenue@121: VeneerLFGMixin = m Nenue@116: local _, db = ... Nenue@116: local print = DEVIAN_WORKSPACE and function(...) print('VnTweaks', ...) end or nop Nenue@116: Nenue@116: print('tweaks') Nenue@116: Nenue@116: local currentMerchButton Nenue@116: local positionsDirty Nenue@116: local FormatPopup = function(index) Nenue@116: local popupName = 'StaticPopup'..index Nenue@116: Nenue@116: local frame = _G[popupName] Nenue@116: frame:SetBackdrop(nil) Nenue@116: frame.Backdrop = frame:CreateTexture('BACKGROUND') Nenue@116: frame.Backdrop:SetAllPoints(frame) Nenue@116: frame.Backdrop:SetColorTexture(0,0,0,.7) Nenue@116: frame:EnableMouse(false) Nenue@116: Nenue@116: local edit = _G[popupName .. 'EditBox'] Nenue@116: edit.Backdrop = edit:CreateTexture('BACKGROUND') Nenue@116: edit.Backdrop:SetAllPoints(edit) Nenue@116: edit.Backdrop:SetColorTexture(0,0,0,1) Nenue@116: Nenue@116: local editLeft = _G[popupName .. 'EditBoxLeft'] Nenue@116: editLeft:Hide() Nenue@116: local editRight = _G[popupName .. 'EditBoxRight'] Nenue@116: editRight:Hide() Nenue@116: Nenue@116: for i = 1, 3 do Nenue@116: local button = frame['button'..i] Nenue@116: button:GetNormalTexture():SetColorTexture(0.25,.25,.25,1) Nenue@116: button:GetPushedTexture():SetColorTexture(0,.4,1,1) Nenue@116: button:GetDisabledTexture():SetColorTexture(0.25,.25,.25,1) Nenue@116: button:GetHighlightTexture():SetColorTexture(.25, 0,1,1) Nenue@116: end Nenue@116: Nenue@116: end Nenue@116: Nenue@116: for i = 1, STATICPOPUP_NUMDIALOGS do Nenue@116: print('setup', i) Nenue@116: FormatPopup(i) Nenue@116: end Nenue@116: Nenue@116: hooksecurefunc('StaticPopup_Show', function(which, text_arg1, text_arg2, data, insertedFrame) Nenue@116: print(which, text_arg1, text_arg2, data) Nenue@116: Nenue@116: Nenue@116: if which == 'CONFIRM_PURCHASE_TOKEN_ITEM' then Nenue@116: local i = data.index Nenue@116: while i > 10 do Nenue@116: i = i - 10 Nenue@116: end Nenue@116: print(i) Nenue@116: Nenue@116: Nenue@116: currentMerchButton = _G['MerchantItem' .. i] Nenue@116: StaticPopup1:ClearAllPoints() Nenue@116: StaticPopup1:SetPoint('TOPLEFT', currentMerchButton, 'TOPRIGHT', 2, 0) Nenue@116: print(StaticPopup1:GetSize()) Nenue@116: positionsDirty = true Nenue@116: else Nenue@116: if positionsDirty then Nenue@116: StaticPopup1:ClearAllPoints() Nenue@116: StaticPopup1:SetPoint('TOP', UIParent, 'TOP', 0, -135) Nenue@116: end Nenue@116: end Nenue@116: Nenue@116: StaticPopup1EditBox:SetWidth(StaticPopup1:GetWidth()) Nenue@116: Nenue@116: Nenue@116: Nenue@121: end)