2023-11-14 14:58:51 +00:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2024-07-28 14:40:51 +00:00
|
|
|
#define MAX_CMD_INPUT 128
|
2024-02-02 14:47:51 +00:00
|
|
|
#define MAX_CMDS 144
|
|
|
|
#define MAX_CMD_STRLEN 32
|
|
|
|
|
2024-02-02 14:47:18 +00:00
|
|
|
typedef void (__cdecl *CMDPROC)(PCHAR);
|
|
|
|
|
2024-07-28 14:40:51 +00:00
|
|
|
//----------------------------------------------------
|
|
|
|
|
|
|
|
class CCmdWindow
|
2023-11-14 14:58:51 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
2024-03-20 15:43:00 +00:00
|
|
|
IDirect3DDevice9 *m_pD3DDevice;
|
2024-07-23 11:06:48 +00:00
|
|
|
CDXUTDialog *m_pGameUI;
|
|
|
|
CDXUTIMEEditBox *m_pEditControl;
|
2024-03-20 15:43:00 +00:00
|
|
|
|
2023-11-14 14:58:51 +00:00
|
|
|
public:
|
2024-02-02 14:47:18 +00:00
|
|
|
|
2024-02-02 14:47:51 +00:00
|
|
|
CMDPROC m_pCmds[MAX_CMDS];
|
|
|
|
CHAR m_szCmdNames[MAX_CMDS][MAX_CMD_STRLEN+1];
|
|
|
|
int m_iCmdCount;
|
|
|
|
|
2024-07-28 14:40:51 +00:00
|
|
|
BOOL m_bEnabled;
|
|
|
|
|
|
|
|
char m_szInputBuffer[MAX_CMD_INPUT + 1];
|
2024-03-20 15:43:00 +00:00
|
|
|
char field_1565[1290];
|
|
|
|
char field_1A6F[129];
|
|
|
|
int field_1AF0;
|
|
|
|
int field_1AF4;
|
2024-02-02 14:47:18 +00:00
|
|
|
CMDPROC m_pDefaultCmd; // used when no command specifier was
|
|
|
|
// used (ie. a normal chat message)
|
|
|
|
|
2024-07-28 14:40:51 +00:00
|
|
|
void GetDialogSize(RECT *pRect);
|
2024-02-02 14:47:18 +00:00
|
|
|
|
2024-07-28 14:40:51 +00:00
|
|
|
void Enable();
|
|
|
|
void Disable();
|
2024-02-02 14:47:18 +00:00
|
|
|
|
2024-07-28 14:40:51 +00:00
|
|
|
void ProcessInput();
|
|
|
|
|
|
|
|
CMDPROC GetCmdHandler(PCHAR szCmdName);
|
2024-02-02 14:47:18 +00:00
|
|
|
void AddDefaultCmdProc(CMDPROC cmdDefault);
|
2024-02-02 14:47:51 +00:00
|
|
|
void AddCmdProc(PCHAR szCmdName, CMDPROC cmdHandler);
|
2024-07-23 11:06:48 +00:00
|
|
|
|
|
|
|
void ResetDialogControls(CDXUTDialog *pGameUI);
|
2024-07-28 14:40:51 +00:00
|
|
|
CCmdWindow(IDirect3DDevice9 *pD3DDevice);
|
|
|
|
~CCmdWindow();
|
2023-11-14 14:58:51 +00:00
|
|
|
};
|
2024-07-28 14:40:51 +00:00
|
|
|
|
|
|
|
//----------------------------------------------------
|
|
|
|
// EOF
|