ColorSelectionDialog.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  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_OLORSELECTIONDIALOG_H__C0BCECAE_B6EA_11D2_9FF8_00104B791122__INCLUDED_)
  19. #define AFX_OLORSELECTIONDIALOG_H__C0BCECAE_B6EA_11D2_9FF8_00104B791122__INCLUDED_
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif // _MSC_VER > 1000
  23. // ColorSelectionDialog.h : header file
  24. //
  25. #include "Resource.H"
  26. #include "Vector3.H"
  27. /////////////////////////////////////////////////////////////////////////////
  28. //
  29. // ColorSelectionDialogClass dialog
  30. //
  31. class ColorSelectionDialogClass : public CDialog
  32. {
  33. // Construction
  34. public:
  35. ColorSelectionDialogClass (const Vector3 &def_color, CWnd *pParent = NULL); // standard constructor
  36. // Dialog Data
  37. //{{AFX_DATA(ColorSelectionDialogClass)
  38. enum { IDD = IDD_COLOR_SEL };
  39. CSpinButtonCtrl m_BlueSpin;
  40. CSpinButtonCtrl m_GreenSpin;
  41. CSpinButtonCtrl m_RedSpin;
  42. CStatic m_ColorWindow;
  43. CSliderCtrl m_BlueSlider;
  44. CSliderCtrl m_GreenSlider;
  45. CSliderCtrl m_RedSlider;
  46. //}}AFX_DATA
  47. // Overrides
  48. // ClassWizard generated virtual function overrides
  49. //{{AFX_VIRTUAL(ColorSelectionDialogClass)
  50. protected:
  51. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  52. //}}AFX_VIRTUAL
  53. // Implementation
  54. protected:
  55. // Generated message map functions
  56. //{{AFX_MSG(ColorSelectionDialogClass)
  57. virtual BOOL OnInitDialog();
  58. virtual void OnOK();
  59. afx_msg void OnHScroll(UINT nSBCode, UINT nPos, CScrollBar* pScrollBar);
  60. afx_msg void OnPaint();
  61. afx_msg void OnGrayscaleCheck();
  62. afx_msg void OnChangeBlueEdit();
  63. afx_msg void OnChangeGreenEdit();
  64. afx_msg void OnChangeRedEdit();
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. public:
  68. ///////////////////////////////////////////////////////
  69. //
  70. // Public methods
  71. //
  72. const Vector3 & Get_Color (void) const { return m_Color; }
  73. void Set_Color (const Vector3 &color) { m_Color = color; }
  74. protected:
  75. ///////////////////////////////////////////////////////
  76. //
  77. // Inline accessors
  78. //
  79. void Paint_Color_Window (void);
  80. void Update_Sliders (int slider_id);
  81. private:
  82. ///////////////////////////////////////////////////////
  83. //
  84. // Private member data
  85. //
  86. Vector3 m_Color;
  87. Vector3 m_PaintColor;
  88. };
  89. //{{AFX_INSERT_LOCATION}}
  90. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  91. #endif // !defined(AFX_OLORSELECTIONDIALOG_H__C0BCECAE_B6EA_11D2_9FF8_00104B791122__INCLUDED_)