@@ -569,26 +569,29 @@ function CH:GetSmileyReplacementText(msg)
569
569
return outstr
570
570
end
571
571
572
- function CH :CopyButtonOnMouseUp (btn )
573
- local chat = self :GetParent ()
574
- if btn == ' RightButton' and chat :GetID () == 1 then
575
- local menu = _G .ChatMenu
576
- if menu then
577
- menu :ClearAllPoints ()
572
+ function CH :OpenChatMenu (chatMenu , buttonMenu )
573
+ if chatMenu then
574
+ chatMenu :ClearAllPoints ()
578
575
579
- local point = E :GetScreenQuadrant (self )
580
- if strfind (point , ' LEFT' ) then
581
- menu :SetPoint (' BOTTOMLEFT' , self , ' TOPRIGHT' )
582
- else
583
- menu :SetPoint (' BOTTOMRIGHT' , self , ' TOPLEFT' )
584
- end
585
-
586
- ToggleFrame (menu )
576
+ local point = E :GetScreenQuadrant (self )
577
+ if strfind (point , ' LEFT' ) then
578
+ chatMenu :SetPoint (' BOTTOMLEFT' , self , ' TOPRIGHT' )
587
579
else
588
- _G .ChatFrameMenuButton :ClearAllPoints ()
589
- _G .ChatFrameMenuButton :SetPoint (' TOPLEFT' , _G .ChatFrame1 .copyButton , ' TOPRIGHT' )
590
- _G .ChatFrameMenuButton :OpenMenu ()
580
+ chatMenu :SetPoint (' BOTTOMRIGHT' , self , ' TOPLEFT' )
591
581
end
582
+
583
+ ToggleFrame (chatMenu )
584
+ elseif buttonMenu then
585
+ buttonMenu :ClearAllPoints ()
586
+ buttonMenu :SetPoint (' TOPLEFT' , _G .ChatFrame1 .copyButton , ' TOPRIGHT' )
587
+ buttonMenu :OpenMenu ()
588
+ end
589
+ end
590
+
591
+ function CH :CopyButtonOnMouseUp (btn )
592
+ local chat = self :GetParent ()
593
+ if btn == ' RightButton' and chat :GetID () == 1 then
594
+ CH :OpenChatMenu (_G .ChatMenu , _G .ChatFrameMenuButton )
592
595
else
593
596
CH :CopyChat (chat )
594
597
end
@@ -790,6 +793,7 @@ function CH:PositionButtonFrame(chat)
790
793
791
794
chat .buttonFrame :ClearAllPoints ()
792
795
chat .buttonFrame :SetPoint (' TOP' , chat , ' BOTTOM' , 0 , - 90000 )
796
+ chat .buttonFrame :SetClipsChildren (true )
793
797
end
794
798
795
799
function CH :StyleChat (frame )
0 commit comments