RingGeneralPropPage.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122
  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_RINGGENERALPROPPAGE_H__E86BBE83_F527_11D3_A08F_00104B791122__INCLUDED_)
  19. #define AFX_RINGGENERALPROPPAGE_H__E86BBE83_F527_11D3_A08F_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // RingGeneralPropPage.h : header file
  24. //
  25. #include "resource.h"
  26. #include "ringobj.h"
  27. #include "shader.H"
  28. /////////////////////////////////////////////////////////////////////////////
  29. //
  30. // RingGeneralPropPageClass
  31. //
  32. /////////////////////////////////////////////////////////////////////////////
  33. class RingGeneralPropPageClass : public CPropertyPage
  34. {
  35. DECLARE_DYNCREATE(RingGeneralPropPageClass)
  36. // Construction
  37. public:
  38. RingGeneralPropPageClass (RingRenderObjClass *ring = NULL);
  39. ~RingGeneralPropPageClass ();
  40. // Dialog Data
  41. //{{AFX_DATA(RingGeneralPropPageClass)
  42. enum { IDD = IDD_PROP_PAGE_RING_GEN };
  43. CSpinButtonCtrl m_TextureTileSpin;
  44. CSpinButtonCtrl m_LifetimeSpin;
  45. //}}AFX_DATA
  46. // Overrides
  47. // ClassWizard generate virtual function overrides
  48. //{{AFX_VIRTUAL(RingGeneralPropPageClass)
  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(RingGeneralPropPageClass)
  60. virtual BOOL OnInitDialog();
  61. afx_msg void OnBrowseButton();
  62. afx_msg void OnChangeFilenameEdit();
  63. afx_msg void OnChangeNameEdit();
  64. afx_msg void OnChangeLifetimeEdit();
  65. afx_msg void OnSelchangeShaderCombo();
  66. afx_msg void OnChangeTextureTileEdit();
  67. //}}AFX_MSG
  68. DECLARE_MESSAGE_MAP()
  69. public:
  70. /////////////////////////////////////////////////////////
  71. // Public methods
  72. /////////////////////////////////////////////////////////
  73. //
  74. // Inline accessors
  75. //
  76. RingRenderObjClass * Get_Ring (void) const { return m_RenderObj; }
  77. void Set_Ring (RingRenderObjClass *ring) { m_RenderObj = ring; Initialize (); }
  78. bool Is_Data_Valid (void) const { return m_bValid; }
  79. const CString & Get_Name (void) const { return m_Name; }
  80. const CString & Get_Texture_Filename (void) const { return m_TextureFilename; }
  81. float Get_Lifetime (void) const { return m_Lifetime; }
  82. const ShaderClass & Get_Shader (void) const { return m_Shader; }
  83. protected:
  84. /////////////////////////////////////////////////////////
  85. // Protected methods
  86. /////////////////////////////////////////////////////////
  87. void Initialize (void);
  88. void Add_Shader_To_Combo (ShaderClass &shader, LPCTSTR name);
  89. private:
  90. /////////////////////////////////////////////////////////
  91. // Private member data
  92. /////////////////////////////////////////////////////////
  93. RingRenderObjClass * m_RenderObj;
  94. CString m_Name;
  95. CString m_TextureFilename;
  96. ShaderClass m_Shader;
  97. float m_Lifetime;
  98. bool m_bValid;
  99. };
  100. //{{AFX_INSERT_LOCATION}}
  101. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  102. #endif // !defined(AFX_RINGGENERALPROPPAGE_H__E86BBE83_F527_11D3_A08F_00104B791122__INCLUDED_)