主页面相关内容和快捷键修改

This commit is contained in:
bob
2025-06-03 18:04:28 +08:00
parent 9334999332
commit 372e81508e
101 changed files with 607 additions and 833 deletions

View File

@@ -17,6 +17,11 @@ namespace NBC
bool IsCanVisible { get; }
bool IsDotDel { get; }
/// <summary>
/// 不能返回
/// </summary>
bool IsDontBack { get; }
bool IsModal { get; }
bool IsShowCursor { get; }
@@ -25,7 +30,7 @@ namespace NBC
void SetData(object args);
object GetData();
string[] GetDependPackages();
System.Collections.Generic.Dictionary<string, string> GetLanguageConfig();
void Init();
void Show();
void Hide();

View File

@@ -24,7 +24,7 @@ namespace NBC
public virtual bool IsCanVisible => ContentPane != null && ContentPane.parent != null && ContentPane.visible;
public bool IsDotDel { get; protected set; }
public bool IsDontBack { get; protected set; }
public virtual string UIPackRootUrl => string.Empty;
public virtual string UIPackName { get; set; }
@@ -76,10 +76,6 @@ namespace NBC
return new string[] { };
}
public virtual Dictionary<string, string> GetLanguageConfig()
{
return new Dictionary<string, string>();
}
public void Init()
{
@@ -194,6 +190,15 @@ namespace NBC
Show();
}
/// <summary>
/// 设置刷新多语言
/// </summary>
public void SetLanguage()
{
_ui.TrySetPanelLanguage(ContentPane);
OnSetLanguage();
}
public void HideImmediately()
{
// ContentPane.visible = false;
@@ -227,6 +232,7 @@ namespace NBC
private void OpenAnimBegin()
{
OnShow();
SetLanguage();
_ui?.DispatchEventWith(UIEvents.UIShow, this);
}
@@ -257,6 +263,13 @@ namespace NBC
{
}
/// <summary>
/// 代码设置多语言OnShow后和语言变化时会调用
/// </summary>
protected virtual void OnSetLanguage()
{
}
/// <summary>
/// 显示界面显示
/// </summary>
@@ -264,13 +277,12 @@ namespace NBC
protected virtual void OnShow()
{
}
/// <summary>
/// 显示界面完成(动画后)
/// </summary>
protected virtual void OnShowed()
{
}
protected virtual void OnUpdate()

View File

@@ -131,12 +131,12 @@ namespace NBC
curField = gtextField;
}
if (curField != null)
{
// var textFormat = curField.textFormat;
// textFormat.font = Lan.GetLanFontByCurFont(textFormat.font);
// curField.textFormat = textFormat;
}
if (curField == null) return;
var textFormat = curField.textFormat;
var font = Lan.GetLanFontByCurFont(textFormat.font);
if (font == null) return;
textFormat.font = font;
curField.textFormat = textFormat;
}
}
}