| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- /*
- ** Command & Conquer Renegade(tm)
- ** Copyright 2025 Electronic Arts Inc.
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /***********************************************************************************************
- *** C O N F I D E N T I A L --- W E S T W O O D S T U D I O S ***
- ***********************************************************************************************
- * *
- * Project Name : Combat *
- * *
- * $Archive:: /Commando/Code/commando/dlgmpingamechat.h $*
- * *
- * Author:: Tom SS *
- * *
- * $Modtime:: 2/19/02 2:28p $*
- * *
- * $Revision:: 8 $*
- * *
- *---------------------------------------------------------------------------------------------*
- * Functions: *
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
- #if defined(_MSC_VER)
- #pragma once
- #endif
- #ifndef __DLGMPINGAMECHAT_H__
- #define __DLGMPINGAMECHAT_H__
- #include "popupdialog.h"
- #include "childdialog.h"
- #include "resource.h"
- #include "sctextobj.h"
- ////////////////////////////////////////////////////////////////
- //
- // MPChatChildDialogClass
- //
- ////////////////////////////////////////////////////////////////
- class MPChatChildDialogClass : public ChildDialogClass
- {
- public:
- ////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////
- MPChatChildDialogClass (void);
- ////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////
- //
- // Configuration
- //
- void Set_Default_Type (TextMessageEnum message_type) { MessageType = message_type; }
- void Set_End_Dialog_On_Send (bool onoff) { EndDialogOnSend = onoff; }
- //
- // Inherited
- //
- void On_Init_Dialog (void);
- bool On_EditCtrl_Key_Down (EditCtrlClass *edit_ctrl, uint32 key_id, uint32 key_data);
- void On_EditCtrl_Change(EditCtrlClass *edit_ctrl, int ctrl_id);
- void On_EditCtrl_Enter_Pressed (EditCtrlClass *edit_ctrl, int ctrl_id);
- void On_Command (int ctrl_id, int message_id, DWORD param);
- protected:
- ////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////
- void Process_Message(void);
- void Send_Message(WideStringClass& message, TextMessageEnum type, int recipientID);
- bool Process_Commands(const WCHAR* message);
- //
- // Auto completetion
- //
- void Auto_Complete_Name (void);
- void Complete_Player_Name (const WCHAR *typed_name, WideStringClass &completed_name);
- bool Find_Current_Command (const WCHAR * message, int &start_index, int &end_index);
- ////////////////////////////////////////////////////////////////
- // Protected member data
- ////////////////////////////////////////////////////////////////
- TextMessageEnum MessageType;
- WideStringClass RecipientName;
- WideStringClass CurrRecipientName;
- bool TestForAutoCompletion;
- bool EndDialogOnSend;
- };
- ////////////////////////////////////////////////////////////////
- //
- // MPIngameChatPopupClass
- //
- ////////////////////////////////////////////////////////////////
- class MPIngameChatPopupClass : public PopupDialogClass
- {
- public:
- ////////////////////////////////////////////////////////////////
- // Public constructors/destructors
- ////////////////////////////////////////////////////////////////
- MPIngameChatPopupClass (void);
- ~MPIngameChatPopupClass (void);
- ////////////////////////////////////////////////////////////////
- // Public methods
- ////////////////////////////////////////////////////////////////
- //
- // Configuration
- //
- void Set_Default_Type (TextMessageEnum message_type) { DefaultType = message_type; }
- //
- // Inherited
- //
- void On_Init_Dialog (void);
- void On_Command (int ctrl_id, int mesage_id, DWORD param);
- void Render (void);
- //
- // Callbacks
- //
- //void On_ComboBoxCtrl_Sel_Change (ComboBoxCtrlClass *combo_ctrl, int ctrl_id, int old_sel, int new_sel);
- protected:
- ////////////////////////////////////////////////////////////////
- // Protected methods
- ////////////////////////////////////////////////////////////////
- void Send_Message (void);
- void Configure_Recipient_Combobox (void);
- void Configure_Message_Log_List (void);
- ////////////////////////////////////////////////////////////////
- // Protected member data
- ////////////////////////////////////////////////////////////////
- Render2DClass WindowBackgroundRenderer;
- TextMessageEnum DefaultType;
- MPChatChildDialogClass * ChatModule;
- };
- #endif //__DLGMPINGAMECHAT_H__
|