Skip to content

Commit

Permalink
Final Touches before 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Crauzer committed Sep 17, 2017
1 parent d109098 commit 595e404
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 11 deletions.
26 changes: 15 additions & 11 deletions Obsidian/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,25 @@
<Window.Resources>
<valueConverters:SizeValueConverter x:Key="SizeValueConverter"/>
<valueConverters:HexStringValueConverter x:Key="HexStringValueConverter"/>
<Storyboard x:Key="blurIn">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.BitmapEffect).(BlurBitmapEffect.Radius)" Storyboard.TargetName="image">
<Storyboard x:Key="shadowIn">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.BitmapEffect).(DropShadowBitmapEffect.ShadowDepth)" Storyboard.TargetName="image">
<EasingDoubleKeyFrame KeyTime="0" Value="0"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="4"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="5"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
<Storyboard x:Key="blurOut">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.BitmapEffect).(BlurBitmapEffect.Radius)" Storyboard.TargetName="image">
<EasingDoubleKeyFrame KeyTime="0" Value="4"/>
<Storyboard x:Key="shadowOut">
<DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.BitmapEffect).(DropShadowBitmapEffect.ShadowDepth)" Storyboard.TargetName="image">
<EasingDoubleKeyFrame KeyTime="0" Value="5"/>
<EasingDoubleKeyFrame KeyTime="0:0:0.2" Value="0"/>
</DoubleAnimationUsingKeyFrames>
</Storyboard>
</Window.Resources>
<Window.Triggers>
<EventTrigger RoutedEvent="UIElement.MouseEnter" SourceName="image">
<BeginStoryboard Storyboard="{StaticResource blurIn}"/>
<BeginStoryboard Storyboard="{StaticResource shadowIn}"/>
</EventTrigger>
<EventTrigger RoutedEvent="UIElement.MouseLeave" SourceName="image">
<BeginStoryboard Storyboard="{StaticResource blurOut}"/>
<BeginStoryboard Storyboard="{StaticResource shadowOut}"/>
</EventTrigger>
</Window.Triggers>
<Grid>
Expand All @@ -45,12 +45,16 @@
</Grid>
<StackPanel Orientation="Horizontal" Margin="0,5,0,0" Height="136">
<StackPanel Orientation="Horizontal" Margin="10,10,0,10">
<Image x:Name="image" Width="45" Source="icon.ico" Cursor="Hand">
<Image x:Name="image" Width="45" Source="icon.ico" Cursor="Hand" MouseDown="image_MouseDown">
<Image.BitmapEffect>
<BlurBitmapEffect Radius="0"/>
<DropShadowBitmapEffect ShadowDepth="0"/>
</Image.BitmapEffect>
</Image>
<TextBlock Text="OBSIDIAN" FontSize="40" FontFamily="Microsoft JhengHei UI" TextDecorations="{x:Null}" FontWeight="Bold" TextAlignment="Center" Margin="5,35,0,0"/>
<TextBlock Text="OBSIDIAN" FontWeight="ExtraLight" FontSize="40" FontFamily="Segoe UI Light" TextDecorations="{x:Null}" TextAlignment="Center" Margin="5,30,0,0" FontStyle="Italic">
<TextBlock.Effect>
<DropShadowEffect ShadowDepth="2"/>
</TextBlock.Effect>
</TextBlock>
</StackPanel>
<Canvas Margin="15,0,0,0">
<Line Stroke="DarkGray" StrokeThickness="4" Y1="136"/>
Expand Down
6 changes: 6 additions & 0 deletions Obsidian/MainWindow.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ public MainWindow()
InitializeComponent();
}

private void image_MouseDown(object sender, MouseButtonEventArgs e)
{
AboutWindow aboutWindow = new AboutWindow();
aboutWindow.Show();
}

private void buttonOpenWadFile_Click(object sender, RoutedEventArgs e)
{
OpenFileDialog dialog = new OpenFileDialog();
Expand Down
7 changes: 7 additions & 0 deletions Obsidian/Obsidian.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@
</ApplicationDefinition>
<Compile Include="ValueConverters\HexStringValueConverter.cs" />
<Compile Include="ValueConverters\SizeValueConverter.cs" />
<Compile Include="Windows\AboutWindow.xaml.cs">
<DependentUpon>AboutWindow.xaml</DependentUpon>
</Compile>
<Page Include="MainWindow.xaml">
<Generator>MSBuild:Compile</Generator>
<SubType>Designer</SubType>
Expand All @@ -69,6 +72,10 @@
<DependentUpon>MainWindow.xaml</DependentUpon>
<SubType>Code</SubType>
</Compile>
<Page Include="Windows\AboutWindow.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs">
Expand Down
45 changes: 45 additions & 0 deletions Obsidian/Windows/AboutWindow.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<Window x:Class="Obsidian.AboutWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:Obsidian"
mc:Ignorable="d"
Title="About Obisidan" Height="300" Width="300" Icon="/Obsidian;component/icon.ico" WindowStartupLocation="CenterScreen">
<Grid>
<StackPanel Orientation="Vertical">
<StackPanel>
<StackPanel Orientation="Horizontal" Margin="10">
<Image Source="/Obsidian;component/icon.ico">
<Image.Effect>
<DropShadowEffect RenderingBias="Quality" ShadowDepth="2"/>
</Image.Effect>
</Image>
<TextBlock Text="OBSIDIAN" FontWeight="ExtraLight" FontStyle="Italic" TextDecorations="{x:Null}" TextAlignment="Center" FontSize="45" FontFamily="Segoe UI Light" Margin="10,0,0,0">
<TextBlock.Effect>
<DropShadowEffect Direction="200" ShadowDepth="2"/>
</TextBlock.Effect>
</TextBlock>
</StackPanel>
<Canvas>
<Line Stroke="Black" StrokeThickness="1" X1="292">
<Line.Effect>
<DropShadowEffect Direction="0" ShadowDepth="1"/>
</Line.Effect>
</Line>
</Canvas>
</StackPanel>
<TextBlock Margin="10" TextWrapping="Wrap"><Run Text="Obsidian was created as a standalone editor for WAD files"/><Run Text=" and uses the Fantome.League library"/><LineBreak/><Run Text="to edit the files"/><LineBreak/><Run/><LineBreak/><Run Text="Using modified WAD files requires to patch your executable"/></TextBlock>
<StackPanel Margin="0,45,0,0">
<Canvas>
<Line Stroke="Black" StrokeThickness="1" X1="292">
<Line.Effect>
<DropShadowEffect Direction="0" ShadowDepth="1"/>
</Line.Effect>
</Line>
</Canvas>
<TextBlock Margin="10,3,10,0" Text="Created with &lt;3 in C# by Crauzer"/>
</StackPanel>
</StackPanel>
</Grid>
</Window>
27 changes: 27 additions & 0 deletions Obsidian/Windows/AboutWindow.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Obsidian
{
/// <summary>
/// Interaction logic for AboutWindow.xaml
/// </summary>
public partial class AboutWindow : Window
{
public AboutWindow()
{
InitializeComponent();
}
}
}

0 comments on commit 595e404

Please sign in to comment.