annotate Modules/FriendsFrame.lua @ 131:15a7f27b11e6 v7.3.2-20111027

- Fixed an infinite loop occurring with Artifact XP calculations on fresh 110 toons - Fixed combat state response - Mask out redundant cheevos (Cutting Edge/AotC and end boss)
author Nenue
date Mon, 20 Nov 2017 12:01:52 -0500
parents 1f68c46bc4de
children
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@121 6 local m = {}
Nenue@121 7 VeneerLFGMixin = m
Nenue@116 8 local _, db = ...
Nenue@116 9 local print = DEVIAN_WORKSPACE and function(...) print('VnTweaks', ...) end or nop
Nenue@116 10
Nenue@116 11 print('tweaks')
Nenue@116 12
Nenue@116 13 local currentMerchButton
Nenue@116 14 local positionsDirty
Nenue@116 15 local FormatPopup = function(index)
Nenue@116 16 local popupName = 'StaticPopup'..index
Nenue@116 17
Nenue@116 18 local frame = _G[popupName]
Nenue@116 19 frame:SetBackdrop(nil)
Nenue@116 20 frame.Backdrop = frame:CreateTexture('BACKGROUND')
Nenue@116 21 frame.Backdrop:SetAllPoints(frame)
Nenue@116 22 frame.Backdrop:SetColorTexture(0,0,0,.7)
Nenue@116 23 frame:EnableMouse(false)
Nenue@116 24
Nenue@116 25 local edit = _G[popupName .. 'EditBox']
Nenue@116 26 edit.Backdrop = edit:CreateTexture('BACKGROUND')
Nenue@116 27 edit.Backdrop:SetAllPoints(edit)
Nenue@116 28 edit.Backdrop:SetColorTexture(0,0,0,1)
Nenue@116 29
Nenue@116 30 local editLeft = _G[popupName .. 'EditBoxLeft']
Nenue@116 31 editLeft:Hide()
Nenue@116 32 local editRight = _G[popupName .. 'EditBoxRight']
Nenue@116 33 editRight:Hide()
Nenue@116 34
Nenue@116 35 for i = 1, 3 do
Nenue@116 36 local button = frame['button'..i]
Nenue@116 37 button:GetNormalTexture():SetColorTexture(0.25,.25,.25,1)
Nenue@116 38 button:GetPushedTexture():SetColorTexture(0,.4,1,1)
Nenue@116 39 button:GetDisabledTexture():SetColorTexture(0.25,.25,.25,1)
Nenue@116 40 button:GetHighlightTexture():SetColorTexture(.25, 0,1,1)
Nenue@116 41 end
Nenue@116 42
Nenue@116 43 end
Nenue@116 44
Nenue@116 45 for i = 1, STATICPOPUP_NUMDIALOGS do
Nenue@116 46 print('setup', i)
Nenue@116 47 FormatPopup(i)
Nenue@116 48 end
Nenue@116 49
Nenue@116 50 hooksecurefunc('StaticPopup_Show', function(which, text_arg1, text_arg2, data, insertedFrame)
Nenue@116 51 print(which, text_arg1, text_arg2, data)
Nenue@116 52
Nenue@116 53
Nenue@116 54 if which == 'CONFIRM_PURCHASE_TOKEN_ITEM' then
Nenue@116 55 local i = data.index
Nenue@116 56 while i > 10 do
Nenue@116 57 i = i - 10
Nenue@116 58 end
Nenue@116 59 print(i)
Nenue@116 60
Nenue@116 61
Nenue@116 62 currentMerchButton = _G['MerchantItem' .. i]
Nenue@116 63 StaticPopup1:ClearAllPoints()
Nenue@116 64 StaticPopup1:SetPoint('TOPLEFT', currentMerchButton, 'TOPRIGHT', 2, 0)
Nenue@116 65 print(StaticPopup1:GetSize())
Nenue@116 66 positionsDirty = true
Nenue@116 67 else
Nenue@116 68 if positionsDirty then
Nenue@116 69 StaticPopup1:ClearAllPoints()
Nenue@116 70 StaticPopup1:SetPoint('TOP', UIParent, 'TOP', 0, -135)
Nenue@116 71 end
Nenue@116 72 end
Nenue@116 73
Nenue@116 74 StaticPopup1EditBox:SetWidth(StaticPopup1:GetWidth())
Nenue@116 75
Nenue@116 76
Nenue@116 77
Nenue@121 78 end)