阶段性完成
This commit is contained in:
@@ -17,10 +17,22 @@ namespace Ichni.UI
|
||||
public TMP_Text keyText;
|
||||
public GameObject waitingForInputCover;
|
||||
|
||||
public void SetUp(string title, string subtitle, string actionName, int bindingIndex)
|
||||
private bool _isClickListenerRegistered;
|
||||
|
||||
/// <summary>
|
||||
/// 初始化重绑定行为。标题和说明由 Prefab 上的 LocalizedTMPText 配置;
|
||||
/// <paramref name="actionName"/> 仅用于定位 Input System Action,不是本地化 Key。
|
||||
/// </summary>
|
||||
public void SetUp(string actionName, int bindingIndex)
|
||||
{
|
||||
base.SetUp(title, subtitle);
|
||||
base.SetUp();
|
||||
if (_isClickListenerRegistered)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
button.onClick.AddListener(() => StartRebinding(actionName, bindingIndex));
|
||||
_isClickListenerRegistered = true;
|
||||
}
|
||||
|
||||
// 开始重绑定流程
|
||||
@@ -82,4 +94,4 @@ namespace Ichni.UI
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user