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.

61 lines
1.2 KiB

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