Team Fortress 2 Source Code as on 22/4/2020
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.

308 lines
7.1 KiB

  1. //========= Copyright 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 CPaintSculptDlg : public CDialog
  144. {
  145. public:
  146. CPaintSculptDlg( CWnd *pParent = NULL );
  147. ~CPaintSculptDlg();
  148. bool GetAutoSew( ) { return m_bAutoSew; }
  149. void UpdateSpatialData( );
  150. //{{AFX_DATA( CPaintSculptDlg )
  151. enum { IDD = IDD_DISP_PAINT_SCULPT };
  152. //}}AFX_DATA
  153. //{{AFX_VIRTUAL( CPaintSculptDlg )
  154. virtual void DoDataExchange( CDataExchange *pDX );
  155. virtual BOOL OnInitDialog( );
  156. //}}AFX_VIRTUAL
  157. protected:
  158. //{{AFX_MSG( CPaintSculptDlg )
  159. afx_msg void OnCheckAutoSew( );
  160. afx_msg void OnClose( );
  161. afx_msg void OnDestroy( void );
  162. afx_msg void OnLButtonUp( UINT nFlags, CPoint point );
  163. afx_msg void OnLButtonDown( UINT nFlags, CPoint point );
  164. afx_msg void OnMouseMove( UINT nFlags, CPoint point );
  165. afx_msg void OnBnClickedSculptPush( );
  166. afx_msg void OnBnClickedSculptCarve( );
  167. afx_msg void OnBnClickedSculptProject( );
  168. //}}AFX_MSG
  169. DECLARE_MESSAGE_MAP()
  170. protected:
  171. typedef enum
  172. {
  173. SCULPT_MODE_PUSH,
  174. SCULPT_MODE_CARVE,
  175. SCULPT_MODE_PROJECT,
  176. } SculptMode;
  177. // Save/Restore
  178. CRect m_DialogPosRect;
  179. CSculptPushOptions *m_PushOptions;
  180. CSculptCarveOptions *m_CarveOptions;
  181. CSculptProjectOptions *m_ProjectOptions;
  182. bool m_bAutoSew;
  183. SculptMode m_SculptMode;
  184. void SetActiveMode( SculptMode NewMode );
  185. CStatic m_SculptOptionsLoc;
  186. CButton m_AutoSew;
  187. CButton m_PushButton;
  188. CButton m_CarveButton;
  189. CButton m_ProjectButton;
  190. };
  191. //=============================================================================
  192. //
  193. // Displacement Paint Dist Dialog
  194. //
  195. class CDispPaintDataDlg : public CDialog
  196. {
  197. public:
  198. CDispPaintDataDlg( CWnd *pParent = NULL );
  199. ~CDispPaintDataDlg();
  200. //{{AFX_DATA( CDispPaintDataDlg )
  201. enum { IDD = IDD_DISP_PAINT_DATA };
  202. CIconComboBox m_comboboxBrush;
  203. CComboBox m_comboboxType;
  204. CSliderCtrl m_sliderValue;
  205. CEdit m_editValue;
  206. float m_fValue;
  207. //}}AFX_DATA
  208. //{{AFX_VIRTUAL( CDispPaintDataDlg )
  209. virtual void DoDataExchange( CDataExchange *pDX );
  210. virtual BOOL OnInitDialog( void );
  211. //}}AFX_VIRTUAL
  212. protected:
  213. bool InitComboBoxBrushData( void );
  214. bool InitComboBoxType( void );
  215. void FilterComboBoxBrushData( unsigned int uiEffect, bool bInit );
  216. void SetEffectButtonData( unsigned int effect );
  217. void InitValue( void );
  218. void UpdateSliderValue( float fValue );
  219. //{{AFX_MSG( CDispPaintDataDlg )
  220. afx_msg void OnEffectRaiseLowerData( void );
  221. afx_msg void OnEffectRaiseToData( void );
  222. afx_msg void OnEffectSmoothData( void );
  223. afx_msg void OnComboBoxBrushData( void );
  224. afx_msg void OnComboBoxType( void );
  225. afx_msg void OnHScroll( UINT nSBCode, UINT nPos, CScrollBar *pScrollBar );
  226. afx_msg void OnEditValue( void );
  227. afx_msg void OnClose( void );
  228. afx_msg void OnDestroy( void );
  229. //}}AFX_MSG
  230. DECLARE_MESSAGE_MAP()
  231. protected:
  232. // save/restore
  233. CRect m_DialogPosRect;
  234. unsigned int m_uiPrevEffect;
  235. float m_fPrevPaintValue;
  236. int m_iPrevBrush;
  237. };
  238. #endif // DISPDLG_H