EmitterSizePropPage.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. /*
  2. ** Command & Conquer Renegade(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_EMITTERSIZEPROPPAGE_H__0CD2CBA3_1219_11D3_A034_00104B791122__INCLUDED_)
  19. #define AFX_EMITTERSIZEPROPPAGE_H__0CD2CBA3_1219_11D3_A034_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // EmitterSizePropPage.h : header file
  24. //
  25. #include "ColorBar.H"
  26. #include "Part_Emt.H"
  27. // Forward delcarations
  28. class EmitterInstanceListClass;
  29. /////////////////////////////////////////////////////////////////////////////
  30. //
  31. // EmitterSizePropPageClass dialog
  32. //
  33. /////////////////////////////////////////////////////////////////////////////
  34. class EmitterSizePropPageClass : public CPropertyPage
  35. {
  36. DECLARE_DYNCREATE(EmitterSizePropPageClass)
  37. // Construction
  38. public:
  39. EmitterSizePropPageClass(EmitterInstanceListClass *pemitter = NULL);
  40. ~EmitterSizePropPageClass();
  41. // Dialog Data
  42. //{{AFX_DATA(EmitterSizePropPageClass)
  43. enum { IDD = IDD_PROP_PAGE_EMITTER_SIZE };
  44. CSpinButtonCtrl m_SizeRandomSpin;
  45. //}}AFX_DATA
  46. // Overrides
  47. // ClassWizard generate virtual function overrides
  48. //{{AFX_VIRTUAL(EmitterSizePropPageClass)
  49. public:
  50. virtual BOOL OnApply();
  51. protected:
  52. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  53. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  54. virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam);
  55. //}}AFX_VIRTUAL
  56. // Implementation
  57. protected:
  58. // Generated message map functions
  59. //{{AFX_MSG(EmitterSizePropPageClass)
  60. virtual BOOL OnInitDialog();
  61. //}}AFX_MSG
  62. DECLARE_MESSAGE_MAP()
  63. public:
  64. /////////////////////////////////////////////////////////
  65. //
  66. // Public methods
  67. //
  68. //
  69. // Inline accessors
  70. //
  71. EmitterInstanceListClass * Get_Emitter (void) const { return m_pEmitterList; }
  72. void Set_Emitter (EmitterInstanceListClass *pemitter_list) { m_pEmitterList = pemitter_list; Initialize (); }
  73. bool Is_Data_Valid (void) const { return m_bValid; }
  74. void Get_Size_Keyframes (ParticlePropertyStruct<float> &sizes) { sizes = m_CurrentSizes; }
  75. void On_Lifetime_Changed (float lifetime);
  76. protected:
  77. /////////////////////////////////////////////////////////
  78. //
  79. // Protected methods
  80. //
  81. void Initialize (void);
  82. void Update_Sizes (void);
  83. private:
  84. /////////////////////////////////////////////////////////
  85. //
  86. // Private member data
  87. //
  88. EmitterInstanceListClass * m_pEmitterList;
  89. bool m_bValid;
  90. ColorBarClass * m_SizeBar;
  91. ParticlePropertyStruct<float> m_OrigSizes;
  92. ParticlePropertyStruct<float> m_CurrentSizes;
  93. float m_Lifetime;
  94. float m_MaxSize;
  95. };
  96. //{{AFX_INSERT_LOCATION}}
  97. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  98. #endif // !defined(AFX_EMITTERSIZEPROPPAGE_H__0CD2CBA3_1219_11D3_A034_00104B791122__INCLUDED_)