将 DisplayItemInfoForm 更名为 ItemTooltipForm
This commit is contained in:
@@ -27,7 +27,7 @@ namespace SepCore.UI
|
||||
GameEntry.Event.Subscribe(RefreshEventArgs.EventId, Refresh);
|
||||
GameEntry.Event.Subscribe(ShopPurchaseEventArgs.EventId, ShopPurchase);
|
||||
GameEntry.Event.Subscribe(ShopContinueEventArgs.EventId, ShopContinue);
|
||||
GameEntry.Event.Subscribe(DisplayItemShowEventArgs.EventId, DisplayItemShow);
|
||||
GameEntry.Event.Subscribe(ItemTooltipShowEventArgs.EventId, DisplayItemShow);
|
||||
}
|
||||
|
||||
protected override void UnsubscribeCustomEvents()
|
||||
@@ -35,7 +35,7 @@ namespace SepCore.UI
|
||||
GameEntry.Event.Unsubscribe(RefreshEventArgs.EventId, Refresh);
|
||||
GameEntry.Event.Unsubscribe(ShopPurchaseEventArgs.EventId, ShopPurchase);
|
||||
GameEntry.Event.Unsubscribe(ShopContinueEventArgs.EventId, ShopContinue);
|
||||
GameEntry.Event.Unsubscribe(DisplayItemShowEventArgs.EventId, DisplayItemShow);
|
||||
GameEntry.Event.Unsubscribe(ItemTooltipShowEventArgs.EventId, DisplayItemShow);
|
||||
}
|
||||
|
||||
#region BuildContext
|
||||
@@ -205,7 +205,7 @@ namespace SepCore.UI
|
||||
|
||||
public override async UniTask CloseUIAsync(object userData = null, float timeout = 30f)
|
||||
{
|
||||
GameEntry.Event.Fire(this, DisplayItemInfoHideEventArgs.Create(true));
|
||||
GameEntry.Event.Fire(this, ItemTooltipHideEventArgs.Create(true));
|
||||
_rawData = null;
|
||||
await base.CloseUIAsync(userData, timeout);
|
||||
}
|
||||
@@ -344,7 +344,7 @@ namespace SepCore.UI
|
||||
return false;
|
||||
}
|
||||
|
||||
private bool TryGetWeaponInfoRawData(int index, Vector3 targetPos, out DisplayItemInfoRawData rawData)
|
||||
private bool TryGetWeaponInfoRawData(int index, Vector3 targetPos, out ItemTooltipRawData rawData)
|
||||
{
|
||||
rawData = null;
|
||||
|
||||
@@ -373,7 +373,7 @@ namespace SepCore.UI
|
||||
return false;
|
||||
}
|
||||
|
||||
rawData = new DisplayItemInfoRawData
|
||||
rawData = new ItemTooltipRawData
|
||||
{
|
||||
TargetPos = targetPos,
|
||||
Index = index,
|
||||
@@ -386,7 +386,7 @@ namespace SepCore.UI
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool TryGetPropInfoRawData(int index, Vector3 targetPos, out DisplayItemInfoRawData rawData)
|
||||
private bool TryGetPropInfoRawData(int index, Vector3 targetPos, out ItemTooltipRawData rawData)
|
||||
{
|
||||
rawData = null;
|
||||
|
||||
@@ -409,7 +409,7 @@ namespace SepCore.UI
|
||||
return false;
|
||||
}
|
||||
|
||||
rawData = new DisplayItemInfoRawData
|
||||
rawData = new ItemTooltipRawData
|
||||
{
|
||||
TargetPos = targetPos,
|
||||
Index = index,
|
||||
@@ -442,7 +442,7 @@ namespace SepCore.UI
|
||||
}
|
||||
|
||||
Form?.RemoveWeaponDisplayItem(index);
|
||||
GameEntry.Event.Fire(this, DisplayItemInfoHideEventArgs.Create(true));
|
||||
GameEntry.Event.Fire(this, ItemTooltipHideEventArgs.Create(true));
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -513,7 +513,7 @@ namespace SepCore.UI
|
||||
|
||||
private void DisplayItemShow(object sender, GameEventArgs e)
|
||||
{
|
||||
if (e is not DisplayItemShowEventArgs args)
|
||||
if (e is not ItemTooltipShowEventArgs args)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -529,7 +529,7 @@ namespace SepCore.UI
|
||||
return;
|
||||
}
|
||||
|
||||
DisplayItemInfoRawData rawData;
|
||||
ItemTooltipRawData rawData;
|
||||
bool success = args.IsWeapon
|
||||
? TryGetWeaponInfoRawData(args.Index, args.TargetPos, out rawData)
|
||||
: TryGetPropInfoRawData(args.Index, args.TargetPos, out rawData);
|
||||
@@ -539,7 +539,7 @@ namespace SepCore.UI
|
||||
return;
|
||||
}
|
||||
|
||||
GameEntry.UIRouter.OpenUIAsync(UIFormType.DisplayItemInfoForm, rawData).Forget();
|
||||
GameEntry.UIRouter.OpenUIAsync(UIFormType.ItemTooltipForm, rawData).Forget();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user