@@ -276,23 +276,7 @@ class CBaseHudChat : public CHudElement, public vgui::EditablePanel
276276 bool IsVoiceSubtitle ( void ) { return m_bEnteringVoice; }
277277 void SetVoiceSubtitleState ( bool bState ) { m_bEnteringVoice = bState; }
278278
279- virtual void OnKeyCodeTyped (vgui::KeyCode code)
280- {
281- if (code == KEY_ENTER || code == KEY_PAD_ENTER || code == KEY_ESCAPE)
282- {
283- if (code != KEY_ESCAPE)
284- {
285- Send ();
286- }
287-
288- // End message mode.
289- StopMessageMode ();
290- }
291- else
292- {
293- BaseClass::OnKeyCodeTyped (code);
294- }
295- }
279+ virtual void OnKeyCodeTyped (vgui::KeyCode code);
296280
297281protected:
298282 CBaseHudChatLine *FindUnusedChatLine ( void );
@@ -326,52 +310,12 @@ class CBaseHudChatEntry : public vgui::TextEntry
326310public:
327311 int m_iMaxByteCount = -1 ; // utf-8 string length
328312
329- CBaseHudChatEntry ( vgui::Panel *parent, char const *panelName, CBaseHudChat *pChat )
330- : BaseClass( parent, panelName )
331- {
332- SetCatchEnterKey ( true );
333- SetAllowNonAsciiCharacters ( true );
334- SetDrawLanguageIDAtLeft ( true );
335- m_pHudChat = pChat;
336- }
337-
338- virtual void ApplySchemeSettings ( vgui::IScheme *pScheme )
339- {
340- BaseClass::ApplySchemeSettings (pScheme);
313+ CBaseHudChatEntry ( vgui::Panel *parent, char const *panelName, CBaseHudChat *pChat );
341314
342- SetPaintBorderEnabled ( false );
343- }
315+ virtual void ApplySchemeSettings ( vgui::IScheme *pScheme );
344316
345317 virtual void InsertChar (wchar_t ch);
346-
347- virtual void OnKeyCodeTyped (vgui::KeyCode code)
348- {
349- if ( code == KEY_ENTER || code == KEY_PAD_ENTER || code == KEY_ESCAPE )
350- {
351- if ( code != KEY_ESCAPE )
352- {
353- if ( m_pHudChat )
354- {
355- m_pHudChat->Send ();
356- }
357- }
358-
359- // End message mode.
360- if ( m_pHudChat )
361- {
362- m_pHudChat->StopMessageMode ();
363- }
364- }
365- else if ( code == KEY_TAB )
366- {
367- // Ignore tab, otherwise vgui will screw up the focus.
368- return ;
369- }
370- else
371- {
372- BaseClass::OnKeyCodeTyped ( code );
373- }
374- }
318+ virtual void OnKeyCodeTyped (vgui::KeyCode code);
375319
376320private:
377321 CBaseHudChat *m_pHudChat;
@@ -417,7 +361,6 @@ class CHudChatFilterPanel : public vgui::EditablePanel
417361 DECLARE_CLASS_SIMPLE ( CHudChatFilterPanel, vgui::EditablePanel );
418362
419363public:
420-
421364 CHudChatFilterPanel ( vgui::Panel *pParent, const char *pName );
422365
423366 virtual void ApplySchemeSettings ( vgui::IScheme *pScheme );
0 commit comments