mirror of
https://github.com/Artemis-RGB/Artemis
synced 2025-12-13 05:48:35 +00:00
Profile editor - Increase device image rescale quality
Profile editor - Fix double timeline speed when switching between play modes
This commit is contained in:
parent
51a5724adf
commit
ee16d69fb3
@ -246,6 +246,16 @@ namespace Artemis.Core.Services
|
|||||||
{
|
{
|
||||||
lock (_profileCategories)
|
lock (_profileCategories)
|
||||||
{
|
{
|
||||||
|
ProfileConfiguration? editedProfileConfiguration = _profileCategories.SelectMany(c => c.ProfileConfigurations).FirstOrDefault(p => p.IsBeingEdited);
|
||||||
|
if (editedProfileConfiguration != null)
|
||||||
|
{
|
||||||
|
editedProfileConfiguration.Profile?.Render(canvas, SKPointI.Empty);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RenderForEditor)
|
||||||
|
return;
|
||||||
|
|
||||||
// Iterate the children in reverse because the first category must be rendered last to end up on top
|
// Iterate the children in reverse because the first category must be rendered last to end up on top
|
||||||
for (int i = _profileCategories.Count - 1; i > -1; i--)
|
for (int i = _profileCategories.Count - 1; i > -1; i--)
|
||||||
{
|
{
|
||||||
@ -255,16 +265,10 @@ namespace Artemis.Core.Services
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
ProfileConfiguration profileConfiguration = profileCategory.ProfileConfigurations[j];
|
ProfileConfiguration profileConfiguration = profileCategory.ProfileConfigurations[j];
|
||||||
// Always render profiles being edited
|
|
||||||
if (profileConfiguration.IsBeingEdited)
|
|
||||||
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty);
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// Ensure all criteria are met before rendering
|
// Ensure all criteria are met before rendering
|
||||||
if (!profileConfiguration.IsSuspended && !profileConfiguration.IsMissingModule && profileConfiguration.ActivationConditionMet)
|
if (!profileConfiguration.IsSuspended && !profileConfiguration.IsMissingModule && profileConfiguration.ActivationConditionMet)
|
||||||
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty);
|
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
{
|
{
|
||||||
_renderExceptions.Add(e);
|
_renderExceptions.Add(e);
|
||||||
@ -395,13 +399,6 @@ namespace Artemis.Core.Services
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Creates a new profile configuration and adds it to the provided <see cref="ProfileCategory" />
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="category">The profile category to add the profile to</param>
|
|
||||||
/// <param name="name">The name of the new profile configuration</param>
|
|
||||||
/// <param name="icon">The icon of the new profile configuration</param>
|
|
||||||
/// <returns>The newly created profile configuration</returns>
|
|
||||||
public ProfileConfiguration CreateProfileConfiguration(ProfileCategory category, string name, string icon)
|
public ProfileConfiguration CreateProfileConfiguration(ProfileCategory category, string name, string icon)
|
||||||
{
|
{
|
||||||
ProfileConfiguration configuration = new(category, name, icon);
|
ProfileConfiguration configuration = new(category, name, icon);
|
||||||
@ -413,10 +410,6 @@ namespace Artemis.Core.Services
|
|||||||
return configuration;
|
return configuration;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Removes the provided profile configuration from the <see cref="ProfileCategory" />
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="profileConfiguration"></param>
|
|
||||||
public void RemoveProfileConfiguration(ProfileConfiguration profileConfiguration)
|
public void RemoveProfileConfiguration(ProfileConfiguration profileConfiguration)
|
||||||
{
|
{
|
||||||
profileConfiguration.Category.RemoveProfileConfiguration(profileConfiguration);
|
profileConfiguration.Category.RemoveProfileConfiguration(profileConfiguration);
|
||||||
|
|||||||
@ -570,7 +570,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
|
|||||||
{
|
{
|
||||||
if (!ProfileEditorService.Playing)
|
if (!ProfileEditorService.Playing)
|
||||||
{
|
{
|
||||||
Pause();
|
CoreService.FrameRendering -= CoreServiceOnFrameRendering;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -27,7 +27,7 @@
|
|||||||
<KeyBinding Command="{s:Action Undo}" Modifiers="Control" Key="Z" />
|
<KeyBinding Command="{s:Action Undo}" Modifiers="Control" Key="Z" />
|
||||||
<KeyBinding Command="{s:Action Redo}" Modifiers="Control" Key="Y" />
|
<KeyBinding Command="{s:Action Redo}" Modifiers="Control" Key="Y" />
|
||||||
<KeyBinding Command="{s:Action ToggleSuspend}" Key="F5" />
|
<KeyBinding Command="{s:Action ToggleSuspend}" Key="F5" />
|
||||||
<KeyBinding Command="{s:Action ToggleAutoSuspend}" Modifiers="Ctrl" Key="F5" />
|
<KeyBinding Command="{s:Action ToggleAutoSuspend}" Modifiers="Shift" Key="F5" />
|
||||||
</UserControl.InputBindings>
|
</UserControl.InputBindings>
|
||||||
|
|
||||||
<Grid ClipToBounds="True">
|
<Grid ClipToBounds="True">
|
||||||
@ -105,10 +105,10 @@
|
|||||||
Command="{s:Action ToggleSuspend}"
|
Command="{s:Action ToggleSuspend}"
|
||||||
InputGestureText="F5" />
|
InputGestureText="F5" />
|
||||||
<MenuItem Header="Run Profile on Focus Loss"
|
<MenuItem Header="Run Profile on Focus Loss"
|
||||||
ToolTip="If enabled, regular profile playback is resumed on focus loss"
|
ToolTip="If enabled, run mode is set to normal on focus loss"
|
||||||
IsCheckable="True"
|
IsCheckable="True"
|
||||||
IsChecked="{Binding StopOnFocusLoss.Value}"
|
IsChecked="{Binding StopOnFocusLoss.Value}"
|
||||||
InputGestureText="Ctrl+F5" />
|
InputGestureText="Shift+F5" />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
<MenuItem Header="_Scripting" IsEnabled="False">
|
<MenuItem Header="_Scripting" IsEnabled="False">
|
||||||
<MenuItem Header="_Profile Scripts"
|
<MenuItem Header="_Profile Scripts"
|
||||||
|
|||||||
@ -101,6 +101,7 @@
|
|||||||
<DataTemplate>
|
<DataTemplate>
|
||||||
<shared:DeviceVisualizer Device="{Binding}"
|
<shared:DeviceVisualizer Device="{Binding}"
|
||||||
ShowColors="True"
|
ShowColors="True"
|
||||||
|
RenderOptions.BitmapScalingMode="HighQuality"
|
||||||
HighlightedLeds="{Binding DataContext.HighlightedLeds, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
HighlightedLeds="{Binding DataContext.HighlightedLeds, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
||||||
</DataTemplate>
|
</DataTemplate>
|
||||||
</ItemsControl.ItemTemplate>
|
</ItemsControl.ItemTemplate>
|
||||||
|
|||||||
@ -33,7 +33,11 @@
|
|||||||
Visibility="{Binding Device.Layout.Image, ConverterParameter=Inverted, Converter={StaticResource NullToVisibilityConverter}}"
|
Visibility="{Binding Device.Layout.Image, ConverterParameter=Inverted, Converter={StaticResource NullToVisibilityConverter}}"
|
||||||
IsHitTestVisible="False"/>
|
IsHitTestVisible="False"/>
|
||||||
|
|
||||||
<shared:DeviceVisualizer Device="{Binding Device}" ShowColors="True" VerticalAlignment="Top" HorizontalAlignment="Left" />
|
<shared:DeviceVisualizer Device="{Binding Device}"
|
||||||
|
RenderOptions.BitmapScalingMode="HighQuality"
|
||||||
|
ShowColors="True"
|
||||||
|
VerticalAlignment="Top"
|
||||||
|
HorizontalAlignment="Left" />
|
||||||
|
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user