Add a DisableDropSound indicator.
This commit is contained in:
parent
dce0af7fd6
commit
72b874e7d5
31
Filtration/Converters/DisabledDefaultSoundConverter.cs
Normal file
31
Filtration/Converters/DisabledDefaultSoundConverter.cs
Normal file
@ -0,0 +1,31 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Windows.Data;
|
||||
using System.Windows.Media.Imaging;
|
||||
|
||||
namespace Filtration.Converters
|
||||
{
|
||||
public class DisabledDefaultSoundConverter : IValueConverter
|
||||
{
|
||||
private static readonly BitmapImage _soundIcon;
|
||||
private static readonly BitmapImage _soundDDSIcon;
|
||||
|
||||
static DisabledDefaultSoundConverter()
|
||||
{
|
||||
var soundUri = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/sound.png", UriKind.Absolute);
|
||||
var soundDDSUri = new Uri("pack://application:,,,/Filtration;component/Resources/Icons/sound_dds.png", UriKind.Absolute);
|
||||
_soundIcon = new BitmapImage(soundUri);
|
||||
_soundDDSIcon = new BitmapImage(soundDDSUri);
|
||||
}
|
||||
|
||||
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return (bool)value ? _soundDDSIcon : _soundIcon;
|
||||
}
|
||||
|
||||
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
|
||||
{
|
||||
return ReferenceEquals(value, _soundDDSIcon);
|
||||
}
|
||||
}
|
||||
}
|
@ -210,6 +210,7 @@
|
||||
<Compile Include="Converters\BooleanToBlockActionInverseConverter.cs" />
|
||||
<Compile Include="Converters\BooleanToBlockActionConverter.cs" />
|
||||
<Compile Include="Converters\BlockItemToRemoveEnabledVisibilityConverter.cs" />
|
||||
<Compile Include="Converters\DisabledDefaultSoundConverter.cs" />
|
||||
<Compile Include="Converters\MinimapIconToCroppedBitmapConverter.cs" />
|
||||
<Compile Include="Converters\HashSignRemovalConverter.cs" />
|
||||
<Compile Include="Converters\ItemRarityConverter.cs" />
|
||||
@ -460,6 +461,7 @@
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<Resource Include="Resources\Icons\sound_dds.png" />
|
||||
<EmbeddedResource Include="Resources\Prophecies.txt" />
|
||||
<EmbeddedResource Include="Resources\ItemMods.txt" />
|
||||
<Resource Include="Resources\loading_spinner.gif" />
|
||||
@ -504,7 +506,7 @@
|
||||
<Resource Include="Resources\Icons\open_icon.png" />
|
||||
<Resource Include="Resources\Icons\arrow_down_large_icon.png" />
|
||||
<Resource Include="Resources\Icons\arrow_up_large_icon.png" />
|
||||
<Resource Include="Resources\Icons\speaker_icon.png" />
|
||||
<Resource Include="Resources\Icons\sound.png" />
|
||||
<Resource Include="Resources\Icons\play_icon.png" />
|
||||
<Resource Include="Resources\Icons\arrow_top_icon.png" />
|
||||
<Resource Include="Resources\Icons\arrow_bottom_icon.png" />
|
||||
|
BIN
Filtration/Resources/Icons/sound.png
Normal file
BIN
Filtration/Resources/Icons/sound.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.4 KiB |
BIN
Filtration/Resources/Icons/sound_dds.png
Normal file
BIN
Filtration/Resources/Icons/sound_dds.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.7 KiB |
@ -150,6 +150,7 @@ namespace Filtration.ViewModels.DesignTime
|
||||
public bool HasSound { get; }
|
||||
public bool HasPositionalSound { get; }
|
||||
public bool HasCustomSound { get; }
|
||||
public bool HasDisabledDefaultSound { get; }
|
||||
public bool HasAudioVisualBlockItems { get; }
|
||||
public void RefreshBlockPreview()
|
||||
{
|
||||
|
@ -65,6 +65,7 @@ namespace Filtration.ViewModels
|
||||
bool HasSound { get; }
|
||||
bool HasPositionalSound { get; }
|
||||
bool HasCustomSound { get; }
|
||||
bool HasDisabledDefaultSound { get; }
|
||||
bool HasAudioVisualBlockItems { get; }
|
||||
void RefreshBlockPreview();
|
||||
}
|
||||
@ -287,6 +288,7 @@ namespace Filtration.ViewModels
|
||||
public bool HasSound => Block.HasBlockItemOfType<SoundBlockItem>();
|
||||
public bool HasPositionalSound => Block.HasBlockItemOfType<PositionalSoundBlockItem>();
|
||||
public bool HasCustomSound => Block.HasBlockItemOfType<CustomSoundBlockItem>();
|
||||
public bool HasDisabledDefaultSound => Block.HasBlockItemOfType<DisableDropSoundBlockItem>();
|
||||
|
||||
public bool HasAudioVisualBlockItems => AudioVisualBlockItems.Any();
|
||||
|
||||
@ -526,6 +528,7 @@ namespace Filtration.ViewModels
|
||||
RaisePropertyChanged(nameof(HasSound));
|
||||
RaisePropertyChanged(nameof(HasPositionalSound));
|
||||
RaisePropertyChanged(nameof(HasCustomSound));
|
||||
RaisePropertyChanged(nameof(HasDisabledDefaultSound));
|
||||
}
|
||||
|
||||
private void OnBlockItemsCollectionChanged(object sender, NotifyCollectionChangedEventArgs e)
|
||||
|
@ -11,7 +11,6 @@
|
||||
<Image Source="/Filtration;component/Resources/Icons/arrow_up_large_icon.png" x:Key="MoveUpIcon" x:Shared="false" />
|
||||
<Image Source="/Filtration;component/Resources/Icons/arrow_bottom_icon.png" x:Key="MoveToBottomIcon" x:Shared="false" />
|
||||
<Image Source="/Filtration;component/Resources/Icons/arrow_down_large_icon.png" x:Key="MoveDownIcon" x:Shared="false" />
|
||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" x:Key="SpeakerIcon" x:Shared="false" />
|
||||
<Image Source="/Filtration;component/Resources/Icons/play_icon.png" x:Key="PlayIcon" x:Shared="false" />
|
||||
<Image Source="/Filtration;component/Resources/Icons/about_icon.png" x:Key="AboutIcon" x:Shared="false" />
|
||||
<Image Source="/Filtration;component/Resources/Icons/ReplaceColors.ico" x:Key="ReplaceColorsIcon" x:Shared="false" />
|
||||
@ -37,4 +36,4 @@
|
||||
<Image Source="/Filtration;component/Resources/Icons/standby_disabled_icon.png" x:Key="StandbyDisabledIcon" x:Shared="False" />
|
||||
<Image Source="/Filtration;component/Resources/Icons/standby_enabled_icon.png" x:Key="EnableDropSoundsIcon" x:Shared="False" />
|
||||
<Image Source="/Filtration;component/Resources/Icons/standby_disabled_icon.png" x:Key="DisableDropSoundsIcon" x:Shared="False" />
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<UserControl x:Class="Filtration.Views.ItemFilterBlockView"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:userControls="clr-namespace:Filtration.UserControls"
|
||||
xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
|
||||
@ -10,7 +10,7 @@
|
||||
xmlns:blockItemBaseTypes="clr-namespace:Filtration.ObjectModel.BlockItemBaseTypes;assembly=Filtration.ObjectModel"
|
||||
xmlns:componentModel="clr-namespace:System.ComponentModel;assembly=WindowsBase"
|
||||
xmlns:designTime="clr-namespace:Filtration.ViewModels.DesignTime"
|
||||
mc:Ignorable="d"
|
||||
mc:Ignorable="d"
|
||||
d:DataContext="{d:DesignInstance Type=designTime:DesignTimeItemFilterBlockViewModel, IsDesignTimeCreatable=True}"
|
||||
d:DesignHeight="400" d:DesignWidth="817">
|
||||
<UserControl.Resources>
|
||||
@ -18,6 +18,7 @@
|
||||
<views:BindingProxy x:Key="Proxy" Data="{Binding}" />
|
||||
<converters:BlockGroupAdvancedFillColorConverter x:Key="BlockGroupAdvancedFillColorConverter" />
|
||||
<converters:MinimapIconToCroppedBitmapConverter x:Key="MinimapIconToCroppedBitmapConverter"/>
|
||||
<converters:DisabledDefaultSoundConverter x:Key="DisabledDefaultSoundConverter"/>
|
||||
<Style TargetType="{x:Type ContentPresenter}" x:Key="BlockItemFadeInStyle">
|
||||
<Setter Property="LayoutTransform">
|
||||
<Setter.Value>
|
||||
@ -130,16 +131,16 @@
|
||||
<WrapPanel Grid.Row="0" Grid.Column="2" VerticalAlignment="Center">
|
||||
<Image Height="40" Width="40" Margin="0,0,10,0" Stretch="Fill">
|
||||
<Image.Source>
|
||||
<MultiBinding Converter="{StaticResource MinimapIconToCroppedBitmapConverter}">
|
||||
<Binding Path="DisplayIconSize"/>
|
||||
<Binding Path="DisplayIconColor"/>
|
||||
<Binding Path="DisplayIconShape"/>
|
||||
<MultiBinding Converter="{StaticResource MinimapIconToCroppedBitmapConverter}">
|
||||
<Binding Path="DisplayIconSize"/>
|
||||
<Binding Path="DisplayIconColor"/>
|
||||
<Binding Path="DisplayIconShape"/>
|
||||
</MultiBinding>
|
||||
</Image.Source>
|
||||
</Image>
|
||||
<Button Command="{Binding PlaySoundCommand}"
|
||||
Width="25"
|
||||
Height="25"
|
||||
Width="32"
|
||||
Height="32"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,0,3,0"
|
||||
@ -147,11 +148,11 @@
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
ToolTip="Click to preview drop sound">
|
||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
<Image Source="{Binding HasDisabledDefaultSound, Converter={StaticResource DisabledDefaultSoundConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Command="{Binding PlayPositionalSoundCommand}"
|
||||
Width="25"
|
||||
Height="25"
|
||||
Width="32"
|
||||
Height="32"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,0,3,0"
|
||||
@ -159,11 +160,11 @@
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
ToolTip="Click to preview positional drop sound">
|
||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
<Image Source="{Binding HasDisabledDefaultSound, Converter={StaticResource DisabledDefaultSoundConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
<Button Command="{Binding PlayCustomSoundCommand}"
|
||||
Width="25"
|
||||
Height="25"
|
||||
Width="32"
|
||||
Height="32"
|
||||
VerticalAlignment="Center"
|
||||
HorizontalAlignment="Center"
|
||||
Margin="0,0,3,0"
|
||||
@ -171,7 +172,7 @@
|
||||
Background="Transparent"
|
||||
BorderBrush="Transparent"
|
||||
ToolTip="Click to preview custom drop sound">
|
||||
<Image Source="/Filtration;component/Resources/Icons/speaker_icon.png" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
<Image Source="{Binding HasDisabledDefaultSound, Converter={StaticResource DisabledDefaultSoundConverter}}" VerticalAlignment="Center" HorizontalAlignment="Center" />
|
||||
</Button>
|
||||
<Line Y1="5" Y2="38" StrokeThickness="2" Panel.ZIndex="999"
|
||||
Stroke="{Binding DisplayEffectColor, Converter={StaticResource ColorToSolidColorBrushConverter}, Mode=OneWay}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user