teamsdialog.h 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  1. /*
  2. ** Command & Conquer Generals Zero Hour(tm)
  3. ** Copyright 2025 Electronic Arts Inc.
  4. **
  5. ** This program is free software: you can redistribute it and/or modify
  6. ** it under the terms of the GNU General Public License as published by
  7. ** the Free Software Foundation, either version 3 of the License, or
  8. ** (at your option) any later version.
  9. **
  10. ** This program is distributed in the hope that it will be useful,
  11. ** but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. ** GNU General Public License for more details.
  14. **
  15. ** You should have received a copy of the GNU General Public License
  16. ** along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. */
  18. #if !defined(AFX_TEAMSDIALOG_H__1410F415_1597_4EAF_AE0B_42DACDEB35B9__INCLUDED_)
  19. #define AFX_TEAMSDIALOG_H__1410F415_1597_4EAF_AE0B_42DACDEB35B9__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // teamsdialog.h : header file
  24. //
  25. #include "GameLogic/SidesList.h"
  26. /////////////////////////////////////////////////////////////////////////////
  27. // CTeamsDialog dialog
  28. class CTeamsDialog : public CDialog
  29. {
  30. // Construction
  31. public:
  32. CTeamsDialog(CWnd* pParent = NULL); // standard constructor
  33. // Dialog Data
  34. //{{AFX_DATA(CTeamsDialog)
  35. enum { IDD = IDD_TEAMS_DIALOG };
  36. // NOTE: the ClassWizard will add data members here
  37. //}}AFX_DATA
  38. // Overrides
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CTeamsDialog)
  41. protected:
  42. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  43. //}}AFX_VIRTUAL
  44. // Implementation
  45. protected:
  46. // Generated message map functions
  47. //{{AFX_MSG(CTeamsDialog)
  48. virtual BOOL OnInitDialog();
  49. virtual void OnOK();
  50. virtual void OnCancel();
  51. afx_msg void OnNewteam();
  52. afx_msg void OnDeleteteam();
  53. afx_msg void OnEditTemplate();
  54. afx_msg void OnSelchangePlayerList();
  55. afx_msg void OnClickTeamsList(NMHDR* pNMHDR, LRESULT* pResult);
  56. afx_msg void OnDblclkTeamsList(NMHDR* pNMHDR, LRESULT* pResult);
  57. afx_msg void OnCopyteam();
  58. afx_msg void OnSelectTeamMembers();
  59. afx_msg void OnMoveDownTeam();
  60. afx_msg void OnMoveUpTeam();
  61. //}}AFX_MSG
  62. DECLARE_MESSAGE_MAP()
  63. Int m_updating;
  64. SidesList m_sides;
  65. Int m_curTeam;
  66. enum
  67. {
  68. REBUILD_TEAMS = 0x01,
  69. REBUILD_OWNERS = 0x02,
  70. REBUILD_ALLIES = 0x04,
  71. REBUILD_NONE = 0x00,
  72. REBUILD_ALL = 0xff
  73. };
  74. void updateUI(Int whatToRebuild);
  75. void validateTeamOwners( void );
  76. Bool isValidTeamOwner( AsciiString ownerName );
  77. void doCorrectTeamOwnerDialog( TeamsInfo *ti );
  78. private:
  79. void UpdateTeamsList(void);
  80. };
  81. //{{AFX_INSERT_LOCATION}}
  82. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  83. #endif // !defined(AFX_TEAMSDIALOG_H__1410F415_1597_4EAF_AE0B_42DACDEB35B9__INCLUDED_)