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)
|
||||
{
|
||||
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
|
||||
for (int i = _profileCategories.Count - 1; i > -1; i--)
|
||||
{
|
||||
@ -255,15 +265,9 @@ namespace Artemis.Core.Services
|
||||
try
|
||||
{
|
||||
ProfileConfiguration profileConfiguration = profileCategory.ProfileConfigurations[j];
|
||||
// Always render profiles being edited
|
||||
if (profileConfiguration.IsBeingEdited)
|
||||
// Ensure all criteria are met before rendering
|
||||
if (!profileConfiguration.IsSuspended && !profileConfiguration.IsMissingModule && profileConfiguration.ActivationConditionMet)
|
||||
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty);
|
||||
else
|
||||
{
|
||||
// Ensure all criteria are met before rendering
|
||||
if (!profileConfiguration.IsSuspended && !profileConfiguration.IsMissingModule && profileConfiguration.ActivationConditionMet)
|
||||
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty);
|
||||
}
|
||||
}
|
||||
catch (Exception 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)
|
||||
{
|
||||
ProfileConfiguration configuration = new(category, name, icon);
|
||||
@ -413,10 +410,6 @@ namespace Artemis.Core.Services
|
||||
return configuration;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Removes the provided profile configuration from the <see cref="ProfileCategory" />
|
||||
/// </summary>
|
||||
/// <param name="profileConfiguration"></param>
|
||||
public void RemoveProfileConfiguration(ProfileConfiguration profileConfiguration)
|
||||
{
|
||||
profileConfiguration.Category.RemoveProfileConfiguration(profileConfiguration);
|
||||
|
||||
@ -570,7 +570,7 @@ namespace Artemis.UI.Screens.ProfileEditor.LayerProperties
|
||||
{
|
||||
if (!ProfileEditorService.Playing)
|
||||
{
|
||||
Pause();
|
||||
CoreService.FrameRendering -= CoreServiceOnFrameRendering;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -27,7 +27,7 @@
|
||||
<KeyBinding Command="{s:Action Undo}" Modifiers="Control" Key="Z" />
|
||||
<KeyBinding Command="{s:Action Redo}" Modifiers="Control" Key="Y" />
|
||||
<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>
|
||||
|
||||
<Grid ClipToBounds="True">
|
||||
@ -105,10 +105,10 @@
|
||||
Command="{s:Action ToggleSuspend}"
|
||||
InputGestureText="F5" />
|
||||
<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"
|
||||
IsChecked="{Binding StopOnFocusLoss.Value}"
|
||||
InputGestureText="Ctrl+F5" />
|
||||
InputGestureText="Shift+F5" />
|
||||
</MenuItem>
|
||||
<MenuItem Header="_Scripting" IsEnabled="False">
|
||||
<MenuItem Header="_Profile Scripts"
|
||||
|
||||
@ -101,6 +101,7 @@
|
||||
<DataTemplate>
|
||||
<shared:DeviceVisualizer Device="{Binding}"
|
||||
ShowColors="True"
|
||||
RenderOptions.BitmapScalingMode="HighQuality"
|
||||
HighlightedLeds="{Binding DataContext.HighlightedLeds, Mode=OneWay, RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" />
|
||||
</DataTemplate>
|
||||
</ItemsControl.ItemTemplate>
|
||||
|
||||
@ -33,7 +33,11 @@
|
||||
Visibility="{Binding Device.Layout.Image, ConverterParameter=Inverted, Converter={StaticResource NullToVisibilityConverter}}"
|
||||
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>
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user