annotate Modules/FriendsFrame.lua @ 117:589045559484 v720.0

ArtifactPower: - cleanup of tooltip stats - green = available with XP currently invested, blue = available with XP from inventory
author Nenue
date Wed, 17 May 2017 08:23:27 -0400
parents ddfe19d70a34
children 1f68c46bc4de
rev   line source
Nenue@115 1 -- Veneer
Nenue@115 2 -- FriendsFrame.lua
Nenue@115 3 -- Created: 10/27/2016 8:50 PM
Nenue@115 4 -- %file-revision%
Nenue@115 5 --
Nenue@115 6
Nenue@116 7 VeneerLFGMixin = {}
Nenue@116 8 local Module = VeneerLFGMixin
Nenue@116 9 local _, db = ...
Nenue@116 10 local print = DEVIAN_WORKSPACE and function(...) print('VnTweaks', ...) end or nop
Nenue@116 11
Nenue@116 12 print('tweaks')
Nenue@116 13
Nenue@116 14 local currentMerchButton
Nenue@116 15 local positionsDirty
Nenue@116 16 local FormatPopup = function(index)
Nenue@116 17 local popupName = 'StaticPopup'..index
Nenue@116 18
Nenue@116 19 local frame = _G[popupName]
Nenue@116 20 frame:SetBackdrop(nil)
Nenue@116 21 frame.Backdrop = frame:CreateTexture('BACKGROUND')
Nenue@116 22 frame.Backdrop:SetAllPoints(frame)
Nenue@116 23 frame.Backdrop:SetColorTexture(0,0,0,.7)
Nenue@116 24 frame:EnableMouse(false)
Nenue@116 25
Nenue@116 26 local edit = _G[popupName .. 'EditBox']
Nenue@116 27 edit.Backdrop = edit:CreateTexture('BACKGROUND')
Nenue@116 28 edit.Backdrop:SetAllPoints(edit)
Nenue@116 29 edit.Backdrop:SetColorTexture(0,0,0,1)
Nenue@116 30
Nenue@116 31 local editLeft = _G[popupName .. 'EditBoxLeft']
Nenue@116 32 editLeft:Hide()
Nenue@116 33 local editRight = _G[popupName .. 'EditBoxRight']
Nenue@116 34 editRight:Hide()
Nenue@116 35
Nenue@116 36 for i = 1, 3 do
Nenue@116 37 local button = frame['button'..i]
Nenue@116 38 button:GetNormalTexture():SetColorTexture(0.25,.25,.25,1)
Nenue@116 39 button:GetPushedTexture():SetColorTexture(0,.4,1,1)
Nenue@116 40 button:GetDisabledTexture():SetColorTexture(0.25,.25,.25,1)
Nenue@116 41 button:GetHighlightTexture():SetColorTexture(.25, 0,1,1)
Nenue@116 42 end
Nenue@116 43
Nenue@116 44 end
Nenue@116 45
Nenue@116 46 for i = 1, STATICPOPUP_NUMDIALOGS do
Nenue@116 47 print('setup', i)
Nenue@116 48 FormatPopup(i)
Nenue@116 49 end
Nenue@116 50
Nenue@116 51 hooksecurefunc('StaticPopup_Show', function(which, text_arg1, text_arg2, data, insertedFrame)
Nenue@116 52 print(which, text_arg1, text_arg2, data)
Nenue@116 53
Nenue@116 54
Nenue@116 55 if which == 'CONFIRM_PURCHASE_TOKEN_ITEM' then
Nenue@116 56 local i = data.index
Nenue@116 57 while i > 10 do
Nenue@116 58 i = i - 10
Nenue@116 59 end
Nenue@116 60 print(i)
Nenue@116 61
Nenue@116 62
Nenue@116 63 currentMerchButton = _G['MerchantItem' .. i]
Nenue@116 64 StaticPopup1:ClearAllPoints()
Nenue@116 65 StaticPopup1:SetPoint('TOPLEFT', currentMerchButton, 'TOPRIGHT', 2, 0)
Nenue@116 66 print(StaticPopup1:GetSize())
Nenue@116 67 positionsDirty = true
Nenue@116 68 else
Nenue@116 69 if positionsDirty then
Nenue@116 70 StaticPopup1:ClearAllPoints()
Nenue@116 71 StaticPopup1:SetPoint('TOP', UIParent, 'TOP', 0, -135)
Nenue@116 72 end
Nenue@116 73 end
Nenue@116 74
Nenue@116 75 StaticPopup1EditBox:SetWidth(StaticPopup1:GetWidth())
Nenue@116 76
Nenue@116 77
Nenue@116 78
Nenue@116 79 end)