dlgmplanhostoptions.h 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. /*
  2. ** Command & Conquer Renegade(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. /***********************************************************************************************
  19. *** 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 ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Combat *
  23. * *
  24. * $Archive:: /Commando/Code/commando/dlgmplanhostoptions.h $*
  25. * *
  26. * Author:: Patrick Smith *
  27. * *
  28. * $Modtime:: 3/27/02 10:25a $*
  29. * *
  30. * $Revision:: 18 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if defined(_MSC_VER)
  36. #pragma once
  37. #endif
  38. #ifndef __DLG_MP_LAN_HOST_OPTIONS_H
  39. #define __DLG_MP_LAN_HOST_OPTIONS_H
  40. #include "menudialog.h"
  41. #include "resource.h"
  42. #include "childdialog.h"
  43. #include <wwlib\vector.h>
  44. #include <WWLib\Signaler.h>
  45. ////////////////////////////////////////////////////////////////
  46. // Forward declarations
  47. ////////////////////////////////////////////////////////////////
  48. class cGameData;
  49. class WolGameModeClass;
  50. class DlgMsgBoxEvent;
  51. class ModPackageClass;
  52. class MPLanHostMapCycleOptionsTabClass;
  53. ////////////////////////////////////////////////////////////////
  54. //
  55. // MPLanHostOptionsMenuClass
  56. //
  57. ////////////////////////////////////////////////////////////////
  58. class MPLanHostOptionsMenuClass :
  59. public MenuDialogClass,
  60. protected Signaler<WolGameModeClass>
  61. {
  62. public:
  63. ////////////////////////////////////////////////////////////////
  64. // Public constructors/destructors
  65. ////////////////////////////////////////////////////////////////
  66. MPLanHostOptionsMenuClass (void);
  67. ~MPLanHostOptionsMenuClass();
  68. ////////////////////////////////////////////////////////////////
  69. // Public methods
  70. ////////////////////////////////////////////////////////////////
  71. void On_Init_Dialog (void);
  72. void On_Periodic(void);
  73. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  74. void Enable_Mod_Selection (bool onoff);
  75. private:
  76. ////////////////////////////////////////////////////////////////
  77. // Private methods
  78. ////////////////////////////////////////////////////////////////
  79. void ReceiveSignal(WolGameModeClass&);
  80. void Start_Game(cGameData* theGame);
  81. ////////////////////////////////////////////////////////////////
  82. // Private member data
  83. ////////////////////////////////////////////////////////////////
  84. bool mStartTheGame;
  85. unsigned long mClanID;
  86. MPLanHostMapCycleOptionsTabClass * MapCycleDialog;
  87. };
  88. ////////////////////////////////////////////////////////////////
  89. //
  90. // MPLanHostBasicOptionsTabClass
  91. //
  92. ////////////////////////////////////////////////////////////////
  93. class MPLanHostBasicOptionsTabClass :
  94. public ChildDialogClass,
  95. public Signaler<bool>
  96. {
  97. public:
  98. static MPLanHostBasicOptionsTabClass* Get_Instance(void);
  99. ////////////////////////////////////////////////////////////////
  100. // Public constructors/destructors
  101. ////////////////////////////////////////////////////////////////
  102. MPLanHostBasicOptionsTabClass (void);
  103. ~MPLanHostBasicOptionsTabClass (void);
  104. ////////////////////////////////////////////////////////////////
  105. // Public methods
  106. ////////////////////////////////////////////////////////////////
  107. void On_Init_Dialog (void);
  108. bool On_Apply (void);
  109. protected:
  110. void InitSideChoiceCombo(int sidePref);
  111. void On_EditCtrl_Change(EditCtrlClass* edit, int ctrlID);
  112. private:
  113. ////////////////////////////////////////////////////////////////
  114. // Private member data
  115. ////////////////////////////////////////////////////////////////
  116. static MPLanHostBasicOptionsTabClass* _mInstance;
  117. static int BandTestMaxPlayers;
  118. };
  119. ////////////////////////////////////////////////////////////////
  120. //
  121. // MPLanHostAdvancedOptionsTabClass
  122. //
  123. ////////////////////////////////////////////////////////////////
  124. class MPLanHostAdvancedOptionsTabClass :
  125. public ChildDialogClass,
  126. public Observer<DlgMsgBoxEvent>,
  127. protected Signaler<bool>
  128. {
  129. public:
  130. ////////////////////////////////////////////////////////////////
  131. // Public constructors/destructors
  132. ////////////////////////////////////////////////////////////////
  133. MPLanHostAdvancedOptionsTabClass (void);
  134. ////////////////////////////////////////////////////////////////
  135. // Public methods
  136. ////////////////////////////////////////////////////////////////
  137. void On_Init_Dialog (void);
  138. bool On_Apply (void);
  139. void On_Command (int ctrl_id, int message_id, DWORD param);
  140. void HandleNotification(DlgMsgBoxEvent&);
  141. protected:
  142. void ReceiveSignal(bool&);
  143. void ConfigureWOLControls(void);
  144. bool IsHostAClanMember(void) const;
  145. private:
  146. bool mIsWOLGame;
  147. bool mPassword;
  148. bool mChangeTeams;
  149. bool mRemixTeams;
  150. bool mLaddered;
  151. bool mClanGame;
  152. bool mQuickmatch;
  153. ////////////////////////////////////////////////////////////////
  154. // Private member data
  155. ////////////////////////////////////////////////////////////////
  156. };
  157. ////////////////////////////////////////////////////////////////
  158. //
  159. // MPLanHostMapCycleOptionsTabClass
  160. //
  161. ////////////////////////////////////////////////////////////////
  162. class MPLanHostMapCycleOptionsTabClass : public ChildDialogClass
  163. {
  164. public:
  165. ////////////////////////////////////////////////////////////////
  166. // Public constructors/destructors
  167. ////////////////////////////////////////////////////////////////
  168. MPLanHostMapCycleOptionsTabClass (void);
  169. ////////////////////////////////////////////////////////////////
  170. // Public methods
  171. ////////////////////////////////////////////////////////////////
  172. void On_Init_Dialog (void);
  173. bool On_Apply (void);
  174. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  175. void On_ListCtrl_DblClk (ListCtrlClass *list_ctrl, int ctrl_id, int item_index);
  176. void On_ComboBoxCtrl_Sel_Change (ComboBoxCtrlClass *combo_ctrl, int ctrl_id, int old_sel, int new_sel);
  177. void Enable_Mod_Selection (bool onoff);
  178. private:
  179. ////////////////////////////////////////////////////////////////
  180. // Private methods
  181. ////////////////////////////////////////////////////////////////
  182. void Build_Map_List (void);
  183. void Build_Mod_Package_List (void);
  184. void Add_Map (void);
  185. void Remove_Map (void);
  186. void Fill_Map_Ctrls (void);
  187. void Populate_Map_List_Ctrl (void);
  188. void Build_Map_List (const ModPackageClass *package);
  189. ////////////////////////////////////////////////////////////////
  190. // Private member data
  191. ////////////////////////////////////////////////////////////////
  192. DynamicVectorClass<WideStringClass> MapList;
  193. DynamicVectorClass<WideStringClass> MapCycleList;
  194. };
  195. ////////////////////////////////////////////////////////////////
  196. //
  197. // MPLanHostVictoryOptionsTabClass
  198. //
  199. ////////////////////////////////////////////////////////////////
  200. class MPLanHostVictoryOptionsTabClass : public ChildDialogClass
  201. {
  202. public:
  203. ////////////////////////////////////////////////////////////////
  204. // Public constructors/destructors
  205. ////////////////////////////////////////////////////////////////
  206. MPLanHostVictoryOptionsTabClass (void);
  207. ////////////////////////////////////////////////////////////////
  208. // Public methods
  209. ////////////////////////////////////////////////////////////////
  210. void On_Init_Dialog (void);
  211. bool On_Apply (void);
  212. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  213. private:
  214. ////////////////////////////////////////////////////////////////
  215. // Private methods
  216. ////////////////////////////////////////////////////////////////
  217. void Update_Enable_State (void);
  218. ////////////////////////////////////////////////////////////////
  219. // Private member data
  220. ////////////////////////////////////////////////////////////////
  221. };
  222. /*
  223. ////////////////////////////////////////////////////////////////
  224. //
  225. // MPLanHostCTFOptionsTabClass
  226. //
  227. ////////////////////////////////////////////////////////////////
  228. class MPLanHostCTFOptionsTabClass : public ChildDialogClass
  229. {
  230. public:
  231. ////////////////////////////////////////////////////////////////
  232. // Public constructors/destructors
  233. ////////////////////////////////////////////////////////////////
  234. MPLanHostCTFOptionsTabClass (void) :
  235. ChildDialogClass (IDD_MP_LAN_HOST_OPTIONS_CTF_SETTINGS) {}
  236. ////////////////////////////////////////////////////////////////
  237. // Public methods
  238. ////////////////////////////////////////////////////////////////
  239. void On_Init_Dialog (void);
  240. bool On_Apply (void);
  241. };
  242. */
  243. ////////////////////////////////////////////////////////////////
  244. //
  245. // MPLanHostCnCOptionsTabClass
  246. //
  247. ////////////////////////////////////////////////////////////////
  248. class MPLanHostCnCOptionsTabClass : public ChildDialogClass
  249. {
  250. public:
  251. ////////////////////////////////////////////////////////////////
  252. // Public constructors/destructors
  253. ////////////////////////////////////////////////////////////////
  254. MPLanHostCnCOptionsTabClass (void) :
  255. ChildDialogClass (IDD_MP_LAN_HOST_OPTIONS_CNC_SETTINGS) {}
  256. ////////////////////////////////////////////////////////////////
  257. // Public methods
  258. ////////////////////////////////////////////////////////////////
  259. void On_Init_Dialog (void);
  260. bool On_Apply (void);
  261. };
  262. #endif //__DLG_MP_LAN_HOST_OPTIONS_H