Skip to content

Class "Font"⚓︎

Modified Constructors⚓︎

Font ()⚓︎

Font,bool Font ( string FontPath )⚓︎

新增了可选的 "FontPath" 参数,该函数现在返回两个值:Font 对象和一个布尔值,用于表示字体是否成功加载。

DrawString ()⚓︎

void DrawString ( string String, float PositionX, float PositionY, KColor RenderColor, int BoxWidth = 0, boolean Center = false )⚓︎

与默认函数相同,但具有更好的输入验证,以防止崩溃。

DrawStringScaled ()⚓︎

void DrawStringScaled ( string String, float PositionX, float PositionY, float ScaleX, float ScaleY, KColor RenderColor, int BoxWidth = 0, boolean Center = false )⚓︎

与默认函数相同,但具有更好的输入验证,以防止崩溃。

DrawStringScaledUTF8 ()⚓︎

void DrawStringScaledUTF8 ( string String, float PositionX, float PositionY, float ScaleX, float ScaleY, KColor RenderColor, int BoxWidth = 0, boolean Center = false )⚓︎

与默认函数相同,但具有更好的输入验证,以防止崩溃。

DrawStringUTF8 ()⚓︎

void DrawStringUTF8 ( string String, float PositionX, float PositionY, KColor RenderColor, int BoxWidth = 0, boolean Center = false )⚓︎

与默认函数相同,但具有更好的输入验证,以防止崩溃。

GetStringWidth ()⚓︎

int GetStringWidth ( string String )⚓︎

与默认函数相同,但具有更好的输入验证,以防止崩溃。

GetStringWidthUTF8 ()⚓︎

int GetStringWidthUTF8 ( string String )⚓︎

与默认函数相同,但具有更好的输入验证,以防止崩溃。