-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ Remove Entity Component from Entity (#286)
* Initial * Added unit tests and fixed up issues. * Added documentation
- Loading branch information
1 parent
c350565
commit 72c2dfa
Showing
23 changed files
with
513 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Button x:Class="FinalEngine.Editor.Desktop.Controls.Common.IconButton" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> | ||
<Grid> | ||
<Image x:Name="image" Width="16" Height="16" /> | ||
</Grid> | ||
</Button> |
34 changes: 34 additions & 0 deletions
34
FinalEngine.Editor.Desktop/Controls/Common/IconButton.xaml.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// <copyright file="IconButton.xaml.cs" company="Software Antics"> | ||
// Copyright (c) Software Antics. All rights reserved. | ||
// </copyright> | ||
|
||
namespace FinalEngine.Editor.Desktop.Controls.Common; | ||
|
||
using System.Windows.Controls; | ||
using System.Windows.Media; | ||
|
||
/// <summary> | ||
/// Interaction logic for IconButton.xaml. | ||
/// </summary> | ||
public partial class IconButton : Button | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="IconButton"/> class. | ||
/// </summary> | ||
public IconButton() | ||
{ | ||
this.InitializeComponent(); | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets the URI source for the icon. | ||
/// </summary> | ||
/// <value> | ||
/// The URI source for the icon. | ||
/// </value> | ||
public ImageSource UriSource | ||
{ | ||
get { return this.image.Source; } | ||
set { this.image.Source = value; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions
27
FinalEngine.Editor.Desktop/Styles/Controls/IconButtonStyle.xaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:c="clr-namespace:FinalEngine.Editor.Desktop.Controls.Common" | ||
mc:Ignorable="d"> | ||
<Style TargetType="{x:Type c:IconButton}" BasedOn="{StaticResource MahApps.Styles.Button.VisualStudio}"> | ||
<Style.Setters> | ||
<Setter Property="BorderBrush" Value="Transparent" /> | ||
<Setter Property="Background" Value="Transparent" /> | ||
<Setter Property="MinWidth" Value="24" /> | ||
<Setter Property="MinHeight" Value="24" /> | ||
<Setter Property="Margin" Value="0" /> | ||
<Setter Property="Padding" Value="0" /> | ||
<Setter Property="HorizontalContentAlignment" Value="Center" /> | ||
<Setter Property="VerticalContentAlignment" Value="Center" /> | ||
</Style.Setters> | ||
<Style.Triggers> | ||
<Trigger Property="IsMouseOver" Value="True"> | ||
<Setter Property="Background" Value="{StaticResource MahApps.Brushes.Button.Square.Background.MouseOver}" /> | ||
</Trigger> | ||
<Trigger Property="IsMouseOver" Value="False"> | ||
<Setter Property="Background" Value="Transparent" /> | ||
</Trigger> | ||
</Style.Triggers> | ||
</Style> | ||
</ResourceDictionary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.