73 lines
1.1 KiB
C++
73 lines
1.1 KiB
C++
#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
|