| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143 |
- /*
- ** Command & Conquer Renegade(tm)
- ** Copyright 2025 Electronic Arts Inc.
- **
- ** This program is free software: you can redistribute it and/or modify
- ** it under the terms of the GNU General Public License as published by
- ** the Free Software Foundation, either version 3 of the License, or
- ** (at your option) any later version.
- **
- ** This program is distributed in the hope that it will be useful,
- ** but WITHOUT ANY WARRANTY; without even the implied warranty of
- ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- ** GNU General Public License for more details.
- **
- ** You should have received a copy of the GNU General Public License
- ** along with this program. If not, see <http://www.gnu.org/licenses/>.
- */
- /***********************************************************************************************
- *** Confidential - Westwood Studios ***
- ***********************************************************************************************
- * *
- * Project Name : Installer *
- * *
- * $Archive:: /Commando/Code/Installer/CardSelectionDialog.cpp $ *
- * *
- * $Author:: Ian_l $*
- * *
- * $Modtime:: 11/09/01 1:07p $*
- * *
- * $Revision:: 3 $*
- * *
- *---------------------------------------------------------------------------------------------*
- * Functions: *
- * - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - */
- // Includes.
- #include "CardSelectionDialog.h"
- #include "ErrorHandler.h"
- #include "ListCtrl.h"
- #include "MessageBox.h"
- #include "RDDesc.h"
- #include "Translator.h"
- /***********************************************************************************************
- * CardSelectionDialogClass::On_Init_Dialog -- *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 08/22/01 IML : Created. *
- *=============================================================================================*/
- void CardSelectionDialogClass::On_Init_Dialog (void)
- {
- ListCtrlClass *listctrl;
- int e;
-
- listctrl = Get_Dlg_Item (IDC_CARD_SELECTION_LIST)->As_ListCtrlClass();
- listctrl->Add_Column (L"", 1.0f, Vector3 (1.0f, 1.0f, 1.0f));
- e = 0;
- for (int d = 0; d < WW3D::Get_Render_Device_Count(); d++) {
- listctrl->Insert_Entry (e, WideStringClass (WW3D::Get_Render_Device_Name (d)));
- e++;
- }
- listctrl->Set_Curr_Sel (0);
- MenuDialogClass::On_Init_Dialog();
- // Show message to indicate that the user's last video card selection was unsuccessful?
- if (ShowMessage) {
- MessageBoxClass::Do_Dialog (TxWideStringClass (IDS_WARNING), TxWideStringClass (IDS_CANNOT_INITIALIZE_THIS_D3D_DEVICE), MessageBoxClass::MESSAGE_BOX_TYPE_OK, this);
- }
- }
- /***********************************************************************************************
- * CardSelectionDialogClass::Callback -- *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 08/22/01 IML : Created. *
- *=============================================================================================*/
- void CardSelectionDialogClass::Callback (int id, PopupDialogClass *popup)
- {
- switch (id) {
-
- case IDC_BUTTON_YES:
- CancelApplication = true;
- End_Dialog();
- break;
- default:
- break;
- }
- }
- /***********************************************************************************************
- * CardSelectionDialogClass::On_Command -- *
- * *
- * INPUT: *
- * *
- * OUTPUT: *
- * *
- * WARNINGS: *
- * *
- * HISTORY: *
- * 08/22/01 IML : Created. *
- *=============================================================================================*/
- void CardSelectionDialogClass::On_Command (int ctrl_id, int message_id, DWORD param)
- {
- switch (ctrl_id)
- {
- case IDCANCEL:
- MessageBoxClass::Do_Dialog (TxWideStringClass (IDS_EXIT_SETUP), TxWideStringClass (IDS_PROMPT_EXIT_SETUP), MessageBoxClass::MESSAGE_BOX_TYPE_YES_NO, this);
- return;
- case IDOK:
- {
- ListCtrlClass *listctrl;
- listctrl = Get_Dlg_Item (IDC_CARD_SELECTION_LIST)->As_ListCtrlClass();
- CardSelection = listctrl->Get_Curr_Sel();
- End_Dialog();
- }
- default:
- break;
- }
- MenuDialogClass::On_Command (ctrl_id, message_id, param);
- }
|