AITriggerAddDlg.cpp 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. FinalSun/FinalAlert 2 Mission Editor
  3. Copyright (C) 1999-2024 Electronic Arts, Inc.
  4. Authored by Matthias Wagner
  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. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. GNU General Public License for more details.
  13. You should have received a copy of the GNU General Public License
  14. along with this program. If not, see <https://www.gnu.org/licenses/>.
  15. */
  16. // AITriggerAddDlg.cpp: Implementierungsdatei
  17. //
  18. #include "stdafx.h"
  19. #include "finalsun.h"
  20. #include "AITriggerAddDlg.h"
  21. #include "Variables.h"
  22. #include "inlines.h"
  23. #ifdef _DEBUG
  24. #define new DEBUG_NEW
  25. #undef THIS_FILE
  26. static char THIS_FILE[] = __FILE__;
  27. #endif
  28. /////////////////////////////////////////////////////////////////////////////
  29. // Dialogfeld CAITriggerAddDlg
  30. CAITriggerAddDlg::CAITriggerAddDlg(CWnd* pParent /*=NULL*/)
  31. : CDialog(CAITriggerAddDlg::IDD, pParent)
  32. {
  33. //{{AFX_DATA_INIT(CAITriggerAddDlg)
  34. m_AITrigger = _T("");
  35. //}}AFX_DATA_INIT
  36. }
  37. void CAITriggerAddDlg::DoDataExchange(CDataExchange* pDX)
  38. {
  39. CDialog::DoDataExchange(pDX);
  40. //{{AFX_DATA_MAP(CAITriggerAddDlg)
  41. DDX_LBString(pDX, IDC_AITRIGGERS, m_AITrigger);
  42. //}}AFX_DATA_MAP
  43. }
  44. BEGIN_MESSAGE_MAP(CAITriggerAddDlg, CDialog)
  45. //{{AFX_MSG_MAP(CAITriggerAddDlg)
  46. //}}AFX_MSG_MAP
  47. END_MESSAGE_MAP()
  48. /////////////////////////////////////////////////////////////////////////////
  49. // Behandlungsroutinen für Nachrichten CAITriggerAddDlg
  50. BOOL CAITriggerAddDlg::OnInitDialog()
  51. {
  52. CDialog::OnInitDialog();
  53. CListBox* lb=(CListBox*)GetDlgItem(IDC_AITRIGGERS);
  54. int i;
  55. for(i=0;i<ai.sections["AITriggerTypes"].values.size();i++)
  56. {
  57. lb->AddString(*ai.sections["AITriggerTypes"].GetValueName(i)+ (CString)" " +GetParam(*ai.sections["AITriggerTypes"].GetValue(i), 0));
  58. }
  59. return TRUE; // return TRUE unless you set the focus to a control
  60. // EXCEPTION: OCX-Eigenschaftenseiten sollten FALSE zurückgeben
  61. }