Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

314 lines
7.2 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef DISPDLG_H
  8. #define DISPDLG_H
  9. #pragma once
  10. #include "resource.h"
  11. #include "IconComboBox.h"
  12. #include "afxwin.h"
  13. //=============================================================================
  14. //
  15. // Displacement Create Dialog
  16. //
  17. class CDispCreateDlg : public CDialog
  18. {
  19. public:
  20. CDispCreateDlg( CWnd *pParent = NULL );
  21. //{{AFX_DATA( CDispCreateDlg )
  22. enum { IDD = IDD_DISP_CREATE };
  23. unsigned int m_Power;
  24. CEdit m_editPower;
  25. CSpinButtonCtrl m_spinPower;
  26. //}}AFX_DATA
  27. //{{AFX_VIRTUAL( CDispCreateDlg )
  28. virtual void DoDataExchange( CDataExchange *pDX );
  29. virtual BOOL OnInitDialog( void );
  30. //}}AFX_VIRTUAL
  31. protected:
  32. //{{AFX_MSG( CDispCreateDlg )
  33. afx_msg void OnVScroll( UINT nSBCode, UINT nPos, CScrollBar* pScrollBar );
  34. //}}AFX_MSG
  35. DECLARE_MESSAGE_MAP()
  36. };
  37. //=============================================================================
  38. //
  39. // Displacement Noise Dialog
  40. //
  41. class CDispNoiseDlg : public CDialog
  42. {
  43. public:
  44. CDispNoiseDlg( CWnd *pParent = NULL );
  45. //{{AFX_DATA( CDispNoiseDlg )
  46. enum { IDD = IDD_DISP_NOISE };
  47. float m_Min;
  48. float m_Max;
  49. CEdit m_editMin;
  50. CEdit m_editMax;
  51. CSpinButtonCtrl m_spinMin;
  52. CSpinButtonCtrl m_spinMax;
  53. //}}AFX_DATA
  54. //{{AFX_VIRTUAL( CDispNoiseDlg )
  55. virtual void DoDataExchange( CDataExchange *pDX );
  56. virtual BOOL OnInitDialog( void );
  57. //}}AFX_VIRTUAL
  58. protected:
  59. //{{AFX_MSG( CDispNoiseDlg )
  60. afx_msg void CDispNoiseDlg::OnSpinUpDown( NMHDR *pNMHDR, LRESULT *pResult );
  61. //}}AFX_MSG
  62. DECLARE_MESSAGE_MAP()
  63. };
  64. //=============================================================================
  65. //
  66. // Displacement Paint Dist Dialog
  67. //
  68. class CDispPaintDistDlg : public CDialog
  69. {
  70. public:
  71. CDispPaintDistDlg( CWnd *pParent = NULL );
  72. ~CDispPaintDistDlg();
  73. void UpdateSpatialData( void );
  74. //{{AFX_DATA( CDispPaintDistDlg )
  75. enum { IDD = IDD_DISP_PAINT_DIST };
  76. CSliderCtrl m_sliderDistance;
  77. CSliderCtrl m_sliderRadius;
  78. CEdit m_editDistance;
  79. CEdit m_editRadius;
  80. CIconComboBox m_comboboxBrush;
  81. CComboBox m_comboboxAxis;
  82. float m_Distance;
  83. float m_Radius;
  84. //}}AFX_DATA
  85. //{{AFX_VIRTUAL( CDispPaintDistDlg )
  86. virtual void DoDataExchange( CDataExchange *pDX );
  87. virtual BOOL OnInitDialog( void );
  88. //}}AFX_VIRTUAL
  89. protected:
  90. bool InitComboBoxBrushGeo( void );
  91. bool InitComboBoxAxis( void );
  92. void InitBrushType( void );
  93. void EnableBrushTypeButtons( void );
  94. void DisableBrushTypeButtons( void );
  95. void FilterComboBoxBrushGeo( unsigned int nEffect, bool bInit );
  96. void EnablePaintingComboBoxes( void );
  97. void DisablePaintingComboBoxes( void );
  98. void UpdateAxis( int nAxis );
  99. void SetEffectButtonGeo( unsigned int nEffect );
  100. void SetBrushTypeButtonGeo( unsigned int uiBrushType );
  101. void InitDistance( void );
  102. void UpdateSliderDistance( float flDistance, bool bForceInit );
  103. void UpdateEditBoxDistance( float flDistance, bool bForceInit );
  104. void InitRadius( void );
  105. void EnableSliderRadius( void );
  106. void DisableSliderRadius( void );
  107. void UpdateSliderRadius( float flRadius, bool bForceInit );
  108. void UpdateEditBoxRadius( float flRadius, bool bForceInit );
  109. //{{AFX_MSG( CDispPaintDistDlg )
  110. afx_msg void OnEffectRaiseLowerGeo( void );
  111. afx_msg void OnEffectRaiseToGeo( void );
  112. afx_msg void OnEffectSmoothGeo( void );
  113. afx_msg void OnBrushTypeSoftEdge( void );
  114. afx_msg void OnBrushTypeHardEdge( void );
  115. afx_msg void OnCheckSpatial( void );
  116. afx_msg void OnCheckAutoSew( void );
  117. afx_msg void OnComboBoxBrushGeo( void );
  118. afx_msg void OnComboBoxAxis( void );
  119. afx_msg void OnHScroll( UINT nSBCode, UINT nPos, CScrollBar *pScrollBar );
  120. afx_msg void OnEditDistance( void );
  121. afx_msg void OnEditRadius( void );
  122. afx_msg void OnClose( void );
  123. afx_msg void OnDestroy( void );
  124. //}}AFX_MSG
  125. DECLARE_MESSAGE_MAP()
  126. protected:
  127. // Save/Restore
  128. CRect m_DialogPosRect;
  129. unsigned int m_nPrevEffect;
  130. int m_nPrevBrush;
  131. int m_nPrevPaintAxis;
  132. Vector m_vecPrevPaintAxis;
  133. float m_flPrevRadius;
  134. float m_flPrevDistance;
  135. };
  136. //=============================================================================
  137. //
  138. // Displacement Paint Dist Dialog
  139. //
  140. class CSculptPushOptions;
  141. class CSculptCarveOptions;
  142. class CSculptProjectOptions;
  143. class CSculptBlendOptions;
  144. class CPaintSculptDlg : public CDialog
  145. {
  146. public:
  147. CPaintSculptDlg( CWnd *pParent = NULL );
  148. ~CPaintSculptDlg();
  149. bool GetAutoSew( ) { return m_bAutoSew; }
  150. void UpdateSpatialData( );
  151. //{{AFX_DATA( CPaintSculptDlg )
  152. enum { IDD = IDD_DISP_PAINT_SCULPT };
  153. //}}AFX_DATA
  154. //{{AFX_VIRTUAL( CPaintSculptDlg )
  155. virtual void DoDataExchange( CDataExchange *pDX );
  156. virtual BOOL OnInitDialog( );
  157. //}}AFX_VIRTUAL
  158. protected:
  159. //{{AFX_MSG( CPaintSculptDlg )
  160. afx_msg void OnCheckAutoSew( );
  161. afx_msg void OnClose( );
  162. afx_msg void OnDestroy( void );
  163. afx_msg void OnLButtonUp( UINT nFlags, CPoint point );
  164. afx_msg void OnLButtonDown( UINT nFlags, CPoint point );
  165. afx_msg void OnMouseMove( UINT nFlags, CPoint point );
  166. afx_msg void OnBnClickedSculptPush( );
  167. afx_msg void OnBnClickedSculptCarve( );
  168. afx_msg void OnBnClickedSculptProject( );
  169. afx_msg void OnBnClickedSculptBlend( );
  170. //}}AFX_MSG
  171. DECLARE_MESSAGE_MAP()
  172. protected:
  173. typedef enum
  174. {
  175. SCULPT_MODE_PUSH,
  176. SCULPT_MODE_CARVE,
  177. SCULPT_MODE_PROJECT,
  178. SCULPT_MODE_BLEND,
  179. } SculptMode;
  180. // Save/Restore
  181. CRect m_DialogPosRect;
  182. CSculptPushOptions *m_PushOptions;
  183. CSculptCarveOptions *m_CarveOptions;
  184. CSculptProjectOptions *m_ProjectOptions;
  185. CSculptBlendOptions *m_BlendOptions;
  186. bool m_bAutoSew;
  187. SculptMode m_SculptMode;
  188. void SetActiveMode( SculptMode NewMode );
  189. CStatic m_SculptOptionsLoc;
  190. CButton m_AutoSew;
  191. CButton m_PushButton;
  192. CButton m_CarveButton;
  193. CButton m_ProjectButton;
  194. public:
  195. CButton m_BlendButton;
  196. };
  197. //=============================================================================
  198. //
  199. // Displacement Paint Dist Dialog
  200. //
  201. class CDispPaintDataDlg : public CDialog
  202. {
  203. public:
  204. CDispPaintDataDlg( CWnd *pParent = NULL );
  205. ~CDispPaintDataDlg();
  206. //{{AFX_DATA( CDispPaintDataDlg )
  207. enum { IDD = IDD_DISP_PAINT_DATA };
  208. CIconComboBox m_comboboxBrush;
  209. CComboBox m_comboboxType;
  210. CSliderCtrl m_sliderValue;
  211. CEdit m_editValue;
  212. float m_fValue;
  213. //}}AFX_DATA
  214. //{{AFX_VIRTUAL( CDispPaintDataDlg )
  215. virtual void DoDataExchange( CDataExchange *pDX );
  216. virtual BOOL OnInitDialog( void );
  217. //}}AFX_VIRTUAL
  218. protected:
  219. bool InitComboBoxBrushData( void );
  220. bool InitComboBoxType( void );
  221. void FilterComboBoxBrushData( unsigned int uiEffect, bool bInit );
  222. void SetEffectButtonData( unsigned int effect );
  223. void InitValue( void );
  224. void UpdateSliderValue( float fValue );
  225. //{{AFX_MSG( CDispPaintDataDlg )
  226. afx_msg void OnEffectRaiseLowerData( void );
  227. afx_msg void OnEffectRaiseToData( void );
  228. afx_msg void OnEffectSmoothData( void );
  229. afx_msg void OnComboBoxBrushData( void );
  230. afx_msg void OnComboBoxType( void );
  231. afx_msg void OnHScroll( UINT nSBCode, UINT nPos, CScrollBar *pScrollBar );
  232. afx_msg void OnEditValue( void );
  233. afx_msg void OnClose( void );
  234. afx_msg void OnDestroy( void );
  235. //}}AFX_MSG
  236. DECLARE_MESSAGE_MAP()
  237. protected:
  238. // save/restore
  239. CRect m_DialogPosRect;
  240. unsigned int m_uiPrevEffect;
  241. float m_fPrevPaintValue;
  242. int m_iPrevBrush;
  243. };
  244. #endif // DISPDLG_H