This commit is contained in:
2026-02-21 19:51:53 +08:00
parent 27a1f9d084
commit d953ea4b7a
11 changed files with 212 additions and 79 deletions

View File

@@ -19,6 +19,7 @@ namespace NBF
protected override void OnShow()
{
InputManager.Instance.On(this);
ItemInfo = GetData() as ItemInfo;
if (ItemInfo == null || ItemInfo.Config == null)
{
@@ -35,32 +36,89 @@ namespace NBF
// var model = PrefabsHelper.CreatePrefab(ItemInfo.Config.Model);
Model.SetData(ItemInfo);
// Model.SetBackground(Back);
InputManager.OnUICanceled += OnUICanceled;
}
private void OnUICanceled(string action)
#region UI事件
//
// [InputInvoke(InputDef.UI.Prev, UIInputButtonShowMode.MenuLeft)]
// private void OnPrev()
// {
// ItemList.Menu.OnClickBtnPrev();
// }
//
// [InputInvoke(InputDef.UI.Next, UIInputButtonShowMode.MenuRight)]
// private void OnNext()
// {
// ItemList.Menu.OnClickBtnNext();
// }
//
// [InputInvoke(InputDef.UI.Left, UIInputButtonShowMode.BottomLeft)]
// private void OnLeft()
// {
// ItemList.List.Selector.Left();
// }
//
// [InputInvoke(InputDef.UI.Right, UIInputButtonShowMode.BottomLeft)]
// private void OnRight()
// {
// ItemList.List.Selector.Right();
// }
//
// [InputInvoke(InputDef.UI.Up, UIInputButtonShowMode.BottomLeft)]
// private void OnUp()
// {
// ItemList.List.Selector.Up();
// // ChangeListSelected();
// }
//
// [InputInvoke(InputDef.UI.Down, UIInputButtonShowMode.BottomLeft)]
// private void OnDown()
// {
// ItemList.List.Selector.Down();
// }
//
// [InputInvoke(InputDef.UI.Enter, UIInputButtonShowMode.BottomLeft, "查看")]
// private void OnApplySettings()
// {
// var selectedItem = ItemList.List.Selector.SelectedItem;
// if (selectedItem != null)
// {
// ItemList.List.InvokeClickItem(selectedItem);
// }
// }
[InputInvoke(InputDef.UI.Back, UIInputButtonShowMode.BottomRight)]
private void OnBack()
{
if (!IsTop) return;
if (action == InputDef.UI.SubPrev)
{
}
else if (action == InputDef.UI.SubNext)
{
}
else if (action == InputDef.UI.Up)
{
}
else if (action == InputDef.UI.Down)
{
}
Hide();
}
#endregion
// private void OnUICanceled(string action)
// {
// if (!IsTop) return;
// if (action == InputDef.UI.SubPrev)
// {
// }
// else if (action == InputDef.UI.SubNext)
// {
// }
// else if (action == InputDef.UI.Up)
// {
// }
// else if (action == InputDef.UI.Down)
// {
// }
// }
protected override void OnHide()
{
InputManager.Instance.Off(this);
Model.UnloadModel();
InputManager.OnUICanceled -= OnUICanceled;
}
}
}

View File

@@ -8,6 +8,7 @@
CommonBinder.BindAll();
FishingBinder.BindAll();
MainBinder.BindAll();
Common2Binder.BindAll();
}
}
}

View File

@@ -37,7 +37,8 @@ namespace NBF
}
else if (btn == BtnMake)
{
MakePanel.Show();
BagSlotPanel.Show();
// MakePanel.Show();
}
else if (btn == BtnMap)
{

View File

@@ -32,14 +32,14 @@ namespace NBF
{
await LoginHelper.Login(InputAccount.text);
// await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
await Fishing.Instance.Go(RoleModel.Instance.Info.MapId);
// FishingShopPanel.Show();
// BagPanel.Show();
// BagSlotPanel.Show();
SettingPanel.Show();
// SettingPanel.Show();
// HomePanel.Show();