Profile - Blending mode fixes

Nodes editor - Adhere to cable display settings
Profile - Added focus layer option
This commit is contained in:
Robert committed 2022-08-14 10:18:17 +02:00
1 parent e401fdf964
commit 3f52279305
13 files changed
+115 -32

No files matched your search

@@ -34,6 +34,11 @@ namespace Artemis.Core.Services
/// Gets or sets a boolean indicating whether rendering should only be done for profiles being edited
/// </summary>
bool RenderForEditor { get; set; }
/// <summary>
/// Gets or sets the profile element to focus on while rendering for the editor
/// </summary>
ProfileElement? EditorFocus { get; set; }
/// <summary>
/// Activates the profile of the given <see cref="ProfileConfiguration" /> with the currently active surface
@@ -190,6 +190,7 @@ namespace Artemis.Core.Services
public bool HotkeysEnabled { get; set; }
public bool RenderForEditor { get; set; }
public ProfileElement? EditorFocus { get; set; }
public void UpdateProfiles(double deltaTime)
{
@@ -247,7 +248,7 @@ namespace Artemis.Core.Services
ProfileConfiguration? editedProfileConfiguration = _profileCategories.SelectMany(c => c.ProfileConfigurations).FirstOrDefault(p => p.IsBeingEdited);
if (editedProfileConfiguration != null)
{
editedProfileConfiguration.Profile?.Render(canvas, SKPointI.Empty);
editedProfileConfiguration.Profile?.Render(canvas, SKPointI.Empty, RenderForEditor ? EditorFocus : null);
return;
}
@@ -265,7 +266,7 @@ namespace Artemis.Core.Services
ProfileConfiguration profileConfiguration = profileCategory.ProfileConfigurations[j];
// Ensure all criteria are met before rendering
if (!profileConfiguration.IsSuspended && !profileConfiguration.IsMissingModule && profileConfiguration.ActivationConditionMet)
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty);
profileConfiguration.Profile?.Render(canvas, SKPointI.Empty, null);
}
catch (Exception e)
{