had to commit cuz i was getting bombed

This commit is contained in:
2026-05-24 02:49:36 +03:00
parent c55a34f33c
commit a9766d6dd6
22 changed files with 389 additions and 116 deletions

View File

@@ -1,72 +0,0 @@
#ifndef KOTGUI_H
#define KOTGUI_H
#include "../materialsystem/imaterialsystem.h"
#include "../materialsystem/igamewindow.h"
#include "tier2/iappsystem.h"
abstract_class IRenderFont
{
public:
virtual IImage *GetAtlas();
virtual bool IsLetterPresent( uint32_t letter );
virtual float GetLetterX( uint32_t letter );
virtual float GetLetterY( uint32_t letter );
virtual float GetWidthX( uint32_t letter );
virtual float GetWidthY( uint32_t letter );
};
struct Alignment_t
{
int iX;
int iY;
float fX;
float fY;
};
struct Color3
{
float R;
float G;
float B;
};
struct Color4
{
float R;
float G;
float B;
};
enum EKotUIShader
{
k_eKotGUI_Text,
k_eKotGUI_Widget,
};
abstract_class IKotUIManager: public IAppSystem2
{
public:
virtual void BeginDrawing() = 0;
virtual void EndDrawing() = 0;
virtual void DrawText(
Alignment_t position,
Alignment_t offset,
float fRotation,
Color4 color,
uint32_t *pText,
uint32_t uSize,
IRenderFont *pFont,
float fTextSize
) = 0;
};
IKotUIManager *KotUIManager();
#define KOT_UI_INTEFACE_VERSION "KotUI001"
#endif

48
public/kottui/kottui.h Normal file
View File

@@ -0,0 +1,48 @@
#ifndef KOTTUI_H
#define KOTTUI_H
#include "../materialsystem/imaterialsystem.h"
#include "../materialsystem/igamewindow.h"
#include "tier2/iappsystem.h"
abstract_class IRenderFont
{
public:
virtual IImage *GetAtlas();
virtual bool IsLetterPresent( uint32_t letter );
virtual float GetLetterX( uint32_t letter );
virtual float GetLetterY( uint32_t letter );
virtual float GetWidthX( uint32_t letter );
virtual float GetWidthY( uint32_t letter );
};
abstract_class IKotUIBuffer
{
public:
virtual void SetPosition( int iY, int iX ) = 0;
virtual void Move( int iY, int iX ) = 0;
virtual void SetColor( char c ) = 0;
virtual void Clear( char c ) = 0;
virtual void PutChar( char c ) = 0;
virtual void Printf(const char *szFormat, ...) = 0;
virtual void Draw( IRenderContext *pRenderContext );
virtual void SetTextSize( int iY, int iX ) = 0;
virtual void SetTextFont( IRenderFont *pFont ) = 0;
};
abstract_class IKotUIManager: public IAppSystem
{
public:
virtual void CreateBuffer( int iWidth, int iHeight ) = 0;
};
IKotUIManager *KotUIManager();
#define KOT_UI_INTEFACE_VERSION "KotUI001"
#endif