ReviewDialog.cpp 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  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. *** Confidential - Westwood Studios ***
  20. ***********************************************************************************************
  21. * *
  22. * Project Name : Installer *
  23. * *
  24. * $Archive:: /Commando/Code/Installer/ReviewDialog.cpp $*
  25. * *
  26. * $Author:: Ian_l $*
  27. * *
  28. * $Modtime:: 11/24/01 9:29p $*
  29. * *
  30. * $Revision:: 5 $*
  31. * *
  32. *---------------------------------------------------------------------------------------------*
  33. * Functions: *
  34. * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
  35. // Includes.
  36. #include "ReviewDialog.h"
  37. #include "Installer.h"
  38. #include "ListCtrl.h"
  39. #include "Translator.h"
  40. /***********************************************************************************************
  41. * ReviewDialogClass::On_Init_Dialog -- *
  42. * *
  43. * INPUT: *
  44. * *
  45. * OUTPUT: *
  46. * *
  47. * WARNINGS: *
  48. * *
  49. * HISTORY: *
  50. * 08/22/01 IML : Created. *
  51. *=============================================================================================*/
  52. void ReviewDialogClass::On_Init_Dialog (void)
  53. {
  54. Set_Dlg_Item_Text (IDC_REVIEW_STATIC1, TxWideStringClass (IDS_REVIEW_SETTINGS));
  55. InstallMenuDialogClass::On_Init_Dialog();
  56. }
  57. /***********************************************************************************************
  58. * ReviewDialogClass::On_Activate -- *
  59. * *
  60. * INPUT: *
  61. * *
  62. * OUTPUT: *
  63. * *
  64. * WARNINGS: *
  65. * *
  66. * HISTORY: *
  67. * 08/22/01 IML : Created. *
  68. *=============================================================================================*/
  69. void ReviewDialogClass::On_Activate (bool onoff)
  70. {
  71. if (onoff) {
  72. const WCHAR *formatstring = L"•%s: %s";
  73. WideStringClass reviewtext, substring;
  74. WideStringClass t;
  75. // NOTE: Items may have changed since this dialog was last active.
  76. if (_Installer.Install_Game()) {
  77. reviewtext += TxWideStringClass (IDS_INSTALL_GAME);
  78. reviewtext += L"\n";
  79. substring.Format (formatstring, TxWideStringClass (IDS_DESTINATION_DIRECTORY), _Installer.Get_Target_Game_Path (t));
  80. reviewtext += substring;
  81. reviewtext += L"\n";
  82. substring.Format (formatstring, TxWideStringClass (IDS_PROGRAM_FOLDER), _Installer.Get_Target_Game_Folder (t));
  83. reviewtext += substring;
  84. reviewtext += L"\n\n";
  85. if (_Installer.Install_Game_Shortcut()) {
  86. reviewtext += TxWideStringClass (IDS_PLACE_SHORTCUT);
  87. reviewtext += L"\n\n";
  88. }
  89. }
  90. if (_Installer.Install_WOL()) {
  91. reviewtext += TxWideStringClass (IDS_INSTALL_WOL);
  92. reviewtext += L"\n";
  93. substring.Format (formatstring, TxWideStringClass (IDS_DESTINATION_DIRECTORY), _Installer.Get_Target_WOL_Path (t));
  94. reviewtext += substring;
  95. reviewtext += L"\n";
  96. substring.Format (formatstring, TxWideStringClass (IDS_PROGRAM_FOLDER), _Installer.Get_Target_WOL_Folder (t));
  97. reviewtext += substring;
  98. reviewtext += L"\n\n";
  99. if (_Installer.Use_IGR_Settings()) {
  100. reviewtext += TxWideStringClass (IDS_USE_GAME_ROOM_SETTINGS);
  101. reviewtext += L"\n\n";
  102. }
  103. }
  104. Set_Dlg_Item_Text (IDC_REVIEW_EDIT, reviewtext);
  105. }
  106. InstallMenuDialogClass::On_Activate (onoff);
  107. }
  108. /***********************************************************************************************
  109. * ReviewDialogClass::On_Command -- *
  110. * *
  111. * INPUT: *
  112. * *
  113. * OUTPUT: *
  114. * *
  115. * WARNINGS: *
  116. * *
  117. * HISTORY: *
  118. * 08/22/01 IML : Created. *
  119. *=============================================================================================*/
  120. void ReviewDialogClass::On_Command (int ctrl_id, int message_id, DWORD param)
  121. {
  122. InstallMenuDialogClass::On_Command (ctrl_id, message_id, param);
  123. }