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.

90 lines
2.4 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //===========================================================================//
  6. #ifndef GAMEEVENTEDITPANEL_H
  7. #define GAMEEVENTEDITPANEL_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "vgui_controls/editablepanel.h"
  12. #include "tier1/utlstring.h"
  13. #include "datamodel/dmehandle.h"
  14. #include "igameevents.h"
  15. //-----------------------------------------------------------------------------
  16. // Forward declarations
  17. //-----------------------------------------------------------------------------
  18. class CGameEventEditDoc;
  19. namespace vgui
  20. {
  21. class ComboBox;
  22. class Button;
  23. class TextEntry;
  24. class ListPanel;
  25. class CheckButton;
  26. class RadioButton;
  27. }
  28. #define MAX_GAME_EVENT_PARAMS 20
  29. extern IGameEventManager2 *gameeventmanager;
  30. //-----------------------------------------------------------------------------
  31. // Panel that shows all entities in the level
  32. //-----------------------------------------------------------------------------
  33. class CGameEventEditPanel : public vgui::EditablePanel
  34. {
  35. DECLARE_CLASS_SIMPLE( CGameEventEditPanel, vgui::EditablePanel );
  36. public:
  37. CGameEventEditPanel( CGameEventEditDoc *pDoc, vgui::Panel* pParent ); // standard constructor
  38. ~CGameEventEditPanel();
  39. // Inherited from Panel
  40. virtual void OnCommand( const char *pCommand );
  41. private:
  42. // Text to attribute...
  43. //void TextEntryToAttribute( vgui::TextEntry *pEntry, const char *pAttributeName );
  44. //void TextEntriesToVector( vgui::TextEntry *pEntry[3], const char *pAttributeName );
  45. // Messages handled
  46. /*
  47. MESSAGE_FUNC_PARAMS( OnTextChanged, "TextChanged", kv );
  48. MESSAGE_FUNC_PARAMS( OnSoundSelected, "SoundSelected", kv );
  49. MESSAGE_FUNC_PARAMS( OnPicked, "Picked", kv );
  50. MESSAGE_FUNC_PARAMS( OnFileSelected, "FileSelected", kv );
  51. MESSAGE_FUNC_PARAMS( OnSoundRecorded, "SoundRecorded", kv );*/
  52. //MESSAGE_FUNC( OnEventSend, "SendEvent" );
  53. MESSAGE_FUNC_PARAMS( OnTextChanged, "TextChanged", kv );
  54. void LoadEventsFromFile( const char *filename );
  55. CGameEventEditDoc *m_pDoc;
  56. // drop down of available events
  57. vgui::ComboBox *m_pEventCombo;
  58. vgui::Label *m_pParamLabels[MAX_GAME_EVENT_PARAMS];
  59. vgui::TextEntry *m_pParams[MAX_GAME_EVENT_PARAMS];
  60. vgui::Button *m_pSendEventButton;
  61. CUtlSymbolTable m_EventFiles; // list of all loaded event files
  62. CUtlVector<CUtlSymbol> m_EventFileNames;
  63. KeyValues *m_pEvents;
  64. vgui::TextEntry *m_pFilterBox;
  65. };
  66. #endif // GAMEEVENTEDITPANEL_H