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.

131 lines
3.1 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef FACEEDIT_DISPPAGE_H
  8. #define FACEEDIT_DISPPAGE_H
  9. #pragma once
  10. #include "resource.h"
  11. #include "DispDlg.h"
  12. class CMapSolid;
  13. class CMapFace;
  14. class CMapDisp;
  15. //=============================================================================
  16. //
  17. // Face Edit Displacement Page Class
  18. //
  19. class CFaceEditDispPage : public CPropertyPage
  20. {
  21. DECLARE_DYNAMIC( CFaceEditDispPage );
  22. public:
  23. enum { FACEEDITTOOL_SELECT = 0,
  24. FACEEDITTOOL_CREATE,
  25. FACEEDITTOOL_DESTROY,
  26. FACEEDITTOOL_PAINTGEO,
  27. FACEEDITTOOL_PAINTDATA,
  28. FACEEDITTOOL_PAINTSCULPT,
  29. FACEEDITTOOL_SEW,
  30. FACEEDITTOOL_SUBDIV,
  31. FACEEDITTOOL_NOISE,
  32. FACEEDITTOOL_TAG_WALK,
  33. FACEEDITTOOL_TAG_BUILD,
  34. FACEEDITTOOL_TAG_REMOVE,
  35. };
  36. public:
  37. CFaceEditDispPage();
  38. ~CFaceEditDispPage();
  39. void ClickFace( CMapSolid *pSolid, int faceIndex, int cmd, int clickMode = -1 ); // primary interface update call
  40. void Apply( void );
  41. void UpdateDialogData( void );
  42. void CloseAllDialogs( void );
  43. void ResetForceShows( void );
  44. void SetTool( unsigned int tool );
  45. unsigned int GetTool( void ) { return m_uiTool; }
  46. void UpdatePaintDialogs( void );
  47. //{{AFX_DATA( CFaceEditDispPage )
  48. enum { IDD = IDD_FACEEDIT_DISP };
  49. //}}AFX_DATA
  50. //{{AFX_VIRTUAL( CFaceEditDispPage )
  51. BOOL OnSetActive( void );
  52. BOOL OnKillActive( void );
  53. virtual BOOL PreTranslateMessage( MSG *pMsg );
  54. //}}AFX_VIRTUAL
  55. protected:
  56. unsigned int m_uiTool;
  57. CDispCreateDlg m_CreateDlg;
  58. CDispNoiseDlg m_NoiseDlg;
  59. CDispPaintDistDlg m_PaintDistDlg;
  60. CDispPaintDataDlg m_PaintDataDlg;
  61. CPaintSculptDlg m_PaintSculptDlg;
  62. bool m_bForceShowWalkable;
  63. bool m_bForceShowBuildable;
  64. bool m_bIsEditable;
  65. protected:
  66. inline void PostToolUpdate( void );
  67. void FillEditControls( bool bAllDisps );
  68. void UpdateEditControls( bool bAllDisps, bool bHasFace );
  69. void UpdatePower( CMapDisp *pDisp );
  70. void UpdateElevation( CMapDisp *pDisp );
  71. void UpdateScale( CMapDisp *pDisp );
  72. //=========================================================================
  73. //
  74. // Message Map
  75. //
  76. //{{AFX_MSG( CFaceEditDispPage )
  77. afx_msg void OnCheckMaskSelect( void );
  78. afx_msg void OnCheckMaskGrid( void );
  79. afx_msg void OnCheckNoPhysicsCollide( void );
  80. afx_msg void OnCheckNoHullCollide( void );
  81. afx_msg void OnCheckNoRayCollide( void );
  82. afx_msg void OnButtonSelect( void );
  83. afx_msg void OnButtonCreate( void );
  84. afx_msg void OnButtonDestroy( void );
  85. afx_msg void OnButtonNoise( void );
  86. afx_msg void OnButtonSubdivide( void );
  87. afx_msg void OnButtonSew( void );
  88. afx_msg void OnButtonPaintGeo( void );
  89. afx_msg void OnButtonPaintData( void );
  90. afx_msg void OnButtonTagWalkable( void );
  91. afx_msg void OnButtonTagBuildable( void );
  92. afx_msg void OnButtonTagRemove( void );
  93. afx_msg void OnSelectAdjacent();
  94. afx_msg void OnButtonInvertAlpha( void );
  95. afx_msg void OnSpinUpDown( NMHDR *pNMHDR, LRESULT *pResult );
  96. afx_msg void OnButtonApply( void );
  97. //}}AFX_MSG
  98. DECLARE_MESSAGE_MAP()
  99. public:
  100. afx_msg void OnBnClickedDispSculptPaint( );
  101. };
  102. #endif // FACEDIT_DISPPAGE_H