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.

105 lines
2.4 KiB

  1. //========= Copyright � 1996-2005, Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. // $NoKeywords: $
  6. //=============================================================================//
  7. #ifndef EVENTPROPERTIES_H
  8. #define EVENTPROPERTIES_H
  9. #ifdef _WIN32
  10. #pragma once
  11. #endif
  12. #include "basedialogparams.h"
  13. class CChoreoScene;
  14. class CChoreoEvent;
  15. //-----------------------------------------------------------------------------
  16. // Purpose:
  17. //-----------------------------------------------------------------------------
  18. class CEventParams : public CBaseDialogParams
  19. {
  20. public:
  21. // e.g. CChoreoEvent::GESTURE
  22. int m_nType;
  23. // Event descriptive name
  24. char m_szName[ 256 ];
  25. // Expression name/wav name/gesture name/look at name
  26. char m_szParameters[ 256 ];
  27. char m_szParameters2[ 256 ];
  28. char m_szParameters3[ 256 ];
  29. CChoreoScene *m_pScene;
  30. float m_flStartTime;
  31. float m_flEndTime;
  32. bool m_bHasEndTime;
  33. CChoreoEvent *m_pEvent;
  34. bool m_bDisabled;
  35. bool m_bFixedLength;
  36. bool m_bResumeCondition;
  37. bool m_bLockBodyFacing;
  38. float m_flDistanceToTarget;
  39. bool m_bForceShortMovement;
  40. bool m_bSyncToFollowingGesture;
  41. bool m_bPlayOverScript;
  42. bool m_bUsesTag;
  43. char m_szTagName[ 256 ];
  44. char m_szTagWav[ 256 ];
  45. // For Lookat events
  46. int pitch;
  47. int yaw;
  48. bool usepitchyaw;
  49. // For speak
  50. bool m_bCloseCaptionNoAttenuate;
  51. };
  52. int EventProperties( CEventParams *params );
  53. class CBaseEventPropertiesDialog
  54. {
  55. public:
  56. virtual void InitDialog( HWND hwndDlg ) = 0;
  57. virtual BOOL HandleMessage( HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam ) = 0;
  58. virtual void SetTitle() = 0;
  59. HWND GetControl( int id ) { return GetDlgItem( m_hDialog, id ); }
  60. virtual void ShowControlsForEventType( CEventParams *params );
  61. virtual void InitControlData( CEventParams *params );
  62. protected:
  63. virtual BOOL InternalHandleMessage( CEventParams *params, HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam, bool& handled );
  64. void SetDialogTitle( CEventParams *params, char const *eventname, char const *desc );
  65. void UpdateTagRadioButtons( CEventParams *params );
  66. void PopulateTagList( CEventParams *params );
  67. void ParseTags( CEventParams *params );
  68. void PopulateNamedActorList( HWND wnd, CEventParams *params );
  69. void GetSplineRect( HWND placeholder, RECT& rcOut );
  70. void DrawSpline( HDC hdc, HWND placeholder, CChoreoEvent *e );
  71. protected:
  72. HWND m_hDialog;
  73. };
  74. #endif // EVENTPROPERTIES_H