Skip to content

Commit

Permalink
Merge pull request #140 from Settlers4Modding/feature/hdpatchcategory
Browse files Browse the repository at this point in the history
Feature/hdpatchcategory
  • Loading branch information
XanatosX authored Jun 10, 2021
2 parents 759d852 + 3a9dda3 commit 1ce380a
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/CommunityPatchLauncher/Properties/Resources.Designer.cs

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

3 changes: 3 additions & 0 deletions src/CommunityPatchLauncher/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@
<data name="MainWindow_FAQ" xml:space="preserve">
<value>FAQ</value>
</data>
<data name="MainWindow_HDPatchCategory" xml:space="preserve">
<value>HD Patch</value>
</data>
<data name="MainWindow_Help" xml:space="preserve">
<value>Help</value>
</data>
Expand Down
6 changes: 6 additions & 0 deletions src/CommunityPatchLauncher/ViewModels/MainWindowModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ internal class MainWindowModel : BaseViewModel
/// </summary>
public ICommand OpenNewsCommand { get; private set; }

/// <summary>
/// Opens the HD Patch user controll
/// </summary>
public ICommand OpenHDPatchCommand { get; private set; }

/// <summary>
/// The command used to open the changelog
/// </summary>
Expand Down Expand Up @@ -149,6 +154,7 @@ public MainWindowModel(Window window) : base(window, true)
OpenAboutCommand = openLocalBrowser;
OpenLicenseCommand = openLocalBrowser;

OpenHDPatchCommand = new OpenControlToPanel(contentDock, new ComingSoonControl());
OpenMapCommand = new OpenControlToPanel(contentDock, new MapUserControl());
LaunchGameCommand = new OpenControlToPanel(contentDock, new PatchVersionSelectionUserControl(window));
OpenSettingCommand = new OpenControlToPanel(contentDock, new SettingsUserControl(currentWindow));
Expand Down
6 changes: 6 additions & 0 deletions src/CommunityPatchLauncher/Windows/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
<Image Margin="0,5,0,0" MaxHeight="150" x:Name="Img_MainLogo" Source="../Assets/Images/CP_Logo1.png"></Image>
<Border Style="{StaticResource DefaultBorder}" Opacity="0.4" BorderThickness="0, 2, 0, 0" Margin="0,5,0,5"></Border>
<StackPanel Orientation="Vertical">
<Button Style="{StaticResource CategoryButton}" Command="{Binding ComingSoonCommand}">
<ItemsControl Style="{StaticResource MainCategoryGrid}">
<fa:FontAwesome Icon="Codepen" Style="{StaticResource MainCategoryFontAwesome}"></fa:FontAwesome>
<TextBlock Style="{StaticResource MainCategoryString}" Text="{x:Static p:Resources.MainWindow_HDPatchCategory}"></TextBlock>
</ItemsControl>
</Button>
<Button Style="{StaticResource CategoryButton}" Command="{Binding ChangeGroupVisiblity}" CommandParameter="Home_Group">
<ItemsControl Style="{StaticResource MainCategoryGrid}">
<fa:FontAwesome Icon="Home" Style="{StaticResource MainCategoryFontAwesome}"></fa:FontAwesome>
Expand Down

0 comments on commit 1ce380a

Please sign in to comment.