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.

57 lines
1.0 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose:
  4. //
  5. //=============================================================================//
  6. #ifndef STATUSWINDOW_H
  7. #define STATUSWINDOW_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. class mxScrollbar;
  12. #define IDC_STATUS_SCROLL 1000
  13. class CStatusWindow : public mxWindow
  14. {
  15. public:
  16. CStatusWindow (mxWindow *parent, int x, int y, int w, int h, const char *label = 0 );
  17. ~CStatusWindow();
  18. void StatusPrint( int r, int g, int b, bool overwrite, const char *text );
  19. virtual void redraw();
  20. virtual bool PaintBackground( void );
  21. virtual int handleEvent( mxEvent *event );
  22. // virtual void Think( float dt );
  23. private:
  24. void PositionSliders( int sboffset );
  25. enum
  26. {
  27. MAX_TEXT_LINES = 1024,
  28. TEXT_LINE_MASK = MAX_TEXT_LINES - 1,
  29. };
  30. struct TextLine
  31. {
  32. char m_szText[ 512 ];
  33. int r, g, b;
  34. float curtime;
  35. };
  36. TextLine m_rgTextLines[ MAX_TEXT_LINES ];
  37. int m_nCurrentLine;
  38. mxScrollbar *m_pScrollbar;
  39. };
  40. extern CStatusWindow *g_pStatusWindow;
  41. #endif // STATUSWINDOW_H