Skip to content

Commit

Permalink
More work on animation editor
Browse files Browse the repository at this point in the history
  • Loading branch information
vchelaru committed Feb 3, 2024
1 parent 4f2520c commit afa472f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,26 @@ private static void HandleViewModelPropertyChanged(object sender, PropertyChange
{
case nameof(ViewModel.SelectedAnimationChain):
case nameof(ViewModel.SelectedAnimationFrame):
if(ViewModel.SelectedAnimationFrame != null)
case nameof(ViewModel.SelectedShape):
if(ViewModel.SelectedShape != null)
{
View.PropertyGrid.Visibility = System.Windows.Visibility.Visible;
PropertyGridManager.ShowInPropertyGrid(ViewModel.SelectedAnimationFrame);
if(ViewModel.SelectedShape is CircleViewModel circle)
{
View.PropertyGrid.Visibility = System.Windows.Visibility.Visible;
PropertyGridManager.ShowInPropertyGrid(circle);
}
else
{
View.PropertyGrid.Visibility = System.Windows.Visibility.Hidden;

}
}
else if(ViewModel.SelectedShape != null)
else if(ViewModel.SelectedAnimationFrame != null)
{
//Show Shape Properties
View.PropertyGrid.Visibility = System.Windows.Visibility.Hidden;
View.PropertyGrid.Visibility = System.Windows.Visibility.Visible;
PropertyGridManager.ShowInPropertyGrid(ViewModel.SelectedAnimationFrame);
}
else
else if(ViewModel.SelectedAnimationChain != null)
{
View.PropertyGrid.Visibility = System.Windows.Visibility.Visible;
PropertyGridManager.ShowInPropertyGrid(ViewModel.SelectedAnimationChain);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void Add(string propertyName, bool canWrite = false)

#region Circle

private static void SetmemberCategories(DataUiGrid grid, CircleViewModel circle)
public static void SetMemberCategories(DataUiGrid grid, CircleViewModel circle)
{
var list = new List<MemberCategory>();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,12 @@ internal static void ShowInPropertyGrid(AnimationFrameViewModel selectedAnimatio
PropertyGrid.Refresh();
}

internal static void ShowInPropertyGrid(CircleViewModel circle)
{
PropertyGrid.Instance = circle;
MemberCategoryManager.SetMemberCategories(PropertyGrid, circle);
PropertyGrid.Refresh();
}

}
}

0 comments on commit afa472f

Please sign in to comment.