keybode

css v34 IPanel & ISurface

Apr 19th, 2014
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.63 KB | None | 0 0
  1. class IPanel
  2. {
  3. public:
  4.     const char* GetName( unsigned int vguiPanel )
  5.     {
  6.         typedef const char* ( __thiscall* GetNameFn )( PVOID, unsigned int );
  7.         return GetMethod< GetNameFn >( this, 35 )( this, vguiPanel );
  8.     }
  9. };
  10.  
  11. class ISurface
  12. {
  13. public:
  14.     void DrawSetColor( int r, int g, int b, int a )
  15.     {
  16.         typedef void ( __thiscall* DrawSetColorFn )( PVOID, int, int, int, int );
  17.         GetMethod< DrawSetColorFn >( this, 11 )( this, r, g, b, a );
  18.     }
  19.  
  20.     void DrawFilledRect( int x0, int y0, int x1, int y1 )
  21.     {
  22.         typedef void ( __thiscall* DrawFilledRectFn )( PVOID, int, int, int, int );
  23.         GetMethod< DrawFilledRectFn >( this, 12 )( this, x0, y0, x1, y1 );
  24.     }
  25.  
  26.     void DrawOutlinedRect( int x0, int y0, int x1, int y1 )
  27.     {
  28.         typedef void ( __thiscall* DrawOutlinedFn )( PVOID, int, int, int, int );
  29.         GetMethod< DrawOutlinedFn >( this, 14 )( this, x0, y0, x1, y1 );
  30.     }
  31.  
  32.     void DrawLine( int x0, int y0, int x1, int y1 )
  33.     {
  34.         typedef void ( __thiscall* DrawLineFn )( PVOID, int, int, int, int );
  35.         GetMethod< DrawLineFn >( this, 15 )( this, x0, y0, x1, y1 );
  36.     }
  37.  
  38.     void DrawSetTextFont( unsigned long font )
  39.     {
  40.         typedef void ( __thiscall* DrawSetTextFontFn )( PVOID, unsigned long );
  41.         GetMethod< DrawSetTextFontFn >( this, 17 )( this, font );
  42.     }
  43.  
  44.     void DrawSetTextColor( int r, int g, int b, int a )
  45.     {
  46.         typedef void ( __thiscall* DrawSetTextColorFn )( PVOID, int, int, int, int );
  47.         GetMethod< DrawSetTextColorFn >( this, 19 )( this, r, g, b, a );
  48.     }
  49.  
  50.     void DrawSetTextPos( int x, int y )
  51.     {
  52.         typedef void ( __thiscall* DrawSetTextPosFn )( PVOID, int, int );
  53.         GetMethod< DrawSetTextPosFn >( this, 20 )( this, x, y );
  54.     }
  55.  
  56.     void DrawPrintText( const wchar_t* text, int textLen )
  57.     {
  58.         typedef void ( __thiscall* DrawPrintTextFn )( PVOID, const wchar_t*, int, int );
  59.         return GetMethod< DrawPrintTextFn >( this, 22 )( this, text, textLen, 0 );
  60.     }
  61.  
  62.     unsigned long CreateFont( )
  63.     {
  64.         typedef unsigned int ( __thiscall* CreateFontFn )( PVOID );
  65.         return GetMethod< CreateFontFn >( this, 64 )( this );
  66.     }
  67.  
  68.     void SetFontGlyphSet( unsigned long font, const char* windowsFontName, int tall, int weight, int blur, int scanlines, int flags )
  69.     {
  70.         typedef void ( __thiscall* SetFontGlyphSetFn )( PVOID, unsigned long, const char*, int, int, int, int, int );
  71.         GetMethod< SetFontGlyphSetFn >( this, 65 )( this, font, windowsFontName, tall, weight, blur, scanlines, flags );
  72.     }
  73.  
  74.     void GetTextSize( unsigned long font, const wchar_t* text, int& wide, int& tall )
  75.     {
  76.         typedef void ( __thiscall* GetTextSizeFn )( PVOID, unsigned long, const wchar_t*, int&, int& );
  77.         GetMethod< GetTextSizeFn >( this, 72 )( this, font, text, wide, tall );
  78.     }
  79. };
Advertisement
Add Comment
Please, Sign In to add comment