OpacityVectorDialog.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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_OPACITYVECTORDIALOG_H__E86BBE8C_F527_11D3_A08F_00104B791122__INCLUDED_)
  19. #define AFX_OPACITYVECTORDIALOG_H__E86BBE8C_F527_11D3_A08F_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. #include "resource.h"
  24. #include "sphereobj.h"
  25. // Forward declarations
  26. class ColorBarClass;
  27. class RenderObjClass;
  28. /////////////////////////////////////////////////////////////////////////////
  29. //
  30. // OpacityVectorDialogClass
  31. //
  32. /////////////////////////////////////////////////////////////////////////////
  33. class OpacityVectorDialogClass : public CDialog
  34. {
  35. // Construction
  36. public:
  37. OpacityVectorDialogClass(CWnd* pParent = NULL); // standard constructor
  38. // Dialog Data
  39. //{{AFX_DATA(OpacityVectorDialogClass)
  40. enum { IDD = IDD_OPACITY_VECTOR };
  41. CSliderCtrl m_SliderZ;
  42. CSliderCtrl m_SliderY;
  43. //}}AFX_DATA
  44. // Overrides
  45. // ClassWizard generated virtual function overrides
  46. //{{AFX_VIRTUAL(OpacityVectorDialogClass)
  47. protected:
  48. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  49. virtual BOOL OnNotify(WPARAM wParam, LPARAM lParam, LRESULT* pResult);
  50. //}}AFX_VIRTUAL
  51. // Implementation
  52. protected:
  53. // Generated message map functions
  54. //{{AFX_MSG(OpacityVectorDialogClass)
  55. virtual BOOL OnInitDialog();
  56. virtual void OnOK();
  57. virtual void OnCancel();
  58. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  59. //}}AFX_MSG
  60. DECLARE_MESSAGE_MAP()
  61. public:
  62. ////////////////////////////////////////////////////////////////
  63. // Public methods
  64. ////////////////////////////////////////////////////////////////
  65. void Set_Render_Obj (RenderObjClass *render_obj) { m_RenderObj = render_obj; }
  66. void Set_Vector (const AlphaVectorStruct &def_vector) { m_Value = def_vector; }
  67. const AlphaVectorStruct & Get_Vector (void) const { return m_Value; }
  68. void Set_Key_Index (int index) { m_KeyIndex = index; }
  69. private:
  70. ////////////////////////////////////////////////////////////////
  71. // Protected methods
  72. ////////////////////////////////////////////////////////////////
  73. void Update_Object (const AlphaVectorStruct &value);
  74. void Update_Object (void);
  75. AlphaVectorStruct Update_Value (void);
  76. private:
  77. ////////////////////////////////////////////////////////////////
  78. // Private member data
  79. ////////////////////////////////////////////////////////////////
  80. ColorBarClass * m_OpacityBar;
  81. RenderObjClass * m_RenderObj;
  82. AlphaVectorStruct m_Value;
  83. int m_KeyIndex;
  84. };
  85. //{{AFX_INSERT_LOCATION}}
  86. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  87. #endif // !defined(AFX_OPACITYVECTORDIALOG_H__E86BBE8C_F527_11D3_A08F_00104B791122__INCLUDED_)