主页面相关内容和快捷键修改
This commit is contained in:
@@ -21,6 +21,7 @@ namespace NBF
|
||||
{
|
||||
base.OnInit();
|
||||
IsShowCursor = true;
|
||||
IsDontBack = true;
|
||||
|
||||
var groupNames = Settings.Instance.GetAllGroups();
|
||||
foreach (var group in groupNames)
|
||||
@@ -73,29 +74,7 @@ namespace NBF
|
||||
|
||||
private void UseBottomMenu()
|
||||
{
|
||||
BottomMenu.OnTab += () =>
|
||||
{
|
||||
var i = Random.Range(1, 13);
|
||||
if (i < 3)
|
||||
{
|
||||
Notices.Success("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 6)
|
||||
{
|
||||
Notices.Warning("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 9)
|
||||
{
|
||||
Notices.Error("离开晶科科技看就看");
|
||||
}
|
||||
else if (i < 12)
|
||||
{
|
||||
Notices.Info("离开晶科科技看就看");
|
||||
}
|
||||
};
|
||||
BottomMenu.OnBack += OnBack;
|
||||
BottomMenu.OnEnter += OnApplySettings;
|
||||
BottomMenu.Use();
|
||||
BottomMenu.Use(this);
|
||||
}
|
||||
|
||||
private void OnApplySettings()
|
||||
@@ -149,6 +128,14 @@ namespace NBF
|
||||
SetListSelected(List.selectedIndex + 1);
|
||||
}
|
||||
}
|
||||
else if (action == InputDef.UI.Back)
|
||||
{
|
||||
OnBack();
|
||||
}
|
||||
else if (action == InputDef.UI.Enter)
|
||||
{
|
||||
OnApplySettings();
|
||||
}
|
||||
}
|
||||
|
||||
private void SetListSelected(int selectedIndex)
|
||||
@@ -181,7 +168,6 @@ namespace NBF
|
||||
|
||||
private void OnBack()
|
||||
{
|
||||
|
||||
if (Settings.Instance.HaveNotAppleSettings())
|
||||
{
|
||||
MessageBox.Show("还有未保存的信息", (b) =>
|
||||
@@ -201,10 +187,6 @@ namespace NBF
|
||||
protected override void OnHide()
|
||||
{
|
||||
base.OnHide();
|
||||
BottomMenu.OnBack -= OnBack;
|
||||
BottomMenu.OnTab -= OnResetSettings;
|
||||
BottomMenu.OnEnter -= OnApplySettings;
|
||||
BottomMenu.UnUse();
|
||||
InputManager.OnUICanceled -= OnUICanceled;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user