Feat: 场景视图mod,UI框架更换标题
This commit is contained in:
@@ -14,21 +14,16 @@ namespace UIFrame
|
||||
public Dictionary<string, Canvas> canvasDic = new Dictionary<string, Canvas>();
|
||||
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
gameOriginMainMenuUI.Initialize();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
gameOriginMainMenuUI.Cleanup();
|
||||
}
|
||||
|
||||
|
||||
public override bool CreateCanvas(string name)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// private void Awake()
|
||||
// {
|
||||
// gameOriginMainMenuUI.Initialize();
|
||||
// }
|
||||
//
|
||||
// private void OnDestroy()
|
||||
// {
|
||||
// gameOriginMainMenuUI.Cleanup();
|
||||
// }
|
||||
|
||||
|
||||
public override bool SetTitleImage(Sprite sprite)
|
||||
{
|
||||
@@ -36,26 +31,26 @@ namespace UIFrame
|
||||
}
|
||||
|
||||
|
||||
public override TMP_FontAsset CreateFontAsset(string fontFilePath)
|
||||
{
|
||||
var font = Font.CreateDynamicFontFromOSFont(fontFilePath, 24);
|
||||
var tmpFont = TMP_FontAsset.CreateFontAsset(
|
||||
font,
|
||||
samplingPointSize: 72, // 采样点大小,影响字体质量
|
||||
atlasPadding: 4, // 图集内字符间距
|
||||
renderMode: GlyphRenderMode.SDFAA, // 推荐使用 SDF 抗锯齿模式
|
||||
atlasWidth: 1024, // 图集宽度 (2的幂)
|
||||
atlasHeight: 1024, // 图集高度 (2的幂)
|
||||
atlasPopulationMode: AtlasPopulationMode.Dynamic, // 动态填充
|
||||
enableMultiAtlasSupport: true // 启用多图集支持
|
||||
);
|
||||
return tmpFont;
|
||||
}
|
||||
// public override TMP_FontAsset CreateFontAsset(string fontFilePath)
|
||||
// {
|
||||
// var font = Font.CreateDynamicFontFromOSFont(fontFilePath, 24);
|
||||
// var tmpFont = TMP_FontAsset.CreateFontAsset(
|
||||
// font,
|
||||
// samplingPointSize: 72, // 采样点大小,影响字体质量
|
||||
// atlasPadding: 4, // 图集内字符间距
|
||||
// renderMode: GlyphRenderMode.SDFAA, // 推荐使用 SDF 抗锯齿模式
|
||||
// atlasWidth: 1024, // 图集宽度 (2的幂)
|
||||
// atlasHeight: 1024, // 图集高度 (2的幂)
|
||||
// atlasPopulationMode: AtlasPopulationMode.Dynamic, // 动态填充
|
||||
// enableMultiAtlasSupport: true // 启用多图集支持
|
||||
// );
|
||||
// return tmpFont;
|
||||
// }
|
||||
|
||||
public override bool SetFont(TMP_FontAsset font)
|
||||
{
|
||||
return gameOriginMainMenuUI.SetFont(font);
|
||||
}
|
||||
// public override bool SetFont(TMP_FontAsset font)
|
||||
// {
|
||||
// return gameOriginMainMenuUI.SetFont(font);
|
||||
// }
|
||||
|
||||
public override Texture2D? LoadTexture(string imageFilePath)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user