Merge branch 'development'

This commit is contained in:
Robert committed 2021-07-04 11:51:53 +02:00
commit 0b29f6c92c
27 files changed
+279 -579

No files matched your search

@@ -462,7 +462,7 @@
The profile is currently running in normal mode and the timeline cannot be edited.
</TextBlock>
<TextBlock Style="{StaticResource MaterialDesignBody2TextBlock}" TextWrapping="Wrap" HorizontalAlignment="Center" TextAlignment="Center">
Press <Run Text="F5" FontWeight="Bold"/> to switch between editor mode and normal mode. Auto-switching can be disabled in the options menu.
Press <Run Text="F5" FontWeight="Bold"/> to switch between editor mode and normal mode. Auto-switching can be disabled in the run menu.
</TextBlock>
</StackPanel>
</Border>
@@ -234,7 +234,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
NotifyOfPropertyChange(nameof(TimeCaretPosition));
}
private void ProfileEditorServiceOnSuspendEditingChanged(object? sender, EventArgs e)
private void ProfileEditorServiceOnSuspendEditingChanged(object sender, EventArgs e)
{
NotifyOfPropertyChange(nameof(SuspendedEditing));
}
@@ -65,6 +65,9 @@
<MenuItem Header="View Properties"
Icon="{materialDesign:PackIcon Kind=Settings}"
Command="{s:Action ViewProperties}"/>
<MenuItem Header="_View Scripts"
Icon="{materialDesign:PackIcon Kind=BookEdit}"
Command="{s:Action ViewScripts}"/>
<MenuItem Header="Adapt Profile"
Icon="{materialDesign:PackIcon Kind=Magic}"
Command="{s:Action AdaptProfile}"/>
@@ -110,19 +113,6 @@
IsChecked="{Binding StopOnFocusLoss.Value}"
InputGestureText="Shift+F5" />
</MenuItem>
<MenuItem Header="_Scripting" IsEnabled="False">
<MenuItem Header="_Profile Scripts"
Icon="{materialDesign:PackIcon Kind=BookEdit}"
Command="{s:Action OpenProfileScripts}"/>
<MenuItem Header="_Layer Scripts"
Icon="{materialDesign:PackIcon Kind=Layers}"
IsEnabled="{Binding HasSelectedElement}"
Command="{s:Action OpenLayerScripts}"/>
<MenuItem Header="_Property Scripts"
Icon="{materialDesign:PackIcon Kind=FormTextbox}"
IsEnabled="{Binding HasSelectedElement}"
Command="{s:Action OpenLayerPropertyScripts}"/>
</MenuItem>
<MenuItem Header="_Options">
<MenuItem Header="Focus Selected Layer"
ToolTip="If enabled, displays only the layer you currently have selected"
@@ -249,6 +249,11 @@ namespace Artemis.UI.Screens.ProfileEditor
await _sidebarVmFactory.SidebarProfileConfigurationViewModel(_profileEditorService.SelectedProfileConfiguration).ViewProperties();
}
public void ViewScripts()
{
_windowManager.ShowWindow(_scriptVmFactory.ScriptsDialogViewModel(ProfileConfiguration.Profile));
}
public async Task AdaptProfile()
{
if (_profileEditorService.SelectedProfileConfiguration?.Profile == null)
@@ -304,22 +309,7 @@ namespace Artemis.UI.Screens.ProfileEditor
_profileEditorService.PasteProfileElement(rootFolder, rootFolder.Children.Count);
}
}
public void OpenProfileScripts()
{
_windowManager.ShowWindow(_scriptVmFactory.ScriptsDialogViewModel(ProfileConfiguration.Profile));
}
public void OpenLayerScripts()
{
if (_profileEditorService.SelectedProfileElement is Layer layer)
_windowManager.ShowWindow(_scriptVmFactory.ScriptsDialogViewModel(layer));
}
public void OpenLayerPropertyScripts()
{
}
public void OpenDebugger()
{
_debugService.ShowDebugger();
@@ -391,7 +391,7 @@ namespace Artemis.UI.Screens.ProfileEditor.Visualization
ActivateToolByIndex(2);
}
private void ProfileEditorServiceOnSuspendEditingChanged(object? sender, EventArgs e)
private void ProfileEditorServiceOnSuspendEditingChanged(object sender, EventArgs e)
{
NotifyOfPropertyChange(nameof(SuspendedEditing));
UpdateCanSelectEditTool();