Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix shader parameter settings #100

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 4 additions & 14 deletions fluXis.Game/Screens/Edit/Tabs/Design/Points/Entries/ShaderEntry.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
};
}
Expand Down Expand Up @@ -100,10 +102,8 @@ protected override IEnumerable<Drawable> CreateSettings()
Bindable = new Bindable<bool>(shader.UseStartParams),
OnStateChanged = enabled =>
{
RequestClose?.Invoke(); // until there is a way to refresh
shader.UseStartParams = enabled;
Map.Update(shader);
OpenSettings();
}
};

Expand All @@ -124,17 +124,7 @@ protected override IEnumerable<Drawable> CreateSettings()
OpenSettings();
}
},
new PointSettingsToggle
{
Text = "Use Start Value",
TooltipText = "Enables whether start values should be used.",
Bindable = new Bindable<bool>(shader.UseStartParams),
OnStateChanged = enabled =>
{
shader.UseStartParams = enabled;
Map.Update(shader);
}
}
startValToggle
};

// edge cases for shaders with extra/different parameter(s)
Expand Down
Loading