networking

This commit is contained in:
2025-07-13 15:47:42 +03:00
parent f5b26be510
commit a9c28b8940
345 changed files with 142130 additions and 174 deletions

View File

@@ -1,27 +1,43 @@
#ifndef FGUI_H
#define FGUI_H
#include "rendering.h"
#include "tier0/platform.h"
#include "tier1/utlstring.h"
abstract_class fgui
class CFGUI_Widget;
struct FGUI_Event_t
{
struct Color_t
{
float r;
float g;
float b;
};
/* every position is resized to some degree of 1280x720 */
struct Vector_t
{
float x;
float y;
};
static void Init( void );
static void Frame( void );
static void Rectangle( Vector_t posPx, Vector_t posFl, Vector_t sizePx, Vector_t sizeFl );
static void Text( const char *psz, uint32_t nSize, Vector_t pos, Vector_t color );
};
#endif
class CFont
{
public:
CUtlString szName;
ITexture *pTexture;
uint32_t glyphWidth;
uint32_t glyphHeight;
char cCharacterSet[256];
};
interface IFGUI
{
public:
static void Init( void );
static void Frame( void );
static void AppendWidget( CFGUI_Widget *pWidget );
static void DestroyWidget( CFGUI_Widget *pWidget );
static void SetRectColor( float r, float g, float b, float a );
static void DrawRect( int32_t iPosX, int32_t iPosY, uint32_t uSizeX, uint32_t uSizeY );
static CFont *LoadFont( CUtlString szFontPath );
static void SetTextFont( CFont *pFont );
static void SetTextPos( float x, float y );
static void SetTextColor( float r, float g, float b, float a );
static void DrawText( CUtlString psz );
};
#endif