aboutsummaryrefslogtreecommitdiff
path: root/sp/src/game/client/imessagechars.h
diff options
context:
space:
mode:
authorJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
committerJoe Ludwig <[email protected]>2013-06-26 15:22:04 -0700
commit39ed87570bdb2f86969d4be821c94b722dc71179 (patch)
treeabc53757f75f40c80278e87650ea92808274aa59 /sp/src/game/client/imessagechars.h
downloadsource-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.tar.xz
source-sdk-2013-39ed87570bdb2f86969d4be821c94b722dc71179.zip
First version of the SOurce SDK 2013
Diffstat (limited to 'sp/src/game/client/imessagechars.h')
-rw-r--r--sp/src/game/client/imessagechars.h57
1 files changed, 57 insertions, 0 deletions
diff --git a/sp/src/game/client/imessagechars.h b/sp/src/game/client/imessagechars.h
new file mode 100644
index 00000000..bd523efd
--- /dev/null
+++ b/sp/src/game/client/imessagechars.h
@@ -0,0 +1,57 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose:
+//
+// $Workfile: $
+// $Date: $
+//
+//-----------------------------------------------------------------------------
+// $Log: $
+//
+// $NoKeywords: $
+//=============================================================================//
+#if !defined( IMESSAGECHARS_H )
+#define IMESSAGECHARS_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include <vgui/VGUI.h>
+
+namespace vgui
+{
+class Panel;
+typedef unsigned long HFont;
+}
+
+abstract_class IMessageChars
+{
+public:
+ enum
+ {
+ MESSAGESTRINGID_NONE = -1,
+ MESSAGESTRINGID_BASE = 0
+ };
+
+ virtual void Create( vgui::VPANEL parent ) = 0;
+ virtual void Destroy( void ) = 0;
+
+ // messageID can be MESSAGESTRINGID_NONE or MESSAGESTRINGID_BASE plus some offset. You can refer to the message by
+ // its ID later.
+ virtual int DrawString( vgui::HFont pCustomFont, int x, int y, int r, int g, int b, int a, const char *fmt, int messageID, ... ) = 0;
+ virtual int DrawString( vgui::HFont pCustomFont, int x, int y, const char *fmt, int messageID, ... ) = 0;
+
+ virtual int DrawStringForTime( float flTime, vgui::HFont pCustomFont, int x, int y, int r, int g, int b, int a, const char *fmt, int messageID, ... ) = 0;
+ virtual int DrawStringForTime( float flTime, vgui::HFont pCustomFont, int x, int y, const char *fmt, int messageID, ... ) = 0;
+
+ // Remove all messages with the specified ID (passed into DrawStringForTime).
+ virtual void RemoveStringsByID( int messageID ) = 0;
+
+ virtual void GetStringLength( vgui::HFont pCustomFont, int *width, int *height, PRINTF_FORMAT_STRING const char *fmt, ... ) = 0;
+
+ virtual void Clear( void ) = 0;
+};
+
+extern IMessageChars *messagechars;
+
+#endif // IMESSAGECHARS_H \ No newline at end of file