BuildList.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. /*
  2. ** Command & Conquer Generals Zero Hour(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_BuildList_H__D3FF66C5_7107_4DAC_8A29_5EBAB5C3A24E__INCLUDED_)
  19. #define AFX_BuildList_H__D3FF66C5_7107_4DAC_8A29_5EBAB5C3A24E__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // BuildList.h : header file
  24. //
  25. #include "TerrainSwatches.h"
  26. #include "OptionsPanel.h"
  27. #include "WBPopupSlider.h"
  28. #include "Common/AsciiString.h"
  29. class WorldHeightMapEdit;
  30. class BuildListInfo;
  31. /////////////////////////////////////////////////////////////////////////////
  32. // BuildList dialog
  33. class BuildList : public COptionsPanel, public PopupSliderOwner
  34. {
  35. // Construction
  36. public:
  37. BuildList(CWnd* pParent = NULL); ///< standard constructor
  38. ~BuildList(void); ///< standard destructor
  39. enum { NAME_MAX_LEN = 64 };
  40. // Dialog Data
  41. //{{AFX_DATA(BuildList)
  42. enum { IDD = IDD_BUILD_LIST_PANEL };
  43. // NOTE: the ClassWizard will add data members here
  44. //}}AFX_DATA
  45. // Overrides
  46. // ClassWizard generated virtual function overrides
  47. //{{AFX_VIRTUAL(BuildList)
  48. protected:
  49. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  50. virtual void OnOK(){return;}; ///< Modeless dialogs don't OK, so eat this for modeless.
  51. virtual void OnCancel(){return;}; ///< Modeless dialogs don't close on ESC, so eat this for modeless.
  52. //}}AFX_VIRTUAL
  53. // Implementation
  54. protected:
  55. // Generated message map functions
  56. //{{AFX_MSG(BuildList)
  57. virtual BOOL OnInitDialog();
  58. afx_msg void OnSelchangeSidesCombo();
  59. afx_msg void OnMoveUp();
  60. afx_msg void OnMoveDown();
  61. afx_msg void OnAddBuilding();
  62. afx_msg void OnSelchangeBuildList();
  63. afx_msg void OnAlreadyBuild();
  64. afx_msg void OnDeleteBuilding();
  65. afx_msg void OnSelendokRebuilds();
  66. afx_msg void OnEditchangeRebuilds();
  67. afx_msg void OnDblclkBuildList();
  68. afx_msg void OnChangeZOffset();
  69. afx_msg void OnChangeAngle();
  70. afx_msg void OnExport();
  71. //}}AFX_MSG
  72. DECLARE_MESSAGE_MAP()
  73. protected:
  74. Int m_curSide;
  75. Int m_curBuildList;
  76. WBPopupSliderButton m_heightSlider;
  77. WBPopupSliderButton m_angleSlider;
  78. Real m_angle;
  79. Real m_height;
  80. static BuildList *m_staticThis;
  81. static Bool m_updating;
  82. protected:
  83. void loadSides(void);
  84. void updateCurSide(void);
  85. public:
  86. static void addBuilding(Coord3D loc, Real angle, AsciiString name);
  87. static void update(void) {if (m_staticThis) m_staticThis->loadSides();};
  88. static void setSelectedBuildList(BuildListInfo *pInfo);
  89. virtual void GetPopSliderInfo(const long sliderID, long *pMin, long *pMax, long *pLineSize, long *pInitial);
  90. virtual void PopSliderChanged(const long sliderID, long theVal);
  91. virtual void PopSliderFinished(const long sliderID, long theVal);
  92. };
  93. //{{AFX_INSERT_LOCATION}}
  94. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  95. #endif // !defined(AFX_BuildList_H__D3FF66C5_711D_4DAC_8A29_5EAAB5C3A23E__INCLUDED_)