Skip to content

Commit

Permalink
feat: show minions top bar before and during hero picking
Browse files Browse the repository at this point in the history
  • Loading branch information
KelvinCS committed Oct 26, 2023
1 parent 86b7f0f commit f111401
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
9 changes: 5 additions & 4 deletions Hearthstone Deck Tracker/GameEventHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -521,7 +521,7 @@ public void HandleGameStart(DateTime timestamp)

if(_game.IsBattlegroundsMatch && _game.CurrentGameMode == GameMode.Spectator)
{
Core.Overlay.ShowBgsTopBar();
Core.Overlay.ShowBgsTopBarAndBobsBuddyPanel();
Core.Overlay.ShowBattlegroundsSession(true);
}
if(_game.IsFriendlyMatch)
Expand Down Expand Up @@ -1072,6 +1072,7 @@ private async void HandleConstructedStart()

private async void HandleBattlegroundsStart()
{
Core.Overlay.ShowBgsTopBar();
if(Config.Instance.ShowBattlegroundsToast)
{
for(var i = 0; i < 10; i++)
Expand All @@ -1083,7 +1084,7 @@ private async void HandleBattlegroundsStart()
await Task.Delay(500);
if(_game.GameEntity?.GetTag(STEP) != (int)Step.BEGIN_MULLIGAN)
{
Core.Overlay.ShowBgsTopBar();
Core.Overlay.ShowBgsTopBarAndBobsBuddyPanel();
break;
}

Expand All @@ -1097,7 +1098,7 @@ private async void HandleBattlegroundsStart()
var mmr = Core.Game.BattlegroundsRatingInfo?.Rating;
var anomalyDbfId = BattlegroundsUtils.GetBattlegroundsAnomalyDbfId(Core.Game.GameEntity);
ToastManager.ShowBattlegroundsToast(heroIds, mmr, anomalyDbfId);
Core.Overlay.ShowBgsTopBar();
Core.Overlay.ShowBgsTopBarAndBobsBuddyPanel();
}
else
{
Expand All @@ -1111,7 +1112,7 @@ private async void HandleBattlegroundsStart()
}
}
else
Core.Overlay.ShowBgsTopBar();
Core.Overlay.ShowBgsTopBarAndBobsBuddyPanel();
OpponentDeadForTracker.ResetOpponentDeadForTracker();
Core.Overlay.ShowBattlegroundsSession(true);
}
Expand Down
7 changes: 6 additions & 1 deletion Hearthstone Deck Tracker/Windows/OverlayWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ public OverlayWindow(GameV2 game)
GetScaling = () => AutoScaling,
AnchorSide = Side.Bottom,
HideCallback = () => {
ShowBgsTopBar();
ShowBgsTopBarAndBobsBuddyPanel();
},
EntranceAnimation = AnimationType.Slide,
ExitAnimation = AnimationType.Slide,
Expand Down Expand Up @@ -462,6 +462,11 @@ internal void ShowBgsTopBar()
BattlegroundsMinionsPanel.Visibility = Config.Instance.ShowBattlegroundsTiers ? Visible : Collapsed;

_bgsTopBarBehavior.Show();
}

internal void ShowBgsTopBarAndBobsBuddyPanel()
{
ShowBgsTopBar();
ShowBobsBuddyPanel();
}

Expand Down

0 comments on commit f111401

Please sign in to comment.