LightSettingsPage.h 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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_LIGHTSETTINGSPAGE_H__C0BCECAD_B6EA_11D2_9FF8_00104B791122__INCLUDED_)
  19. #define AFX_LIGHTSETTINGSPAGE_H__C0BCECAD_B6EA_11D2_9FF8_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // LightSettingsPage.h : header file
  24. //
  25. /////////////////////////////////////////////////////////////////////////////
  26. // LightSettingsPageClass form view
  27. #ifndef __AFXEXT_H__
  28. #include <afxext.h>
  29. #endif
  30. class LightInstanceClass;
  31. #include "DockableForm.H"
  32. #include "Vector3.H"
  33. #include "NodeSettingsInterface.H"
  34. //////////////////////////////////////////////////////////
  35. //
  36. // LightSettingsPageClass
  37. //
  38. class LightSettingsPageClass : public DockableFormClass
  39. {
  40. public:
  41. LightSettingsPageClass (void);
  42. LightSettingsPageClass (LightSettingsClass *plight);
  43. virtual ~LightSettingsPageClass (void);
  44. // Form Data
  45. public:
  46. //{{AFX_DATA(LightSettingsPageClass)
  47. enum { IDD = IDD_LIGHT_SETTINGS };
  48. CSliderCtrl m_IntensitySlider;
  49. CSliderCtrl m_OuterAttenSlider;
  50. CSliderCtrl m_InnerAttenSlider;
  51. //}}AFX_DATA
  52. // Attributes
  53. public:
  54. // Operations
  55. public:
  56. // Overrides
  57. // ClassWizard generated virtual function overrides
  58. //{{AFX_VIRTUAL(LightSettingsPageClass)
  59. protected:
  60. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  61. //}}AFX_VIRTUAL
  62. // Implementation
  63. protected:
  64. #ifdef _DEBUG
  65. virtual void AssertValid() const;
  66. virtual void Dump(CDumpContext& dc) const;
  67. #endif
  68. // Generated message map functions
  69. //{{AFX_MSG(LightSettingsPageClass)
  70. afx_msg void OnDrawItem(int nIDCtl, LPDRAWITEMSTRUCT lpDrawItemStruct);
  71. afx_msg void OnChangeInnerAttenEdit();
  72. afx_msg void OnChangeOuterAttenEdit();
  73. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  74. afx_msg void OnKillfocusOuterAttenEdit();
  75. afx_msg void OnKillfocusInnerAttenEdit();
  76. afx_msg void OnAmbientButton();
  77. afx_msg void OnDiffuseButton();
  78. afx_msg void OnSpecularButton();
  79. //}}AFX_MSG
  80. DECLARE_MESSAGE_MAP()
  81. public:
  82. ///////////////////////////////////////////////////////
  83. //
  84. // Public methods
  85. //
  86. void HandleInitDialog (void);
  87. bool Apply_Changes (void);
  88. void Discard_Changes (void);
  89. protected:
  90. ///////////////////////////////////////////////////////
  91. //
  92. // Inline accessors
  93. //
  94. private:
  95. ///////////////////////////////////////////////////////
  96. //
  97. // Private member data
  98. //
  99. LightSettingsClass * m_pLight;
  100. Vector3 m_OrigAmbient;
  101. Vector3 m_OrigDiffuse;
  102. Vector3 m_OrigSpecular;
  103. float m_OrigIntensity;
  104. float m_OrigInnerAttenuation;
  105. float m_OrigOuterAttenuation;
  106. };
  107. /////////////////////////////////////////////////////////////////////////////
  108. //{{AFX_INSERT_LOCATION}}
  109. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  110. #endif // !defined(AFX_LIGHTSETTINGSPAGE_H__C0BCECAD_B6EA_11D2_9FF8_00104B791122__INCLUDED_)