Skip to content

Commit

Permalink
Updated for HDT changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
rembound committed Mar 31, 2016
1 parent c62e3a0 commit 0b38281
Show file tree
Hide file tree
Showing 12 changed files with 269 additions and 15 deletions.
20 changes: 19 additions & 1 deletion ArenaHelper.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,9 @@
<Compile Include="Controls\Card.xaml.cs">
<DependentUpon>Card.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\DebugTextBlock.xaml.cs">
<DependentUpon>DebugTextBlock.xaml</DependentUpon>
</Compile>
<Compile Include="Controls\Hero.xaml.cs">
<DependentUpon>Hero.xaml</DependentUpon>
</Compile>
Expand All @@ -85,10 +88,16 @@
<Compile Include="Plugin.cs" />
<Compile Include="Plugins.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Properties\Resources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>Resources.resx</DependentUpon>
</Compile>
<Compile Include="Update.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<Resource Include="resources\font.ttf" />
</ItemGroup>
<ItemGroup>
<Page Include="ArenaWindow.xaml">
Expand All @@ -103,6 +112,10 @@
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\DebugTextBlock.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
<Page Include="Controls\Hero.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
Expand All @@ -112,7 +125,12 @@
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup />
<ItemGroup>
<EmbeddedResource Include="Properties\Resources.resx">
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>
Expand Down
12 changes: 6 additions & 6 deletions ArenaWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
</controls:Flyout>

<!-- About -->
<controls:Flyout x:Name="FlyoutAbout" Header="About" CloseButtonVisibility="Collapsed" Position="Left" Width="400">
<controls:Flyout x:Name="FlyoutAbout" Header="Support" CloseButtonVisibility="Collapsed" Position="Left" Width="400">
<StackPanel Margin="5">
<TextBlock Margin="10,5,10,15" FontWeight="SemiBold" TextWrapping="Wrap">
<Run Text="Thank you for using my plugin! Arena Helper " /><Run Text="{Binding StringVersion, Mode=OneWay}" /><Run Text=" was made by " /><Hyperlink NavigateUri="{Binding StringWebsite}" RequestNavigate="Hyperlink_RequestNavigate" Style="{StaticResource HyperlinkAboutStyle}">Rembound</Hyperlink>
Expand Down Expand Up @@ -109,14 +109,14 @@
<RowDefinition Height="auto" />
</Grid.RowDefinitions>

<local:OutlinedTextBlock Grid.Row="0" x:Name="DetectingHeader" HorizontalAlignment="Center" FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT" FontSize="20" Text="Title" Margin="0,4,0,0" />
<local:OutlinedTextBlock Grid.Row="0" x:Name="DetectingHeader" HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Title" Margin="0,4,0,0" />
<TextBlock Grid.Row="1" x:Name="DetectingText" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" Margin="0,12,0,0">text</TextBlock>
<TextBlock Grid.Row="2" x:Name="DetectingText2" TextWrapping="Wrap" TextAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" Margin="0,20,0,0">text</TextBlock>
</Grid>

<!-- HeroPanel -->
<StackPanel x:Name="HeroPanel" Grid.Row="1" Width="200" Visibility="Hidden">
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT" FontSize="20" Text="Detected Heroes" Margin="0,4,0,0" />
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Detected Heroes" Margin="0,4,0,0" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
Expand All @@ -134,7 +134,7 @@
</StackPanel>

<StackPanel x:Name="ConfigureHeroPanel" Grid.Row="1" Width="300" Visibility="Hidden">
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT" FontSize="20" Text="Select Hero" Margin="0,4,0,0" />
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Select Hero" Margin="0,4,0,0" />
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*" />
Expand Down Expand Up @@ -169,13 +169,13 @@
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<StackPanel Grid.Column="0">
<local:OutlinedTextBlock x:Name="Header" HorizontalAlignment="Center" FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT" FontSize="20" Text="header" Margin="0,4,0,0" />
<local:OutlinedTextBlock x:Name="Header" HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="header" Margin="0,4,0,0" />
<localcontrols:Card x:Name="CardControl0" DataContext="{Binding Card0}" HorizontalAlignment="Center" Margin="0,12,0,0" MouseUp="CardControl0_MouseUp" />
<localcontrols:Card x:Name="CardControl1" DataContext="{Binding Card1}" HorizontalAlignment="Center" Margin="0,4,0,0" MouseUp="CardControl1_MouseUp" />
<localcontrols:Card x:Name="CardControl2" DataContext="{Binding Card2}" HorizontalAlignment="Center" Margin="0,4,0,0" MouseUp="CardControl2_MouseUp" />
</StackPanel>
<StackPanel Grid.Column="1" Visibility="Visible" HorizontalAlignment="Center" Margin="32,0,0,0">
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT" FontSize="20" Text="Value" Margin="0,4,0,0" />
<local:OutlinedTextBlock HorizontalAlignment="Center" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20" Text="Value" Margin="0,4,0,0" />
<Label x:Name="Value0" Height="35" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" Content="80" FontSize="14" Margin="0,12,0,0" />
<Label x:Name="Value1" Height="35" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" Content="80" FontSize="14" Margin="0,4,0,0" />
<Label x:Name="Value2" Height="35" VerticalContentAlignment="Center" VerticalAlignment="Center" HorizontalAlignment="Center" Foreground="{DynamicResource {x:Static SystemColors.ControlLightLightBrushKey}}" Content="80" FontSize="14" Margin="0,4,0,0" />
Expand Down
2 changes: 1 addition & 1 deletion Controls/AdviceOverlay.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</Border.Background>
<local:OutlinedTextBlock x:Name="AdviceText" VerticalAlignment="Bottom" HorizontalAlignment="Left" Margin="8,8,8,8"
Text="text"
FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT"
FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT"
TextAlignment="Left" FontSize="18" />
</Border>
</Grid>
Expand Down
7 changes: 5 additions & 2 deletions Controls/Card.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
xmlns:local="clr-namespace:ArenaHelper"
mc:Ignorable="d"
d:DesignHeight="300" d:DesignWidth="300">
<Rectangle Fill="{Binding Background}" Height="34" Width="217"/>
<!--
<Grid Height="34" Width="217">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="38" />
Expand All @@ -14,13 +16,14 @@
<Rectangle Fill="{Binding Background}" Height="34" Width="217" Grid.ColumnSpan="2"/>
<local:OutlinedTextBlock Width="32" Height="25" VerticalAlignment="Center" HorizontalAlignment="Center"
Text="{Binding Cost}"
FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT"
FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT"
TextAlignment="Center" FontSize="20" Grid.Column="0" />
<Viewbox Height="16" HorizontalAlignment="Left" Grid.Column="1">
<local:OutlinedTextBlock VerticalAlignment="Center" Text="{Binding LocalizedName}"
Fill="{Binding ColorPlayer}"
FontFamily="{Binding Font}"
TextAlignment="Left" FontSize="13" />
</Viewbox>
</Grid>
</Grid>-->
</UserControl>
8 changes: 8 additions & 0 deletions Controls/DebugTextBlock.xaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<local:OutlinedTextBlock x:Class="ArenaHelper.Controls.DebugTextBlock"
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:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="clr-namespace:ArenaHelper"
mc:Ignorable="d" d:DesignWidth="300" TextWrapping="NoWrap"
FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" FontSize="20"/>
28 changes: 28 additions & 0 deletions Controls/DebugTextBlock.xaml.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
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.Navigation;
using System.Windows.Shapes;

namespace ArenaHelper.Controls
{
/// <summary>
/// Interaction logic for DebugTextBlock.xaml
/// </summary>
public partial class DebugTextBlock
{
public DebugTextBlock()
{
InitializeComponent();
}
}
}
2 changes: 1 addition & 1 deletion Controls/Hero.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<Border x:Name="HeroBorder" Height="40" Width="40" Grid.Row="0" Grid.Column="0" Background="{DynamicResource {x:Static SystemColors.ControlDarkBrushKey}}" Margin="0,0,0,0" MouseUp="Hero_MouseUp">
<Image x:Name="HeroImage" Width="32" Height="32" Margin="0,0,0,0" />
</Border>
<local:OutlinedTextBlock x:Name="HeroName" VerticalAlignment="Bottom" HorizontalAlignment="Center" Text="Paladin" FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT" TextAlignment="Left" FontSize="13" Margin="0,4,0,0" />
<local:OutlinedTextBlock x:Name="HeroName" VerticalAlignment="Bottom" HorizontalAlignment="Center" Text="Paladin" FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT" TextAlignment="Left" FontSize="13" Margin="0,4,0,0" />
</StackPanel>
</UserControl>
2 changes: 1 addition & 1 deletion Controls/ValueOverlay.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</Border.Background>
<local:OutlinedTextBlock x:Name="ValueText" VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="8,0,8,2"
Text="text"
FontFamily="/HearthstoneDeckTracker;component/Resources/#Belwe Bd BT"
FontFamily="/ArenaHelper;component/resources/#Belwe Bd BT"
TextAlignment="Center" FontSize="28" />
</Border>
</Grid>
Expand Down
6 changes: 3 additions & 3 deletions Plugin.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ public enum PluginState { Idle, SearchHeroes, SearchBigHero, DetectedHeroes, Sea

private List<ArenaHelper.Controls.ValueOverlay> valueoverlays = new List<ArenaHelper.Controls.ValueOverlay>();
private ArenaHelper.Controls.AdviceOverlay adviceoverlay = null;
private HearthstoneTextBlock testtext = null;
private ArenaHelper.Controls.DebugTextBlock testtext = null;
private List<System.Windows.Controls.Image> testimages = new List<System.Windows.Controls.Image>();

private Update.AHDataVersion dataversion;
Expand Down Expand Up @@ -317,7 +317,7 @@ public string Author

public Version Version
{
get { return new Version("0.6.8"); }
get { return new Version("0.6.9"); }
}

public MenuItem MenuItem
Expand Down Expand Up @@ -2657,7 +2657,7 @@ private void AddElements()
// Test text
if (testtext == null)
{
testtext = new HearthstoneTextBlock();
testtext = new Controls.DebugTextBlock();
testtext.FontSize = 12;
testtext.Text = "Arena Helper";
Canvas.SetLeft(testtext, 5);
Expand Down
73 changes: 73 additions & 0 deletions Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 0b38281

Please sign in to comment.