mirror of https://github.com/PrimeDecomp/prime.git
Match and link CFont
This commit is contained in:
parent
008b7f848d
commit
914ca994a0
|
@ -553,7 +553,7 @@ LIBS = [
|
|||
"Kyoto/Text/CWordBreakTables",
|
||||
"Kyoto/Text/CWordInstruction",
|
||||
"Kyoto/Text/CBlockInstruction",
|
||||
"Kyoto/Text/CFont",
|
||||
["Kyoto/Text/CFont", True],
|
||||
["Kyoto/Graphics/CLight", True],
|
||||
"Kyoto/Graphics/CCubeModel",
|
||||
["Kyoto/Graphics/CGX", True],
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
#ifndef _CFONT
|
||||
#define _CFONT
|
||||
|
||||
#include "Kyoto/Graphics/CColor.hpp"
|
||||
|
||||
class CFont {
|
||||
public:
|
||||
CFont(float scale);
|
||||
~CFont();
|
||||
int CharWidth(char) const;
|
||||
void DrawString(const char* str, long x, long y, const CColor& col) const;
|
||||
private:
|
||||
float mFontSize;
|
||||
int mFontSize;
|
||||
float mScale;
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#include "Kyoto/Text/CFont.hpp"
|
||||
#include "Kyoto/Alloc/CMemory.hpp"
|
||||
|
||||
CFont::CFont(float scale) : mFontSize(scale * 16.f), mScale(scale) {}
|
||||
|
||||
CFont::~CFont() {}
|
||||
|
||||
int CFont::CharWidth(char c) const { return mScale * 15.f; }
|
||||
|
||||
void CFont::DrawString(const char* str, long x, long y, const CColor& col) const {}
|
Loading…
Reference in New Issue