Advertisement
Guest User

Untitled

a guest
Aug 16th, 2019
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.46 KB | None | 0 0
  1. local Chat_Frame_Buttons = {
  2. ChatFrameChannelButton,
  3. ChatFrameMenuButton,
  4. ChatFrameToggleVoiceDeafenButton,
  5. ChatFrameToggleVoiceMuteButton,
  6. QuickJoinToastButton,
  7. }
  8.  
  9. local Chat_Frame_Numbers = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10,}
  10.  
  11. local Chat_Frame_Textures = {
  12. "Background",
  13. "BottomLeftTexture",
  14. "BottomRightTexture",
  15. "BottomTexture",
  16. "ButtonFrameBackground",
  17. "ButtonFrameBottomLeftTexture",
  18. "ButtonFrameBottomRightTexture",
  19. "ButtonFrameBottomTexture",
  20. "ButtonFrameLeftTexture",
  21. "ButtonFrameRightTexture",
  22. "ButtonFrameTopLeftTexture",
  23. "ButtonFrameTopRightTexture",
  24. "ButtonFrameTopTexture",
  25. "LeftTexture",
  26. "RightTexture",
  27. "TopLeftTexture",
  28. "TopRightTexture",
  29. "TopTexture",
  30. }
  31.  
  32. local Chat_Frame_Textures2 = {
  33. "EditBoxFocusLeft",
  34. "EditBoxFocusMid",
  35. "EditBoxFocusRight",
  36. "EditBoxLeft",
  37. "EditBoxMid",
  38. "EditBoxRight",
  39. "TabHighlightLeft",
  40. "TabHighlightMiddle",
  41. "TabHighlightRight",
  42. "TabLeft",
  43. "TabMiddle",
  44. "TabRight",
  45. "TabSelectedLeft",
  46. "TabSelectedMiddle",
  47. "TabSelectedRight",
  48. "TabText",
  49. }
  50.  
  51. local function Hide_Chat_Frame_Buttons_Chat_Frame_Textures()
  52. for _, frame in pairs(Chat_Frame_Buttons) do
  53. frame:SetAlpha(0)
  54. end
  55. for _, numbers in pairs(Chat_Frame_Numbers) do
  56. for _, textures in pairs(Chat_Frame_Textures) do
  57. _G["ChatFrame"..numbers..textures]:Hide()
  58. end
  59. for _, textures2 in pairs(Chat_Frame_Textures2) do
  60. _G["ChatFrame"..numbers..textures2]:SetAlpha(0)
  61. end
  62. end
  63. CombatLogQuickButtonFrame_CustomTexture:Hide()
  64. end
  65.  
  66. local function OnEnter()
  67. if DHBT then DHBT:Cancel() end
  68. for _, frame in pairs(Chat_Frame_Buttons) do
  69. frame:SetAlpha(1)
  70. end
  71. for _, numbers in pairs(Chat_Frame_Numbers) do
  72. for _, textures in pairs(Chat_Frame_Textures) do
  73. _G["ChatFrame"..numbers..textures]:Show()
  74. end
  75. for _, textures2 in pairs(Chat_Frame_Textures2) do
  76. _G["ChatFrame"..numbers..textures2]:SetAlpha(1)
  77. end
  78. end
  79. CombatLogQuickButtonFrame_CustomTexture:Show()
  80. end
  81.  
  82. local function OnLeave()
  83. DHBT = C_Timer.NewTimer(.5, Hide_Chat_Frame_Buttons_Chat_Frame_Textures)
  84. end
  85.  
  86. local function SetupHooks(frame)
  87. frame:HookScript("OnEnter", OnEnter)
  88. frame:HookScript("OnLeave", OnLeave)
  89. end
  90.  
  91. SetupHooks(ChatFrame1)
  92. SetupHooks(ChatFrame2)
  93. SetupHooks(ChatFrame3)
  94. SetupHooks(ChatFrame4)
  95. SetupHooks(ChatFrame5)
  96. SetupHooks(ChatFrame6)
  97. SetupHooks(ChatFrame7)
  98. SetupHooks(ChatFrame8)
  99. SetupHooks(ChatFrame9)
  100. SetupHooks(ChatFrame10)
  101.  
  102. SetupHooks(ChatFrame1ButtonFrame)
  103. SetupHooks(ChatFrame2ButtonFrame)
  104. SetupHooks(ChatFrame3ButtonFrame)
  105. SetupHooks(ChatFrame4ButtonFrame)
  106. SetupHooks(ChatFrame5ButtonFrame)
  107. SetupHooks(ChatFrame6ButtonFrame)
  108. SetupHooks(ChatFrame7ButtonFrame)
  109. SetupHooks(ChatFrame8ButtonFrame)
  110. SetupHooks(ChatFrame9ButtonFrame)
  111. SetupHooks(ChatFrame10ButtonFrame)
  112.  
  113. SetupHooks(ChatFrame1Tab)
  114. SetupHooks(ChatFrame2Tab)
  115. SetupHooks(ChatFrame3Tab)
  116. SetupHooks(ChatFrame4Tab)
  117. SetupHooks(ChatFrame5Tab)
  118. SetupHooks(ChatFrame6Tab)
  119. SetupHooks(ChatFrame7Tab)
  120. SetupHooks(ChatFrame8Tab)
  121. SetupHooks(ChatFrame9Tab)
  122. SetupHooks(ChatFrame10Tab)
  123.  
  124. SetupHooks(CombatLogQuickButtonFrameButton1)
  125. SetupHooks(CombatLogQuickButtonFrameButton2)
  126.  
  127. for _, frame in pairs(Chat_Frame_Buttons) do
  128. SetupHooks(frame)
  129. frame:SetAlpha(0)
  130. end
  131.  
  132. for _, numbers in pairs(Chat_Frame_Numbers) do
  133. for _, textures in pairs(Chat_Frame_Textures) do
  134. _G["ChatFrame"..numbers..textures]:Hide()
  135. end
  136. for _, textures2 in pairs(Chat_Frame_Textures2) do
  137. _G["ChatFrame"..numbers..textures2]:SetAlpha(0)
  138. end
  139. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement