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.

161 lines
3.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef CONTROLPANEL_H
  7. #define CONTROLPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #ifndef INCLUDED_MXWINDOW
  12. #include <mxtk/mxWindow.h>
  13. #endif
  14. #include "faceposertoolwindow.h"
  15. #define IDC_TAB 1901
  16. #define IDC_RENDERMODE 2001
  17. #define IDC_GROUND 2003
  18. #define IDC_MOVEMENT 2004
  19. #define IDC_BACKGROUND 2005
  20. #define IDC_HITBOXES 2006
  21. #define IDC_BONES 2007
  22. #define IDC_ATTACHMENTS 2008
  23. #define IDC_PHYSICSMODEL 2009
  24. #define IDC_PHYSICSHIGHLIGHT 2010
  25. #define IDC_MODELSPACING 2011
  26. #define IDC_TOOLSDRIVEMOUTH 2012
  27. #define IDC_SEQUENCE 3001
  28. #define IDC_SPEEDSCALE 3002
  29. #define IDC_PRIMARYBLEND 3003
  30. #define IDC_SECONDARYBLEND 3004
  31. #define IDC_BODYPART 4001
  32. #define IDC_SUBMODEL 4002
  33. #define IDC_CONTROLLER 4003
  34. #define IDC_CONTROLLERVALUE 4004
  35. #define IDC_SKINS 4005
  36. #define IDC_EXPRESSIONCLASS 5001
  37. #define IDC_EXPRESSIONTRAY 5002
  38. #define IDC_ANIMATIONBROWSER 5003
  39. class mxTab;
  40. class mxChoice;
  41. class mxCheckBox;
  42. class mxSlider;
  43. class mxLineEdit;
  44. class mxLabel;
  45. class mxButton;
  46. class MatSysWindow;
  47. class TextureWindow;
  48. class mxExpressionTray;
  49. class FlexPanel;
  50. class PhonemeEditor;
  51. class mxExpressionTab;
  52. class mxExpressionSlider;
  53. class ExpressionTool;
  54. class CChoreoView;
  55. class ControlPanel : public mxWindow, public IFacePoserToolWindow
  56. {
  57. typedef mxWindow BaseClass;
  58. mxTab *tab;
  59. mxChoice *cRenderMode;
  60. mxCheckBox *cbGround, *cbMovement, *cbBackground;
  61. mxChoice *cSequence;
  62. mxSlider *slSpeedScale;
  63. mxLabel *lSpeedScale;
  64. mxChoice *cBodypart, *cController, *cSubmodel;
  65. mxSlider *slController;
  66. mxChoice *cSkin;
  67. mxLabel *lModelInfo1, *lModelInfo2;
  68. mxLineEdit *leMeshScale, *leBoneScale;
  69. mxSlider *slModelGap;
  70. mxCheckBox *cbAllWindowsDriveSpeech;
  71. public:
  72. // CREATORS
  73. ControlPanel (mxWindow *parent);
  74. virtual ~ControlPanel ();
  75. // MANIPULATORS
  76. virtual int handleEvent (mxEvent *event);
  77. virtual void redraw();
  78. virtual void OnDelete();
  79. virtual bool CanClose();
  80. virtual void Think( float dt );
  81. void dumpModelInfo ();
  82. void ChangeModel( const char *filename );
  83. void setRenderMode (int mode);
  84. void setShowGround (bool b);
  85. void setShowMovement (bool b);
  86. void setShowBackground (bool b);
  87. void setHighlightBone( int index );
  88. void initSequenceChoices( );
  89. void setSequence (int index);
  90. void setSpeed( float value );
  91. void initPoseParameters ();
  92. void setBlend(int index, float value );
  93. void initBodypartChoices();
  94. void setBodypart (int index);
  95. void setSubmodel (int index);
  96. void initBoneControllerChoices();
  97. void setBoneController (int index);
  98. void setBoneControllerValue (int index, float value);
  99. void initSkinChoices();
  100. void setModelInfo ();
  101. void centerView ();
  102. void fullscreen ();
  103. void CenterOnFace( void );
  104. void PositionControls( int width, int height );
  105. bool CloseClass( int classindex );
  106. bool Close();
  107. bool Closeall();
  108. void Copy( void );
  109. void Paste( void );
  110. void Undo( void );
  111. void Redo( void );
  112. void UndoExpression( int index );
  113. void RedoExpression( int index );
  114. void DeleteExpression( int index );
  115. float GetModelGap( void );
  116. bool AllToolsDriveSpeech( void );
  117. };
  118. extern ControlPanel *g_pControlPanel;
  119. #endif // CONTROLPANEL_H