mirror of
https://github.com/wabbajack-tools/wabbajack.git
synced 2024-08-30 18:42:17 +00:00
Actually make the recently compiled modlists section work, overhaul card view of compiled lists
This commit is contained in:
parent
e2106a0c14
commit
1e61bcaf45
156
;
156
;
@ -1,12 +1,144 @@
|
|||||||
using System.Windows.Input;
|
<rxui:ReactiveUserControl
|
||||||
using Wabbajack.Messages;
|
x:Class="Wabbajack.CreatedModListTileView"
|
||||||
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
namespace Wabbajack.App.Wpf.Models.NavigationItems
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
{
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
public interface INavigationItem
|
xmlns:iconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
|
||||||
{
|
xmlns:local="clr-namespace:Wabbajack"
|
||||||
public ICommand GoToCommand { get; }
|
xmlns:mahapps="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
|
||||||
public NavigateToGlobal.ScreenType Screen { get; }
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
public bool MainMenuItem { get; }
|
xmlns:rxui="http://reactiveui.net"
|
||||||
}
|
d:DesignHeight="450"
|
||||||
}
|
d:DesignWidth="800"
|
||||||
|
x:TypeArguments="local:CreatedModlistVM"
|
||||||
|
mc:Ignorable="d">
|
||||||
|
<Grid Margin="10, 0, 10, 16" x:Name="CompiledModListTile">
|
||||||
|
<Border Name="BorderMask2" CornerRadius="10" BorderThickness="0" Background="White" Margin="1" />
|
||||||
|
<StackPanel Orientation="Vertical" Background="{StaticResource DarkBackgroundBrush}">
|
||||||
|
<StackPanel.Effect>
|
||||||
|
<DropShadowEffect BlurRadius="25" Opacity="0.25" ShadowDepth="3" />
|
||||||
|
</StackPanel.Effect>
|
||||||
|
<StackPanel.OpacityMask>
|
||||||
|
<VisualBrush Visual="{Binding ElementName=BorderMask2}"/>
|
||||||
|
</StackPanel.OpacityMask>
|
||||||
|
<Grid>
|
||||||
|
<Grid.RowDefinitions>
|
||||||
|
<RowDefinition Height="*"/>
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
<RowDefinition Height="Auto" />
|
||||||
|
</Grid.RowDefinitions>
|
||||||
|
<Border Background="Transparent" BorderThickness="0">
|
||||||
|
<Border.Style>
|
||||||
|
<Style TargetType="Border">
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}" />
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
||||||
|
<Setter Property="BorderBrush" Value="{StaticResource BorderInterestBrush}" />
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Border.Style>
|
||||||
|
<Grid>
|
||||||
|
<Border x:Name="MaskBorder" BorderThickness="0" BorderBrush="Transparent" Background="{StaticResource DarkSecondaryBrush}" Width="300" Height="169"/>
|
||||||
|
<Grid Width="300" Height="169" Background="Transparent" ClipToBounds="True">
|
||||||
|
<Grid.OpacityMask>
|
||||||
|
<VisualBrush Visual="{Binding ElementName=MaskBorder}"/>
|
||||||
|
</Grid.OpacityMask>
|
||||||
|
<Grid ClipToBounds="True">
|
||||||
|
<mahapps:ProgressRing x:Name="LoadingProgress" />
|
||||||
|
<Border BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
|
<Border.Background>
|
||||||
|
<ImageBrush x:Name="ModlistImage" Stretch="UniformToFill"/>
|
||||||
|
</Border.Background>
|
||||||
|
</Border>
|
||||||
|
<Rectangle Height="120" Margin="-80, -75, -80, 0" VerticalAlignment="Top" Fill="White" Opacity="0.15">
|
||||||
|
<Rectangle.Effect>
|
||||||
|
<BlurEffect Radius="100" />
|
||||||
|
</Rectangle.Effect>
|
||||||
|
<Rectangle.Style>
|
||||||
|
<Style TargetType="Rectangle">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
||||||
|
<DataTrigger.EnterActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.3" Duration="0:0:0.08" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</DataTrigger.EnterActions>
|
||||||
|
<DataTrigger.ExitActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.15" Duration="0:0:0.08" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</DataTrigger.ExitActions>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Rectangle.Style>
|
||||||
|
</Rectangle>
|
||||||
|
<Rectangle Height="120" Margin="-80, 0, -80, -75" VerticalAlignment="Bottom" Fill="Black" Opacity="0.4">
|
||||||
|
<Rectangle.Effect>
|
||||||
|
<BlurEffect Radius="100" />
|
||||||
|
</Rectangle.Effect>
|
||||||
|
<Rectangle.Style>
|
||||||
|
<Style TargetType="Rectangle">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
||||||
|
<DataTrigger.EnterActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation
|
||||||
|
Storyboard.TargetProperty="Opacity"
|
||||||
|
To="0.7"
|
||||||
|
Duration="0:0:0.08" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</DataTrigger.EnterActions>
|
||||||
|
<DataTrigger.ExitActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.4" Duration="0:0:0.08" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</DataTrigger.ExitActions>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Rectangle.Style>
|
||||||
|
</Rectangle>
|
||||||
|
<Label Margin="10,242,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Content="{Binding CompilerSettings.Version}" Opacity="0">
|
||||||
|
<Label.Style>
|
||||||
|
<Style TargetType="Label">
|
||||||
|
<Style.Triggers>
|
||||||
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
||||||
|
<DataTrigger.EnterActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.08" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</DataTrigger.EnterActions>
|
||||||
|
<DataTrigger.ExitActions>
|
||||||
|
<BeginStoryboard>
|
||||||
|
<Storyboard>
|
||||||
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.08" />
|
||||||
|
</Storyboard>
|
||||||
|
</BeginStoryboard>
|
||||||
|
</DataTrigger.ExitActions>
|
||||||
|
</DataTrigger>
|
||||||
|
</Style.Triggers>
|
||||||
|
</Style>
|
||||||
|
</Label.Style>
|
||||||
|
</Label>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Grid>
|
||||||
|
</Border>
|
||||||
|
</Grid>
|
||||||
|
<TextBlock FontSize="20" Text="{Binding CompilerSettings.ModListName}" Margin="10, 10, 10, 0"/>
|
||||||
|
<TextBlock Text="{Binding CompilerSettings.Source}" FontSize="14" Opacity="0.5" Margin="10, 10, 10, 10"/>
|
||||||
|
</StackPanel>
|
||||||
|
</Grid>
|
||||||
|
</rxui:ReactiveUserControl>
|
||||||
|
18
Wabbajack.App.Wpf/Messages/LoadModlistForCompiling.cs
Normal file
18
Wabbajack.App.Wpf/Messages/LoadModlistForCompiling.cs
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
using ReactiveUI;
|
||||||
|
using Wabbajack.Compiler;
|
||||||
|
|
||||||
|
namespace Wabbajack.Messages;
|
||||||
|
|
||||||
|
public class LoadModlistForCompiling
|
||||||
|
{
|
||||||
|
public CompilerSettings CompilerSettings { get; set; }
|
||||||
|
public LoadModlistForCompiling(CompilerSettings cs)
|
||||||
|
{
|
||||||
|
CompilerSettings = cs;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void Send(CompilerSettings cs)
|
||||||
|
{
|
||||||
|
MessageBus.Current.SendMessage(new LoadModlistForCompiling(cs));
|
||||||
|
}
|
||||||
|
}
|
@ -114,6 +114,10 @@ namespace Wabbajack
|
|||||||
_inferencer = inferencer;
|
_inferencer = inferencer;
|
||||||
_wjClient = wjClient;
|
_wjClient = wjClient;
|
||||||
|
|
||||||
|
MessageBus.Current.Listen<LoadModlistForCompiling>()
|
||||||
|
.Subscribe(msg => LoadCompilerSettings(msg.CompilerSettings))
|
||||||
|
.DisposeWith(CompositeDisposable);
|
||||||
|
|
||||||
StatusText = "Compiler Settings";
|
StatusText = "Compiler Settings";
|
||||||
StatusProgress = Percent.Zero;
|
StatusProgress = Percent.Zero;
|
||||||
|
|
||||||
@ -186,7 +190,7 @@ namespace Wabbajack
|
|||||||
.BindToStrict(this, vm => vm.ErrorState)
|
.BindToStrict(this, vm => vm.ErrorState)
|
||||||
.DisposeWith(disposables);
|
.DisposeWith(disposables);
|
||||||
|
|
||||||
LoadLastSavedSettings().FireAndForget();
|
//LoadLastSavedSettings().FireAndForget();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -240,6 +244,16 @@ namespace Wabbajack
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
LoadCompilerSettings(settings);
|
||||||
|
|
||||||
|
if (path.FileName == "modlist.txt".ToRelativePath())
|
||||||
|
{
|
||||||
|
await LoadLastSavedSettings();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void LoadCompilerSettings(CompilerSettings settings)
|
||||||
|
{
|
||||||
BaseGame = settings.Game;
|
BaseGame = settings.Game;
|
||||||
ModListName = settings.ModListName;
|
ModListName = settings.ModListName;
|
||||||
Version = settings.Version?.ToString() ?? "";
|
Version = settings.Version?.ToString() ?? "";
|
||||||
@ -263,13 +277,8 @@ namespace Wabbajack
|
|||||||
NoMatchInclude = settings.NoMatchInclude;
|
NoMatchInclude = settings.NoMatchInclude;
|
||||||
Include = settings.Include;
|
Include = settings.Include;
|
||||||
Ignore = settings.Ignore;
|
Ignore = settings.Ignore;
|
||||||
if (path.FileName == "modlist.txt".ToRelativePath())
|
|
||||||
{
|
|
||||||
await LoadLastSavedSettings();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private async Task StartCompilation()
|
private async Task StartCompilation()
|
||||||
{
|
{
|
||||||
var tsk = Task.Run(async () =>
|
var tsk = Task.Run(async () =>
|
||||||
@ -399,7 +408,6 @@ namespace Wabbajack
|
|||||||
ModlistLocation.TargetPath = lastPath;
|
ModlistLocation.TargetPath = lastPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private CompilerSettings GetSettings()
|
private CompilerSettings GetSettings()
|
||||||
{
|
{
|
||||||
|
|
||||||
|
@ -1,17 +1,18 @@
|
|||||||
using System.Linq;
|
using System.Windows.Input;
|
||||||
using System.Threading;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
|
using ReactiveUI;
|
||||||
using ReactiveUI.Fody.Helpers;
|
using ReactiveUI.Fody.Helpers;
|
||||||
using Wabbajack.Compiler;
|
using Wabbajack.Compiler;
|
||||||
using Wabbajack.DTOs;
|
using Wabbajack.Messages;
|
||||||
using Wabbajack.Networking.WabbajackClientApi;
|
using Wabbajack.Models;
|
||||||
using Wabbajack.Services.OSIntegrated.Services;
|
|
||||||
|
|
||||||
namespace Wabbajack
|
namespace Wabbajack
|
||||||
{
|
{
|
||||||
public class CreatedModlistVM
|
public class CreatedModlistVM
|
||||||
{
|
{
|
||||||
private ILogger _logger;
|
private ILogger _logger;
|
||||||
|
public LoadingLock LoadingImageLock { get; } = new();
|
||||||
|
public ICommand CompileModListCommand { get; set; }
|
||||||
[Reactive]
|
[Reactive]
|
||||||
public CompilerSettings CompilerSettings { get; set; }
|
public CompilerSettings CompilerSettings { get; set; }
|
||||||
|
|
||||||
@ -19,6 +20,14 @@ namespace Wabbajack
|
|||||||
{
|
{
|
||||||
_logger = logger;
|
_logger = logger;
|
||||||
CompilerSettings = compilerSettings;
|
CompilerSettings = compilerSettings;
|
||||||
|
CompileModListCommand = ReactiveCommand.Create(CompileModList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CompileModList()
|
||||||
|
{
|
||||||
|
_logger.LogInformation($"Selected modlist {CompilerSettings.ModListName} for compilation, located in '{CompilerSettings.Source}'");
|
||||||
|
NavigateToGlobal.Send(ScreenType.Compiler);
|
||||||
|
LoadModlistForCompiling.Send(CompilerSettings);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
<Style TargetType="Border">
|
<Style TargetType="Border">
|
||||||
<Setter Property="Opacity" Value="0.5" />
|
<Setter Property="Opacity" Value="0.5" />
|
||||||
<Style.Triggers>
|
<Style.Triggers>
|
||||||
<DataTrigger Binding="{Binding IsMouseOver, ElementName=BeginButton}" Value="True">
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=BeginButtonPurpleGlow}" Value="True">
|
||||||
<Setter Property="Opacity" Value="0.8" />
|
<Setter Property="Opacity" Value="0.8" />
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
|
@ -12,209 +12,133 @@
|
|||||||
d:DesignWidth="800"
|
d:DesignWidth="800"
|
||||||
x:TypeArguments="local:CreatedModlistVM"
|
x:TypeArguments="local:CreatedModlistVM"
|
||||||
mc:Ignorable="d">
|
mc:Ignorable="d">
|
||||||
<UserControl.Resources>
|
<Grid Margin="10, 0, 10, 16" x:Name="CompiledModListTile">
|
||||||
<Color x:Key="TextBackgroundFill">#92000000</Color>
|
<Border Name="BorderMask2" CornerRadius="10" BorderThickness="0" Background="White" Margin="1" />
|
||||||
<SolidColorBrush x:Key="TextBackgroundFillBrush" Color="{StaticResource TextBackgroundFill}" />
|
<StackPanel Orientation="Vertical" Background="{StaticResource DarkBackgroundBrush}">
|
||||||
<Color x:Key="TextBackgroundHoverFill">#DF000000</Color>
|
<StackPanel.Effect>
|
||||||
<Style x:Key="BackgroundBlurStyle" TargetType="TextBlock">
|
<DropShadowEffect BlurRadius="25" Opacity="0.25" ShadowDepth="3" />
|
||||||
<Setter Property="Background" Value="{StaticResource TextBackgroundFillBrush}" />
|
</StackPanel.Effect>
|
||||||
<Setter Property="Foreground" Value="Transparent" />
|
<StackPanel.OpacityMask>
|
||||||
<Setter Property="Visibility" Value="Visible" />
|
<VisualBrush Visual="{Binding ElementName=BorderMask2}"/>
|
||||||
<Style.Triggers>
|
</StackPanel.OpacityMask>
|
||||||
<DataTrigger Binding="{Binding IsMouseOver, RelativeSource={RelativeSource AncestorType={x:Type Button}}}" Value="True">
|
|
||||||
<DataTrigger.EnterActions>
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<ColorAnimation
|
|
||||||
Storyboard.TargetProperty="(TextBlock.Background).(SolidColorBrush.Color)"
|
|
||||||
To="{StaticResource TextBackgroundHoverFill}"
|
|
||||||
Duration="0:0:0.06" />
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</DataTrigger.EnterActions>
|
|
||||||
<DataTrigger.ExitActions>
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<ColorAnimation
|
|
||||||
Storyboard.TargetProperty="(TextBlock.Background).(SolidColorBrush.Color)"
|
|
||||||
To="{StaticResource TextBackgroundFill}"
|
|
||||||
Duration="0:0:0.06" />
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</DataTrigger.ExitActions>
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</UserControl.Resources>
|
|
||||||
<Border BorderThickness="0" CornerRadius="6" Background="{StaticResource DarkPrimaryBrush}" Margin="10, 0, 10, 20">
|
|
||||||
<Grid>
|
|
||||||
<Grid.RowDefinitions>
|
|
||||||
<RowDefinition Height="*"/>
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
<RowDefinition Height="Auto" />
|
|
||||||
</Grid.RowDefinitions>
|
|
||||||
<Border
|
|
||||||
x:Name="CompiledModListTile"
|
|
||||||
Margin="10, 0, 10, 16"
|
|
||||||
Background="Transparent"
|
|
||||||
BorderThickness="0">
|
|
||||||
<Border.Effect>
|
|
||||||
<DropShadowEffect
|
|
||||||
BlurRadius="25"
|
|
||||||
Opacity="0.25"
|
|
||||||
ShadowDepth="3" />
|
|
||||||
</Border.Effect>
|
|
||||||
<Border.Style>
|
|
||||||
<Style TargetType="Border">
|
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}" />
|
|
||||||
<Style.Triggers>
|
|
||||||
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
|
||||||
<Setter Property="BorderBrush" Value="{StaticResource BorderInterestBrush}" />
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Border.Style>
|
|
||||||
<Grid>
|
<Grid>
|
||||||
<Border x:Name="MaskBorder" BorderThickness="0" BorderBrush="Transparent" Background="{StaticResource DarkSecondaryBrush}" CornerRadius="10" Width="300" Height="169"/>
|
<Grid.RowDefinitions>
|
||||||
<Grid
|
<RowDefinition Height="*"/>
|
||||||
Width="300"
|
<RowDefinition Height="Auto" />
|
||||||
Height="169"
|
<RowDefinition Height="Auto" />
|
||||||
Background="Transparent" ClipToBounds="True">
|
</Grid.RowDefinitions>
|
||||||
<Grid.OpacityMask>
|
<Border Background="Transparent" BorderThickness="0">
|
||||||
<VisualBrush Visual="{Binding ElementName=MaskBorder}"/>
|
<Border.Style>
|
||||||
</Grid.OpacityMask>
|
<Style TargetType="Border">
|
||||||
<Grid ClipToBounds="True">
|
<Setter Property="BorderBrush" Value="{StaticResource ButtonBorder}" />
|
||||||
<mahapps:ProgressRing x:Name="LoadingProgress" />
|
<Style.Triggers>
|
||||||
<Border
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
||||||
BorderThickness="0"
|
<Setter Property="BorderBrush" Value="{StaticResource BorderInterestBrush}" />
|
||||||
HorizontalAlignment="Stretch"
|
</DataTrigger>
|
||||||
VerticalAlignment="Stretch">
|
</Style.Triggers>
|
||||||
<Border.Background>
|
</Style>
|
||||||
<ImageBrush x:Name="ModlistImage" Stretch="UniformToFill"/>
|
</Border.Style>
|
||||||
</Border.Background>
|
<Grid>
|
||||||
</Border>
|
<Border x:Name="MaskBorder" BorderThickness="0" BorderBrush="Transparent" Background="{StaticResource DarkSecondaryBrush}" Width="300" Height="169"/>
|
||||||
<Rectangle
|
<Grid Width="300" Height="169" Background="Transparent" ClipToBounds="True">
|
||||||
Height="120"
|
<Grid.OpacityMask>
|
||||||
Margin="-80, -75, -80, 0"
|
<VisualBrush Visual="{Binding ElementName=MaskBorder}"/>
|
||||||
VerticalAlignment="Top"
|
</Grid.OpacityMask>
|
||||||
Fill="White"
|
<Grid ClipToBounds="True">
|
||||||
Opacity="0.15">
|
<mahapps:ProgressRing x:Name="LoadingProgress" />
|
||||||
<Rectangle.Effect>
|
<Border BorderThickness="0" HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
|
||||||
<BlurEffect Radius="100" />
|
<Border.Background>
|
||||||
</Rectangle.Effect>
|
<ImageBrush x:Name="ModlistImage" Stretch="UniformToFill"/>
|
||||||
<Rectangle.Style>
|
</Border.Background>
|
||||||
<Style TargetType="Rectangle">
|
</Border>
|
||||||
<Style.Triggers>
|
<Rectangle Height="120" Margin="-80, -75, -80, 0" VerticalAlignment="Top" Fill="White" Opacity="0.15">
|
||||||
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
<Rectangle.Effect>
|
||||||
<DataTrigger.EnterActions>
|
<BlurEffect Radius="100" />
|
||||||
<BeginStoryboard>
|
</Rectangle.Effect>
|
||||||
<Storyboard>
|
<Rectangle.Style>
|
||||||
<DoubleAnimation
|
<Style TargetType="Rectangle">
|
||||||
Storyboard.TargetProperty="Opacity"
|
<Style.Triggers>
|
||||||
To="0.3"
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
||||||
Duration="0:0:0.08" />
|
<DataTrigger.EnterActions>
|
||||||
</Storyboard>
|
<BeginStoryboard>
|
||||||
</BeginStoryboard>
|
<Storyboard>
|
||||||
</DataTrigger.EnterActions>
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.3" Duration="0:0:0.08" />
|
||||||
<DataTrigger.ExitActions>
|
</Storyboard>
|
||||||
<BeginStoryboard>
|
</BeginStoryboard>
|
||||||
<Storyboard>
|
</DataTrigger.EnterActions>
|
||||||
<DoubleAnimation
|
<DataTrigger.ExitActions>
|
||||||
Storyboard.TargetProperty="Opacity"
|
<BeginStoryboard>
|
||||||
To="0.15"
|
<Storyboard>
|
||||||
Duration="0:0:0.08" />
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.15" Duration="0:0:0.08" />
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</BeginStoryboard>
|
</BeginStoryboard>
|
||||||
</DataTrigger.ExitActions>
|
</DataTrigger.ExitActions>
|
||||||
</DataTrigger>
|
</DataTrigger>
|
||||||
</Style.Triggers>
|
</Style.Triggers>
|
||||||
</Style>
|
</Style>
|
||||||
</Rectangle.Style>
|
</Rectangle.Style>
|
||||||
</Rectangle>
|
</Rectangle>
|
||||||
<Rectangle
|
<Rectangle Height="120" Margin="-80, 0, -80, -75" VerticalAlignment="Bottom" Fill="Black" Opacity="0.4">
|
||||||
Height="120"
|
<Rectangle.Effect>
|
||||||
Margin="-80, 0, -80, -75"
|
<BlurEffect Radius="100" />
|
||||||
VerticalAlignment="Bottom"
|
</Rectangle.Effect>
|
||||||
Fill="Black"
|
<Rectangle.Style>
|
||||||
Opacity="0.4">
|
<Style TargetType="Rectangle">
|
||||||
<Rectangle.Effect>
|
<Style.Triggers>
|
||||||
<BlurEffect Radius="100" />
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
||||||
</Rectangle.Effect>
|
<DataTrigger.EnterActions>
|
||||||
<Rectangle.Style>
|
<BeginStoryboard>
|
||||||
<Style TargetType="Rectangle">
|
<Storyboard>
|
||||||
<Style.Triggers>
|
<DoubleAnimation
|
||||||
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
|
||||||
<DataTrigger.EnterActions>
|
|
||||||
<BeginStoryboard>
|
|
||||||
<Storyboard>
|
|
||||||
<DoubleAnimation
|
|
||||||
Storyboard.TargetProperty="Opacity"
|
Storyboard.TargetProperty="Opacity"
|
||||||
To="0.7"
|
To="0.7"
|
||||||
Duration="0:0:0.08" />
|
Duration="0:0:0.08" />
|
||||||
</Storyboard>
|
</Storyboard>
|
||||||
</BeginStoryboard>
|
</BeginStoryboard>
|
||||||
</DataTrigger.EnterActions>
|
</DataTrigger.EnterActions>
|
||||||
<DataTrigger.ExitActions>
|
<DataTrigger.ExitActions>
|
||||||
<BeginStoryboard>
|
<BeginStoryboard>
|
||||||
<Storyboard>
|
<Storyboard>
|
||||||
<DoubleAnimation
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0.4" Duration="0:0:0.08" />
|
||||||
Storyboard.TargetProperty="Opacity"
|
</Storyboard>
|
||||||
To="0.4"
|
</BeginStoryboard>
|
||||||
Duration="0:0:0.08" />
|
</DataTrigger.ExitActions>
|
||||||
</Storyboard>
|
</DataTrigger>
|
||||||
</BeginStoryboard>
|
</Style.Triggers>
|
||||||
</DataTrigger.ExitActions>
|
</Style>
|
||||||
</DataTrigger>
|
</Rectangle.Style>
|
||||||
</Style.Triggers>
|
</Rectangle>
|
||||||
</Style>
|
<Label Margin="10,242,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Content="{Binding CompilerSettings.Version}" Opacity="0">
|
||||||
</Rectangle.Style>
|
<Label.Style>
|
||||||
</Rectangle>
|
<Style TargetType="Label">
|
||||||
<Label
|
<Style.Triggers>
|
||||||
Margin="10,242,0,0"
|
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
||||||
HorizontalAlignment="Left"
|
<DataTrigger.EnterActions>
|
||||||
VerticalAlignment="Top"
|
<BeginStoryboard>
|
||||||
Content="{Binding CompilerSettings.Version}"
|
<Storyboard>
|
||||||
Opacity="0">
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="1" Duration="0:0:0.08" />
|
||||||
<Label.Style>
|
</Storyboard>
|
||||||
<Style TargetType="Label">
|
</BeginStoryboard>
|
||||||
<Style.Triggers>
|
</DataTrigger.EnterActions>
|
||||||
<DataTrigger Binding="{Binding IsMouseOver, ElementName=CompiledModListTile}" Value="True">
|
<DataTrigger.ExitActions>
|
||||||
<DataTrigger.EnterActions>
|
<BeginStoryboard>
|
||||||
<BeginStoryboard>
|
<Storyboard>
|
||||||
<Storyboard>
|
<DoubleAnimation Storyboard.TargetProperty="Opacity" To="0" Duration="0:0:0.08" />
|
||||||
<DoubleAnimation
|
</Storyboard>
|
||||||
Storyboard.TargetProperty="Opacity"
|
</BeginStoryboard>
|
||||||
To="1"
|
</DataTrigger.ExitActions>
|
||||||
Duration="0:0:0.08" />
|
</DataTrigger>
|
||||||
</Storyboard>
|
</Style.Triggers>
|
||||||
</BeginStoryboard>
|
</Style>
|
||||||
</DataTrigger.EnterActions>
|
</Label.Style>
|
||||||
<DataTrigger.ExitActions>
|
</Label>
|
||||||
<BeginStoryboard>
|
</Grid>
|
||||||
<Storyboard>
|
</Grid>
|
||||||
<DoubleAnimation
|
|
||||||
Storyboard.TargetProperty="Opacity"
|
|
||||||
To="0"
|
|
||||||
Duration="0:0:0.08" />
|
|
||||||
</Storyboard>
|
|
||||||
</BeginStoryboard>
|
|
||||||
</DataTrigger.ExitActions>
|
|
||||||
</DataTrigger>
|
|
||||||
</Style.Triggers>
|
|
||||||
</Style>
|
|
||||||
</Label.Style>
|
|
||||||
</Label>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Border>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
<TextBlock FontSize="20" Text="{Binding CompilerSettings.ModListName}" Margin="10, 10, 10, 0"/>
|
||||||
<TextBlock
|
<TextBlock Text="{Binding CompilerSettings.Source}" FontSize="14" Opacity="0.5" Margin="10, 10, 10, 10"/>
|
||||||
Text="{Binding CompilerSettings.ModListName}"
|
</StackPanel>
|
||||||
FontSize="16"
|
|
||||||
VerticalAlignment="Bottom"
|
|
||||||
Margin="10, 0, 0, 10"
|
|
||||||
Panel.ZIndex="1">
|
|
||||||
</TextBlock>
|
|
||||||
</Grid>
|
</Grid>
|
||||||
</Border>
|
|
||||||
</rxui:ReactiveUserControl>
|
</rxui:ReactiveUserControl>
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
using System.Reactive.Linq;
|
using System.Reactive.Linq;
|
||||||
using System.Windows;
|
using System.Windows;
|
||||||
using ReactiveUI;
|
using ReactiveUI;
|
||||||
|
using ReactiveMarbles.ObservableEvents;
|
||||||
|
using System.Reactive;
|
||||||
|
|
||||||
namespace Wabbajack
|
namespace Wabbajack
|
||||||
{
|
{
|
||||||
@ -13,20 +15,24 @@ namespace Wabbajack
|
|||||||
public CreatedModListTileView()
|
public CreatedModListTileView()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
this.WhenActivated(disposables =>
|
this.WhenActivated(dispose =>
|
||||||
{
|
{
|
||||||
ViewModel.WhenAnyValue(vm => vm.CompilerSettings.ModListImage)
|
ViewModel.WhenAnyValue(vm => vm.CompilerSettings.ModListImage)
|
||||||
.Select(imagePath => { UIUtils.TryGetBitmapImageFromFile(imagePath, out var bitmapImage); return bitmapImage; })
|
.Select(imagePath => { UIUtils.TryGetBitmapImageFromFile(imagePath, out var bitmapImage); return bitmapImage; })
|
||||||
.BindToStrict(this, v => v.ModlistImage.ImageSource)
|
.BindToStrict(this, v => v.ModlistImage.ImageSource)
|
||||||
.DisposeWith(disposables);
|
.DisposeWith(dispose);
|
||||||
|
|
||||||
|
CompiledModListTile
|
||||||
|
.Events().MouseDown
|
||||||
|
.Select(args => Unit.Default)
|
||||||
|
.InvokeCommand(this, x => x.ViewModel.CompileModListCommand)
|
||||||
|
.DisposeWith(dispose);
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
ViewModel.WhenAnyValue(x => x.LoadingImageLock.IsLoading)
|
ViewModel.WhenAnyValue(x => x.LoadingImageLock.IsLoading)
|
||||||
.Select(x => x ? Visibility.Visible : Visibility.Collapsed)
|
.Select(x => x ? Visibility.Visible : Visibility.Collapsed)
|
||||||
.BindToStrict(this, x => x.LoadingProgress.Visibility)
|
.BindToStrict(this, x => x.LoadingProgress.Visibility)
|
||||||
.DisposeWith(disposables);
|
.DisposeWith(dispose);
|
||||||
*/
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user