mirror of
https://github.com/ENSL/NS.git
synced 2024-12-11 13:22:03 +00:00
5af879678c
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@69 67975925-1194-0748-b3d5-c16f83f1a3a1
42 lines
No EOL
1.4 KiB
C++
42 lines
No EOL
1.4 KiB
C++
|
|
#ifndef VGUI_FONT_H
|
|
#define VGUI_FONT_H
|
|
|
|
#include<VGUI.h>
|
|
|
|
namespace vgui
|
|
{
|
|
|
|
class BaseFontPlat;
|
|
|
|
//TODO: cursors and fonts should work like gl binds
|
|
class VGUIAPI Font
|
|
{
|
|
public:
|
|
Font(const char* name,int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
|
// If pFileData is non-NULL, then it will try to load the 32-bit (RLE) TGA file. If that fails,
|
|
// it will create the font using the specified parameters.
|
|
// pUniqueName should be set if pFileData and fileDataLen are set so it can determine if a font is already loaded.
|
|
Font(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
|
private:
|
|
virtual void init(const char* name,void *pFileData,int fileDataLen, int tall,int wide,float rotation,int weight,bool italic,bool underline,bool strikeout,bool symbol);
|
|
public:
|
|
BaseFontPlat* getPlat();
|
|
virtual void getCharRGBA(int ch,int rgbaX,int rgbaY,int rgbaWide,int rgbaTall,uchar* rgba);
|
|
virtual void getCharABCwide(int ch,int& a,int& b,int& c);
|
|
virtual void getTextSize(const char* text,int& wide,int& tall);
|
|
virtual int getTall();
|
|
virtual int getId();
|
|
protected:
|
|
char* _name;
|
|
BaseFontPlat* _plat;
|
|
int _id;
|
|
friend class Surface;
|
|
};
|
|
|
|
|
|
void Font_Reset();
|
|
|
|
}
|
|
|
|
#endif |