ScorchOptions.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  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_SCORCHOPTIONS_H__33FD4D9A_2C39_4494_A4EF_A20CEC76A95D__INCLUDED_)
  19. #define AFX_SCORCHOPTIONS_H__33FD4D9A_2C39_4494_A4EF_A20CEC76A95D__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // ScorchOptions.h : header file
  24. //
  25. #include "WBPopupSlider.h"
  26. #include "OptionsPanel.h"
  27. #include "Common/Dict.h"
  28. #include "Common/GameType.h"
  29. class MapObject;
  30. /////////////////////////////////////////////////////////////////////////////
  31. // ScorchOptions dialog
  32. class ScorchOptions : public COptionsPanel, public PopupSliderOwner
  33. {
  34. // Construction
  35. public:
  36. ScorchOptions(CWnd* pParent = NULL); // standard constructor
  37. // Dialog Data
  38. //{{AFX_DATA(ScorchOptions)
  39. enum { IDD = IDD_SCORCH_OPTIONS };
  40. // NOTE: the ClassWizard will add data members here
  41. //}}AFX_DATA
  42. // Overrides
  43. // ClassWizard generated virtual function overrides
  44. //{{AFX_VIRTUAL(ScorchOptions)
  45. protected:
  46. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  47. virtual void OnOK(){return;}; //!< Modeless dialogs don't OK, so eat this for modeless.
  48. virtual void OnCancel(){return;}; //!< Modeless dialogs don't close on ESC, so eat this for modeless.
  49. //}}AFX_VIRTUAL
  50. // Implementation
  51. protected:
  52. // Generated message map functions
  53. //{{AFX_MSG(ScorchOptions)
  54. virtual BOOL OnInitDialog();
  55. afx_msg void OnChangeScorchtype();
  56. afx_msg void OnChangeSizeEdit();
  57. //}}AFX_MSG
  58. DECLARE_MESSAGE_MAP()
  59. private:
  60. static MapObject *getSingleSelectedScorch(void);
  61. void updateTheUI(void);
  62. WBPopupSliderButton m_radiusPopup;
  63. std::vector<Dict*> m_allSelectedDicts;
  64. Bool m_updating; ///<true if the ui is updating itself.
  65. static Scorches m_scorchtype;
  66. static Real m_scorchsize;
  67. static ScorchOptions* m_staticThis;
  68. void changeSize(void);
  69. void changeScorch(void);
  70. void getAllSelectedDicts(void);
  71. public:
  72. static void update(void);
  73. static Scorches getScorchType(void) {return m_scorchtype;}
  74. static Real getScorchSize(void) {return m_scorchsize;}
  75. virtual void GetPopSliderInfo(const long sliderID, long *pMin, long *pMax, long *pLineSize, long *pInitial);
  76. virtual void PopSliderChanged(const long sliderID, long theVal);
  77. virtual void PopSliderFinished(const long sliderID, long theVal);
  78. };
  79. //{{AFX_INSERT_LOCATION}}
  80. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  81. #endif // !defined(AFX_SCORCHOPTIONS_H__33FD4D9A_2C39_4494_A4EF_A20CEC76A95D__INCLUDED_)