dialogtests.h 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587
  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/dialogtests.h $*
  25. * *
  26. * Author:: Patrick Smith *
  27. * *
  28. * $Modtime:: 2/16/02 3:55p $*
  29. * *
  30. * $Revision:: 37 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. #if defined(_MSC_VER)
  36. #pragma once
  37. #endif
  38. #ifndef __DIALOG_TESTS_H
  39. #define __DIALOG_TESTS_H
  40. #include "popupdialog.h"
  41. #include "menudialog.h"
  42. #include "childdialog.h"
  43. #include "resource.h"
  44. #include "DlgWOLWait.h"
  45. #include <WWLib\Notify.h>
  46. #include <WWOnline\RefPtr.h>
  47. class WheeledVehicleDefClass;
  48. class TrackedVehicleDefClass;
  49. ////////////////////////////////////////////////////////////////
  50. //
  51. // SplashIntroMenuDialogClass
  52. //
  53. ////////////////////////////////////////////////////////////////
  54. class SplashIntroMenuDialogClass : public MenuDialogClass
  55. {
  56. public:
  57. ////////////////////////////////////////////////////////////////
  58. // Public constructors/destructors
  59. ////////////////////////////////////////////////////////////////
  60. SplashIntroMenuDialogClass (void);
  61. ~SplashIntroMenuDialogClass (void);
  62. //
  63. // Inherited
  64. //
  65. void On_Init_Dialog (void);
  66. void On_Frame_Update (void);
  67. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  68. //
  69. // Static accessors
  70. //
  71. static bool Is_Complete (void) { return IsComplete; }
  72. private:
  73. ////////////////////////////////////////////////////////////////
  74. // Private member data
  75. ////////////////////////////////////////////////////////////////
  76. float Timer;
  77. static bool IsComplete;
  78. };
  79. ////////////////////////////////////////////////////////////////
  80. //
  81. // SplashOutroMenuDialogClass
  82. //
  83. ////////////////////////////////////////////////////////////////
  84. class SplashOutroMenuDialogClass : public MenuDialogClass
  85. {
  86. public:
  87. ////////////////////////////////////////////////////////////////
  88. // Public constructors/destructors
  89. ////////////////////////////////////////////////////////////////
  90. SplashOutroMenuDialogClass (void);
  91. ~SplashOutroMenuDialogClass (void);
  92. //
  93. // Inherited
  94. //
  95. void On_Init_Dialog (void);
  96. void On_Frame_Update (void);
  97. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  98. private:
  99. ////////////////////////////////////////////////////////////////
  100. // Private member data
  101. ////////////////////////////////////////////////////////////////
  102. float Timer;
  103. };
  104. ////////////////////////////////////////////////////////////////
  105. //
  106. // GameSpyMainDialogClass
  107. //
  108. ////////////////////////////////////////////////////////////////
  109. class GameSpyMainDialogClass : public MenuDialogClass,
  110. public Observer<DlgWOLWaitEvent>
  111. {
  112. public:
  113. ////////////////////////////////////////////////////////////////
  114. // Public constructors/destructors
  115. ////////////////////////////////////////////////////////////////
  116. GameSpyMainDialogClass (void);
  117. ~GameSpyMainDialogClass (void);
  118. //
  119. // Inherited
  120. //
  121. void On_Init_Dialog(void);
  122. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  123. void On_Last_Menu_Ending (void);
  124. void On_Frame_Update (void);
  125. //
  126. // Singleton access
  127. //
  128. static void Display (void);
  129. static GameSpyMainDialogClass * Get_Instance (void) { return _TheInstance; }
  130. private:
  131. void HandleNotification(DlgWOLWaitEvent& event);
  132. static void Host_Game(void);
  133. ////////////////////////////////////////////////////////////////
  134. // Private member data
  135. ////////////////////////////////////////////////////////////////
  136. static GameSpyMainDialogClass * _TheInstance;
  137. static bool DetectingBandwidth;
  138. };
  139. ////////////////////////////////////////////////////////////////
  140. //
  141. // GameSpyOptionsDialogClass
  142. //
  143. ////////////////////////////////////////////////////////////////
  144. class GameSpyOptionsDialogClass : public MenuDialogClass
  145. {
  146. public:
  147. ////////////////////////////////////////////////////////////////
  148. // Public constructors/destructors
  149. ////////////////////////////////////////////////////////////////
  150. GameSpyOptionsDialogClass (void);
  151. ~GameSpyOptionsDialogClass (void);
  152. //
  153. // Inherited
  154. //
  155. void On_Init_Dialog(void);
  156. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  157. //void On_Last_Menu_Ending (void);
  158. //
  159. // Singleton access
  160. //
  161. static void Display (void);
  162. static GameSpyOptionsDialogClass * Get_Instance (void) { return _TheInstance; }
  163. private:
  164. void Init_Connection_Speed_Combo(void);
  165. ////////////////////////////////////////////////////////////////
  166. // Private member data
  167. ////////////////////////////////////////////////////////////////
  168. static GameSpyOptionsDialogClass * _TheInstance;
  169. };
  170. ////////////////////////////////////////////////////////////////
  171. //
  172. // InternetMainDialogClass
  173. //
  174. ////////////////////////////////////////////////////////////////
  175. class InternetMainDialogClass : public MenuDialogClass
  176. {
  177. public:
  178. ////////////////////////////////////////////////////////////////
  179. // Public constructors/destructors
  180. ////////////////////////////////////////////////////////////////
  181. InternetMainDialogClass (void);
  182. ~InternetMainDialogClass (void);
  183. //
  184. // Inherited
  185. //
  186. void On_Init_Dialog(void);
  187. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  188. //void On_Last_Menu_Ending (void);
  189. //
  190. // Singleton access
  191. //
  192. static void Display (void);
  193. static InternetMainDialogClass * Get_Instance (void) { return _TheInstance; }
  194. private:
  195. ////////////////////////////////////////////////////////////////
  196. // Private member data
  197. ////////////////////////////////////////////////////////////////
  198. static InternetMainDialogClass * _TheInstance;
  199. };
  200. ////////////////////////////////////////////////////////////////
  201. //
  202. // StartSPGameDialogClass
  203. //
  204. ////////////////////////////////////////////////////////////////
  205. class StartSPGameDialogClass : public MenuDialogClass
  206. {
  207. public:
  208. ////////////////////////////////////////////////////////////////
  209. // Public constructors/destructors
  210. ////////////////////////////////////////////////////////////////
  211. StartSPGameDialogClass (void);
  212. void On_Init_Dialog (void);
  213. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  214. //void On_TreeCtrl_Needs_Children (TreeCtrlClass *list_ctrl, int ctrl_id, TreeItemClass *parent_item);
  215. };
  216. ////////////////////////////////////////////////////////////////
  217. //
  218. // DifficultyMenuClass
  219. //
  220. ////////////////////////////////////////////////////////////////
  221. class DifficultyMenuClass : public MenuDialogClass
  222. {
  223. public:
  224. ////////////////////////////////////////////////////////////////
  225. // Public constructors/destructors
  226. ////////////////////////////////////////////////////////////////
  227. DifficultyMenuClass (void);
  228. //
  229. // Inherited
  230. //
  231. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  232. void On_Menu_Activate (bool onoff);
  233. void On_Frame_Update (void);
  234. void Set_Replay( const char * filename ) { ReplayFilename = filename; }
  235. private:
  236. StringClass ReplayFilename;
  237. int CurrSel;
  238. };
  239. ////////////////////////////////////////////////////////////////
  240. //
  241. // MultiplayOptionsMainMenuClass
  242. //
  243. ////////////////////////////////////////////////////////////////
  244. class MultiplayOptionsMainMenuClass : public MenuDialogClass
  245. {
  246. public:
  247. MultiplayOptionsMainMenuClass (void) :
  248. MenuDialogClass (IDD_MENU_OPTION_MAIN_MULTIPLAY) {}
  249. //
  250. // Inherited
  251. //
  252. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  253. };
  254. ////////////////////////////////////////////////////////////////
  255. //
  256. // CampaignScoreTabClass
  257. //
  258. ////////////////////////////////////////////////////////////////
  259. class CampaignScoreTabClass : public ChildDialogClass
  260. {
  261. public:
  262. CampaignScoreTabClass (void) :
  263. ChildDialogClass (IDD_SCORE_CAMPAIGN_TAB) {}
  264. };
  265. ////////////////////////////////////////////////////////////////
  266. //
  267. // MissionsScoreTabClass
  268. //
  269. ////////////////////////////////////////////////////////////////
  270. class MissionsScoreTabClass : public ChildDialogClass
  271. {
  272. public:
  273. MissionsScoreTabClass (void) :
  274. ChildDialogClass (IDD_SCORE_MISSIONS_TAB) {}
  275. };
  276. ////////////////////////////////////////////////////////////////
  277. //
  278. // OptionsMenuClass
  279. //
  280. ////////////////////////////////////////////////////////////////
  281. class OptionsMenuClass : public MenuDialogClass
  282. {
  283. public:
  284. OptionsMenuClass (void) :
  285. MenuDialogClass (IDD_MENU_OPTIONS) {}
  286. };
  287. ////////////////////////////////////////////////////////////////
  288. //
  289. // QuitVerificationDialogClass
  290. //
  291. ////////////////////////////////////////////////////////////////
  292. class QuitVerificationDialogClass : public PopupDialogClass
  293. {
  294. public:
  295. ////////////////////////////////////////////////////////////////
  296. // Public constructors/destructors
  297. ////////////////////////////////////////////////////////////////
  298. QuitVerificationDialogClass (void);
  299. ~QuitVerificationDialogClass (void);
  300. ////////////////////////////////////////////////////////////////
  301. // Public methods
  302. ////////////////////////////////////////////////////////////////
  303. static QuitVerificationDialogClass * Get_Instance (void) { return _TheInstance; }
  304. private:
  305. ////////////////////////////////////////////////////////////////
  306. // Static member data
  307. ////////////////////////////////////////////////////////////////
  308. static QuitVerificationDialogClass * _TheInstance;
  309. };
  310. ////////////////////////////////////////////////////////////////
  311. //
  312. // MPMainMenuClass
  313. //
  314. ////////////////////////////////////////////////////////////////
  315. class MPMainMenuClass : public MenuDialogClass
  316. {
  317. public:
  318. MPMainMenuClass (void) :
  319. MenuDialogClass (IDD_MENU_MAIN_MULTIPLAY) {}
  320. void On_Init_Dialog (void);
  321. };
  322. ////////////////////////////////////////////////////////////////
  323. //
  324. // MPLanMenuClass
  325. //
  326. ////////////////////////////////////////////////////////////////
  327. class MPLanMenuClass : public MenuDialogClass
  328. {
  329. public:
  330. MPLanMenuClass (void) :
  331. MenuDialogClass (IDD_MULTIPLAY_CS_SEL) {}
  332. void On_Init_Dialog (void);
  333. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  334. void On_Destroy (void);
  335. };
  336. ////////////////////////////////////////////////////////////////
  337. //
  338. // MPInternetCSMenuClass
  339. //
  340. ////////////////////////////////////////////////////////////////
  341. class MPInternetCSMenuClass : public MenuDialogClass
  342. {
  343. public:
  344. MPInternetCSMenuClass (void) :
  345. MenuDialogClass (IDD_MULTIPLAY_WWOL_CS_SEL) {}
  346. };
  347. /*
  348. ////////////////////////////////////////////////////////////////
  349. //
  350. // MPGameMenuClass
  351. //
  352. ////////////////////////////////////////////////////////////////
  353. class MPGameMenuClass : public MenuDialogClass
  354. {
  355. public:
  356. MPGameMenuClass (void) :
  357. MenuDialogClass (IDD_MULTIPLAY_GAME_TYPE) {}
  358. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  359. };
  360. ////////////////////////////////////////////////////////////////
  361. //
  362. // MPServerConfigClass
  363. //
  364. ////////////////////////////////////////////////////////////////
  365. class MPServerConfigClass : public MenuDialogClass
  366. {
  367. public:
  368. MPServerConfigClass (void) :
  369. MenuDialogClass (IDD_MULTIPLAY_SERVER_CONFIG) {}
  370. void On_Init_Dialog (void);
  371. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  372. };
  373. ////////////////////////////////////////////////////////////////
  374. //
  375. // MPServerStartMenuClass
  376. //
  377. ////////////////////////////////////////////////////////////////
  378. class MPServerStartMenuClass : public MenuDialogClass
  379. {
  380. public:
  381. MPServerStartMenuClass (void) :
  382. //IsServer (true),
  383. MenuDialogClass (IDD_MULTIPLAY_START_GAME) {}
  384. void On_Init_Dialog (void);
  385. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  386. void Start_Game (void);
  387. //bool IsServer;
  388. };
  389. */
  390. ////////////////////////////////////////////////////////////////
  391. //
  392. // MPJoinMenuClass
  393. //
  394. ////////////////////////////////////////////////////////////////
  395. class MPJoinMenuClass : public MenuDialogClass
  396. {
  397. public:
  398. MPJoinMenuClass (void) :
  399. MenuDialogClass (IDD_MULTIPLAY_JOIN_GAME) {}
  400. void On_Init_Dialog (void);
  401. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  402. void Update_Game_List (void);
  403. void On_Frame_Update (void);
  404. };
  405. ////////////////////////////////////////////////////////////////
  406. //
  407. // DeathOptionsPopupClass
  408. //
  409. ////////////////////////////////////////////////////////////////
  410. class DeathOptionsPopupClass : public PopupDialogClass
  411. {
  412. public:
  413. ////////////////////////////////////////////////////////////////
  414. // Public constructors/destructors
  415. ////////////////////////////////////////////////////////////////
  416. DeathOptionsPopupClass (void) :
  417. PopupDialogClass (IDD_DEATH_OPTIONS) {}
  418. void On_Init_Dialog (void);
  419. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  420. };
  421. ////////////////////////////////////////////////////////////////
  422. //
  423. // FailedOptionsPopupClass
  424. //
  425. ////////////////////////////////////////////////////////////////
  426. class FailedOptionsPopupClass : public PopupDialogClass
  427. {
  428. public:
  429. ////////////////////////////////////////////////////////////////
  430. // Public constructors/destructors
  431. ////////////////////////////////////////////////////////////////
  432. FailedOptionsPopupClass (void) :
  433. PopupDialogClass (IDD_FAILED_OPTIONS) {}
  434. void On_Init_Dialog (void);
  435. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  436. };
  437. ////////////////////////////////////////////////////////////////
  438. //
  439. // EditWheeledVehicleDialogClass
  440. //
  441. ////////////////////////////////////////////////////////////////
  442. class EditWheeledVehicleDialogClass : public PopupDialogClass
  443. {
  444. public:
  445. ////////////////////////////////////////////////////////////////
  446. // Public constructors/destructors
  447. ////////////////////////////////////////////////////////////////
  448. EditWheeledVehicleDialogClass (WheeledVehicleDefClass * def,float wheel_radius);
  449. ~EditWheeledVehicleDialogClass(void);
  450. void On_Init_Dialog (void);
  451. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  452. protected:
  453. WheeledVehicleDefClass * VehicleDef;
  454. float WheelRadius;
  455. };
  456. ////////////////////////////////////////////////////////////////
  457. //
  458. // EditTrackedVehicleDialogClass
  459. //
  460. ////////////////////////////////////////////////////////////////
  461. class EditTrackedVehicleDialogClass : public PopupDialogClass
  462. {
  463. public:
  464. ////////////////////////////////////////////////////////////////
  465. // Public constructors/destructors
  466. ////////////////////////////////////////////////////////////////
  467. EditTrackedVehicleDialogClass (TrackedVehicleDefClass * def,float wheel_radius);
  468. ~EditTrackedVehicleDialogClass(void);
  469. void On_Init_Dialog (void);
  470. void On_Command (int ctrl_id, int mesage_id, DWORD param);
  471. protected:
  472. TrackedVehicleDefClass * VehicleDef;
  473. float WheelRadius;
  474. };
  475. #endif //__DIALOG_TESTS_H