EditParameter.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. /*
  2. ** Command & Conquer Generals(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. #if !defined(AFX_EDITPARAMETER_H__465E4002_6405_47E3_97BA_D46A8C108600__INCLUDED_)
  19. #define AFX_EDITPARAMETER_H__465E4002_6405_47E3_97BA_D46A8C108600__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // EditParameter.h : header file
  24. //
  25. #include "GameLogic/Scripts.h"
  26. #include "Common\SubsystemInterface.h"
  27. class SidesList;
  28. /////////////////////////////////////////////////////////////////////////////
  29. // EditParameter dialog
  30. class EditParameter : public CDialog
  31. {
  32. // Construction
  33. public:
  34. EditParameter(CWnd* pParent = NULL); // standard constructor
  35. // Dialog Data
  36. //{{AFX_DATA(EditParameter)
  37. enum { IDD = IDD_EDIT_PARAMETER };
  38. // NOTE: the ClassWizard will add data members here
  39. //}}AFX_DATA
  40. // Overrides
  41. // ClassWizard generated virtual function overrides
  42. //{{AFX_VIRTUAL(EditParameter)
  43. protected:
  44. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  45. //}}AFX_VIRTUAL
  46. // Implementation
  47. public:
  48. static Int edit( Parameter *pParm, AsciiString unitName = AsciiString::TheEmptyString );
  49. static AsciiString getWarningText(Parameter *pParm);
  50. static AsciiString getInfoText(Parameter *pParm);
  51. static void setCurSidesList(SidesList *sidesListP) {m_sidesListP = sidesListP;};
  52. static Bool loadScripts(CComboBox *pCombo, Bool subr, AsciiString match = AsciiString::TheEmptyString);
  53. static Bool loadWaypoints(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  54. static Bool loadTransports(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  55. static Bool loadObjectTypeList(CComboBox *pCombo, std::vector<AsciiString> *strings = NULL, AsciiString match = AsciiString::TheEmptyString);
  56. protected:
  57. static Bool loadSides(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  58. static Bool loadTriggerAreas(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  59. static Bool loadCommandButtons(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  60. static Bool loadFontNames(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  61. static void readFontFile( char *filename );
  62. static Bool loadTeams(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  63. static Bool loadTeamOrUnit(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  64. static Bool loadUnits(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  65. static Bool loadBridges(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  66. static Bool loadObjectType(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  67. static Bool loadAudioType(Parameter::ParameterType comboType, CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  68. static Bool loadMovies(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  69. static Bool getMovieComment(AsciiString match, AsciiString& outCommentFromINI);
  70. static Bool loadSpecialPowers(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  71. static Bool loadSciences(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  72. static Bool loadScienceAvailabilities(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  73. static Bool loadUpgrades(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  74. static Bool loadAbilities( CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString );
  75. static Bool loadAllAbilities( CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString );
  76. static Bool loadWaypointPaths(CComboBox *pCombo, AsciiString match= AsciiString::TheEmptyString);
  77. static Bool loadObjectFlags(CComboBox *pCombo, AsciiString match= AsciiString::TheEmptyString);
  78. static Bool loadAttackPrioritySets(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  79. static AsciiString loadLocalizedText(CComboBox *pCombo, AsciiString isStringInTable = AsciiString::TheEmptyString);
  80. static Bool loadAttackSetParameter(Script *pScr, CComboBox *pCombo, AsciiString match);
  81. static Bool loadCreateUnitParameter(Script *pScr, CComboBox *pCombo, AsciiString match);
  82. static Bool loadCreateObjectListsParameter(Script *pScr, CComboBox *pCombo, std::vector<AsciiString> *strings, AsciiString match);
  83. static Bool loadRevealNames(CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString);
  84. static Bool loadRevealNamesParameter(Script *pScr, CComboBox *pCombo, AsciiString match);
  85. static Bool loadEmoticons( CComboBox *pCombo, AsciiString match = AsciiString::TheEmptyString );
  86. static AsciiString getCreatedUnitTemplateName(AsciiString unitName);
  87. void loadCounters(CComboBox *pCombo);
  88. void loadConditionParameter(Script *pScr, Parameter::ParameterType type, CComboBox *pCombo);
  89. void loadActionParameter(Script *pScr, Parameter::ParameterType type, CComboBox *pCombo);
  90. void loadFlags(CComboBox *pCombo);
  91. protected:
  92. Parameter *m_parameter;
  93. static AsciiString m_unitName; //This is the name of the unit that this script command is dedicated to (if applicable).
  94. AsciiString m_string;
  95. Int m_int;
  96. Real m_real;
  97. static SidesList *m_sidesListP;
  98. static AsciiString m_selectedLocalizedString;
  99. protected:
  100. // Generated message map functions
  101. //{{AFX_MSG(EditParameter)
  102. afx_msg void OnChangeEdit();
  103. afx_msg void OnEditchangeCombo();
  104. virtual BOOL OnInitDialog();
  105. virtual void OnOK();
  106. virtual void OnCancel();
  107. afx_msg void OnPreviewSound();
  108. //}}AFX_MSG
  109. DECLARE_MESSAGE_MAP()
  110. };
  111. //{{AFX_INSERT_LOCATION}}
  112. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  113. #endif // !defined(AFX_EDITPARAMETER_H__465E4002_6405_47E3_97BA_D46A8C108600__INCLUDED_)