MoundOptions.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  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_MoundOptions_H__6B56E20C_582E_4132_A251_879097C8852C__INCLUDED_)
  19. #define AFX_MoundOptions_H__6B56E20C_582E_4132_A251_879097C8852C__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // MoundOptions.h : header file
  24. //
  25. #include "WBPopupSlider.h"
  26. #include "OptionsPanel.h"
  27. /////////////////////////////////////////////////////////////////////////////
  28. // MoundOptions dialog
  29. class MoundOptions : public COptionsPanel , public PopupSliderOwner
  30. {
  31. // Construction
  32. public:
  33. enum {MIN_MOUND_HEIGHT=1,
  34. MAX_MOUND_HEIGHT=21
  35. };
  36. // Construction
  37. public:
  38. enum {MIN_BRUSH_SIZE=1,
  39. MAX_BRUSH_SIZE=51,
  40. MIN_FEATHER=0,
  41. MAX_FEATHER=20};
  42. MoundOptions(CWnd* pParent = NULL); // standard constructor
  43. // Dialog Data
  44. //{{AFX_DATA(MoundOptions)
  45. enum { IDD = IDD_BRUSH_OPTIONS };
  46. // NOTE: the ClassWizard will add data members here
  47. //}}AFX_DATA
  48. // Overrides
  49. // ClassWizard generated virtual function overrides
  50. //{{AFX_VIRTUAL(MoundOptions)
  51. protected:
  52. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  53. virtual void OnOK(){return;}; //!< Modeless dialogs don't OK, so eat this for modeless.
  54. virtual void OnCancel(){return;}; //!< Modeless dialogs don't close on ESC, so eat this for modeless.
  55. //}}AFX_VIRTUAL
  56. // Implementation
  57. protected:
  58. // Generated message map functions
  59. //{{AFX_MSG(MoundOptions)
  60. virtual BOOL OnInitDialog();
  61. afx_msg void OnChangeFeatherEdit();
  62. afx_msg void OnChangeSizeEdit();
  63. afx_msg void OnChangeHeightEdit();
  64. //}}AFX_MSG
  65. DECLARE_MESSAGE_MAP()
  66. protected:
  67. static MoundOptions *m_staticThis; ///< Reference to the floating panel so SetWidth and SetFeather can be static.
  68. static Int m_currentWidth; ///< current brush width in the ui.
  69. static Int m_currentFeather; ///< current feather width in the ui.
  70. static Int m_currentHeight;
  71. Bool m_updating; ///<true if the ui is updating itself.
  72. WBPopupSliderButton m_brushWidthPopup;
  73. WBPopupSliderButton m_brushFeatherPopup;
  74. WBPopupSliderButton m_brushHeightPopup;
  75. public:
  76. static void setWidth(Int width);
  77. static void setFeather(Int feather);
  78. static void setHeight(Int height);
  79. public:
  80. virtual void GetPopSliderInfo(const long sliderID, long *pMin, long *pMax, long *pLineSize, long *pInitial);
  81. virtual void PopSliderChanged(const long sliderID, long theVal);
  82. virtual void PopSliderFinished(const long sliderID, long theVal);
  83. };
  84. //{{AFX_INSERT_LOCATION}}
  85. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  86. #endif // !defined(AFX_MoundOptions_H__6B56E20C_582E_4030_A251_879097C8853C__INCLUDED_)