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.

60 lines
1.4 KiB

  1. //===== Copyright (c) 1996-2009, Valve Corporation, All rights reserved. ====//
  2. //
  3. // Purpose: Contains all utility methods for the new game UI system
  4. //
  5. //===========================================================================//
  6. #ifndef GAMEUI_H
  7. #define GAMEUI_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "igamesystem.h"
  12. //-----------------------------------------------------------------------------
  13. // Forward declarations
  14. //-----------------------------------------------------------------------------
  15. struct Rect_t;
  16. struct InputEvent_t;
  17. //-----------------------------------------------------------------------------
  18. // Create a game system for UI
  19. //-----------------------------------------------------------------------------
  20. class CGameUIGameSystem : public CBaseGameSystemPerFrame
  21. {
  22. // Inherited from IGameSystem
  23. public:
  24. virtual bool Init();
  25. virtual void PostInit();
  26. virtual void Update( float frametime );
  27. virtual void Shutdown();
  28. // Other public methods
  29. public:
  30. // Init any render targets needed by the UI.
  31. void InitRenderTargets();
  32. IMaterialProxy *CreateProxy( const char *proxyName );
  33. // Renders the game UI
  34. void Render( const Rect_t &viewport, float flCurrentTime );
  35. // Send an input event to the game ui
  36. bool RegisterInputEvent( const InputEvent_t &iEvent );
  37. // Reloads game GUI sounds
  38. void ReloadSounds();
  39. private:
  40. void PrecacheGameUISounds();
  41. };
  42. extern CGameUIGameSystem *g_pGameUIGameSystem;
  43. #endif // GAMEUI_H