From 9694826ac152c0bf30fbc1c88ddabe660fdce59b Mon Sep 17 00:00:00 2001 From: tylersfoot Date: Thu, 31 Oct 2024 21:37:52 -0400 Subject: [PATCH] fix shader parameter settings - fix shaders not cloning 3rd parameter - fix start value toggle not updating properly --- .../Tabs/Design/Points/Entries/ShaderEntry.cs | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/fluXis.Game/Screens/Edit/Tabs/Design/Points/Entries/ShaderEntry.cs b/fluXis.Game/Screens/Edit/Tabs/Design/Points/Entries/ShaderEntry.cs index b126aab6..b0cbcf6f 100644 --- a/fluXis.Game/Screens/Edit/Tabs/Design/Points/Entries/ShaderEntry.cs +++ b/fluXis.Game/Screens/Edit/Tabs/Design/Points/Entries/ShaderEntry.cs @@ -63,11 +63,13 @@ public override ITimedObject CreateClone() { Strength = shader.StartParameters.Strength, Strength2 = shader.StartParameters.Strength2, + Strength3 = shader.StartParameters.Strength3 }, EndParameters = new ShaderEvent.ShaderParameters { Strength = shader.EndParameters.Strength, - Strength2 = shader.EndParameters.Strength2 + Strength2 = shader.EndParameters.Strength2, + Strength3 = shader.EndParameters.Strength3 } }; } @@ -100,10 +102,8 @@ protected override IEnumerable CreateSettings() Bindable = new Bindable(shader.UseStartParams), OnStateChanged = enabled => { - RequestClose?.Invoke(); // until there is a way to refresh shader.UseStartParams = enabled; Map.Update(shader); - OpenSettings(); } }; @@ -124,17 +124,7 @@ protected override IEnumerable CreateSettings() OpenSettings(); } }, - new PointSettingsToggle - { - Text = "Use Start Value", - TooltipText = "Enables whether start values should be used.", - Bindable = new Bindable(shader.UseStartParams), - OnStateChanged = enabled => - { - shader.UseStartParams = enabled; - Map.Update(shader); - } - } + startValToggle }; // edge cases for shaders with extra/different parameter(s)