File tree Expand file tree Collapse file tree 2 files changed +21
-27
lines changed
Expand file tree Collapse file tree 2 files changed +21
-27
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,11 @@ function X.GetChatInput()
2222 return frame and frame :Lookup (' Edit_Input' )
2323end
2424
25+ function X .GetChatPanel (k )
26+ return Station .SearchFrame (' ChatPanel' .. k )
27+ or Station .SearchFrame (' ChatPanel_Normal' .. k )
28+ end
29+
2530-- 海鳗里面抠出来的
2631-- 聊天复制并发布
2732function X .RepeatChatLine (hTime )
@@ -1610,8 +1615,7 @@ end
16101615
16111616local HOOKED_UI = setmetatable ({}, { __mode = ' k' })
16121617local function Hook (i )
1613- local frame = Station .SearchFrame (' ChatPanel' .. i )
1614- or Station .SearchFrame (' ChatPanel_Normal' .. i )
1618+ local frame = X .GetChatPanel (i )
16151619 local h = frame and frame :Lookup (' Wnd_Message' , ' Handle_Message' )
16161620 if h and not HOOKED_UI [h ] then
16171621 HOOKED_UI [h ] = true
@@ -1622,8 +1626,7 @@ end
16221626X .RegisterEvent (' CHAT_PANEL_OPEN' , ' ChatPanelHook' , function (event ) Hook (arg0 ) end )
16231627
16241628local function Unhook (i )
1625- local frame = Station .SearchFrame (' ChatPanel' .. i )
1626- or Station .SearchFrame (' ChatPanel_Normal' .. i )
1629+ local frame = X .GetChatPanel (i )
16271630 local h = frame and frame :Lookup (' Wnd_Message' , ' Handle_Message' )
16281631 if h and HOOKED_UI [h ] then
16291632 HOOKED_UI [h ] = nil
Original file line number Diff line number Diff line change @@ -193,29 +193,20 @@ X.RegisterInit(X.NSFormatString('{$NS}#BIND_HOTKEY'), function()
193193 end
194194end )
195195if X .PACKET_INFO .DEBUG_LEVEL <= X .DEBUG_LEVEL .DEBUG then
196- local aFrame = {
197- ' Lowest2/ChatPanel1' ,
198- ' Lowest2/ChatPanel2' ,
199- ' Lowest2/ChatPanel3' ,
200- ' Lowest2/ChatPanel4' ,
201- ' Lowest2/ChatPanel5' ,
202- ' Lowest2/ChatPanel6' ,
203- ' Lowest2/ChatPanel7' ,
204- ' Lowest2/ChatPanel8' ,
205- ' Lowest2/ChatPanel9' ,
206- ' Lowest2/EditBox' ,
207- ' Normal1/ChatPanel1' ,
208- ' Normal1/ChatPanel2' ,
209- ' Normal1/ChatPanel3' ,
210- ' Normal1/ChatPanel4' ,
211- ' Normal1/ChatPanel5' ,
212- ' Normal1/ChatPanel6' ,
213- ' Normal1/ChatPanel7' ,
214- ' Normal1/ChatPanel8' ,
215- ' Normal1/ChatPanel9' ,
216- ' Normal1/EditBox' ,
217- ' Normal/' .. X .PACKET_INFO .NAME_SPACE ,
218- }
196+ local aFrame = {}
197+ for _ , v in pairs ({
198+ ' Normal' ,
199+ ' Normal1' ,
200+ ' Lowest2' ,
201+ }) do
202+ for i = 1 , 9 do
203+ table.insert (aFrame , v .. ' /ChatPanel' .. i )
204+ table.insert (aFrame , v .. ' /ChatPanel_Normal' .. i )
205+ end
206+ table.insert (aFrame , v .. ' /EditBox' )
207+ table.insert (aFrame , v .. ' /ChatPanel_Recently' )
208+ table.insert (aFrame , v .. ' /' .. X .PACKET_INFO .NAME_SPACE )
209+ end
219210 X .RegisterHotKey (X .NSFormatString (' {$NS}_STAGE_CHAT' ), _L [' Display only chat panel' ], function ()
220211 if Station .IsVisible () then
221212 for _ , v in ipairs (aFrame ) do
You can’t perform that action at this time.
0 commit comments