Skip to content

Commit

Permalink
fix(audio): fix weapon group audio not loading
Browse files Browse the repository at this point in the history
  • Loading branch information
MontagueM committed Aug 14, 2023
1 parent 2e2e01f commit a3f2ae9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Charm/MainMenuView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

<StackPanel Grid.Column="2" Margin="10,0,0,0">
<TextBlock Text="Audio" FontSize="64" HorizontalAlignment="Center" Padding="0,0,0,50"/>
<Button Height="75" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Click="WeaponAudioViewButton_Click" Margin="20,0,20,40" Padding="20, 20, 20, 20" Style="{StaticResource MaterialDesignPaperDarkButton}">
<Button Height="75" x:Name="WeaponAudioButton" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Click="WeaponAudioViewButton_Click" Margin="20,0,20,40" Padding="20, 20, 20, 20" Style="{StaticResource MaterialDesignPaperDarkButton}">
<TextBlock Text="WEAPONS" VerticalAlignment="Center" FontSize="42" FontFamily="{DynamicResource ResourceKey=Neue Haas Grotesk Text Pro 55 Roman}" HorizontalAlignment="Center" Padding="0,10,0,10"/>
</Button>
<Button Height="75" HorizontalAlignment="Stretch" HorizontalContentAlignment="Stretch" Click="AllAudioViewButton_OnClick" Margin="20,0,20,40" Padding="20, 20, 20, 20" Style="{StaticResource MaterialDesignPaperDarkButton}">
Expand Down
9 changes: 8 additions & 1 deletion Charm/MainMenuView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,22 @@ public MainMenuView()

ApiButton.IsEnabled = ShowWQButtons(Strategy.CurrentStrategy);
BagsButton.IsEnabled = ShowWQButtons(Strategy.CurrentStrategy);
WeaponAudioButton.IsEnabled = ShowWQButtons(Strategy.CurrentStrategy);

Strategy.OnStrategyChangedEvent += delegate (StrategyEventArgs args)
{
Dispatcher.Invoke(() =>
{
ApiButton.IsEnabled = ShowWQButtons(args.Strategy);
BagsButton.IsEnabled = ShowWQButtons(args.Strategy);
WeaponAudioButton.IsEnabled = ShowWQButtons(args.Strategy);
});
};
}

private bool ShowWQButtons(TigerStrategy strategy)
{
return strategy >= TigerStrategy.DESTINY2_WITCHQUEEN_6307;
return strategy > TigerStrategy.DESTINY2_SHADOWKEEP_2999;
}

private void OnControlLoaded(object sender, RoutedEventArgs routedEventArgs)
Expand Down Expand Up @@ -93,6 +95,11 @@ private void AllStaticsViewButton_OnClick(object sender, RoutedEventArgs e)

private void WeaponAudioViewButton_Click(object sender, RoutedEventArgs e)
{
// todo actually make this show the progress bar, cba rn
MainWindow.Progress.SetProgressStages(new() { "Start investment system" });
Investment.LazyInit();
MainWindow.Progress.CompleteStage();

TagListViewerView tagListView = new TagListViewerView();
tagListView.LoadContent(ETagListType.WeaponAudioGroupList);
_mainWindow.MakeNewTab("weapon audio", tagListView);
Expand Down

0 comments on commit a3f2ae9

Please sign in to comment.