36 lines
748 B
Plaintext
36 lines
748 B
Plaintext
/*
|
|
文件名:FontAsset.nut
|
|
路径:User/Asset/FontAsset.nut
|
|
创建日期:2024-12-10 11:37
|
|
文件用途:
|
|
*/
|
|
|
|
class _FontAssetManager_ {
|
|
|
|
//初始化字体
|
|
function InitFont() {
|
|
//普通宋体小字
|
|
Font.PreLoad("Fonts/GasinamuNew.ttf");
|
|
Font("gasinamuM", 11.5).Register(0);
|
|
}
|
|
|
|
constructor() {
|
|
|
|
//初始化字体
|
|
InitFont();
|
|
|
|
getroottable().FontAssetManager <- this;
|
|
}
|
|
|
|
//生成普通宋体小字
|
|
function GenerateNormal(text, rgba, stroke) {
|
|
//登录按钮文本
|
|
local TextActor = TextActor(0, {
|
|
color = rgba
|
|
});
|
|
TextActor.SetText(text);
|
|
if (stroke)
|
|
TextActor.SetOutline(3.0);
|
|
return TextActor;
|
|
}
|
|
} |