Skip to content

Commit

Permalink
Updated cursor for Game Card (#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Aug 23, 2023
1 parent c86d160 commit c808512
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Gavilya/Components/GameCardComponent.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,18 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:Gavilya.Components" xmlns:lang="clr-namespace:Gavilya.Properties"
mc:Ignorable="d" Margin="5" FontFamily="../Fonts/#Hauora" xmlns:i="http://schemas.microsoft.com/xaml/behaviors"
Height="144" Width="256">
Height="144" Width="256" Cursor="Hand">
<i:Interaction.Triggers>
<i:EventTrigger EventName="MouseEnter">
<i:InvokeCommandAction Command="{Binding MouseHoverCommand}" />
</i:EventTrigger>
<i:EventTrigger EventName="MouseLeave">
<i:InvokeCommandAction Command="{Binding MouseHoverCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<i:EventTrigger EventName="MouseLeftButtonUp">
<i:InvokeCommandAction Command="{Binding ClickCommand}" />
</i:EventTrigger>
</i:Interaction.Triggers>
<Border BorderThickness="0" CornerRadius="5">
<Border.Background>
<ImageBrush x:Name="GameIcon" ImageSource="{Binding CoverFilePath}" Stretch="UniformToFill"></ImageBrush>
Expand All @@ -39,13 +42,13 @@
<ToolTip Content="{x:Static lang:Resources.FavoriteButton}" Background="{DynamicResource Background}" Foreground="{DynamicResource Foreground}" />
</Button.ToolTip>
</Button>
<Button Command="{Binding EditCommand}" Visibility="{Binding MouseHoverVis}" Name="EditBtn" Cursor="Hand" Style="{DynamicResource EditButton}" Content="&#xF3DE;" Foreground="{DynamicResource HoverForeground}" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Height="20" Width="20" Background="Transparent" VerticalAlignment="Center" Grid.Column="3" FontSize="15" Margin="0,5,5,0">
<Button Command="{Binding EditCommand}" Visibility="{Binding MouseHoverVis}" Name="EditBtn" Cursor="Hand" Style="{DynamicResource EditButton}" Content="&#xF3DE;" Foreground="{DynamicResource HoverForeground}" FontFamily="..\Fonts\#FluentSystemIcons-Regular" Height="20" Width="20" Background="Transparent" VerticalAlignment="Center" Grid.Column="3" FontSize="15" Margin="0,5,5,0">
<Button.ToolTip>
<ToolTip Content="{x:Static lang:Resources.EditGame}" Background="{DynamicResource Background}" Foreground="{DynamicResource Foreground}" />
</Button.ToolTip>
</Button>

<Grid Visibility="{Binding MouseHoverVis}" Background="{DynamicResource GameCardGradient2}" VerticalAlignment="Bottom" Grid.Row="1" x:Name="InfoGrid" Grid.Column="0" Grid.ColumnSpan="6">
<Grid Visibility="{Binding MouseHoverVis}" Background="{DynamicResource GameCardGradient2}" VerticalAlignment="Bottom" Grid.Row="1" x:Name="InfoGrid" Grid.Column="0" Grid.ColumnSpan="6">


<Grid.ColumnDefinitions>
Expand Down
1 change: 1 addition & 0 deletions Gavilya/ViewModels/GameCardViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ public bool IsHidden

public ICommand PlayCommand { get; }
public ICommand EditCommand { get; }
public ICommand ClickCommand { get; }

public GameCardViewModel(Game game, MainViewModel mainViewModel)
{
Expand Down

0 comments on commit c808512

Please sign in to comment.