diff options
| author | Jacob Palecki <[email protected]> | 2021-07-10 15:35:21 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2021-07-10 15:35:21 -0700 |
| commit | aa04d5a61f89225a03dc3b155d4f3a93ffe4c5b8 (patch) | |
| tree | 17a28ab918de1372de6bfd6548421972812fb50f /grapher/Models/Options | |
| parent | Fix truncated sensitivity legend (diff) | |
| download | rawaccel-aa04d5a61f89225a03dc3b155d4f3a93ffe4c5b8.tar.xz rawaccel-aa04d5a61f89225a03dc3b155d4f3a93ffe4c5b8.zip | |
Fixed default values by splitting into unique text boxes
Diffstat (limited to 'grapher/Models/Options')
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 46 |
1 files changed, 26 insertions, 20 deletions
diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index 169426d..9d94787 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -31,6 +31,9 @@ namespace grapher ComboBox accelDropdown, CheckBoxOption gainSwitch, Option acceleration, + Option decayRate, + Option growthRate, + Option smooth, Option scale, Option cap, Option weight, @@ -64,6 +67,9 @@ namespace grapher GainSwitch = gainSwitch; Acceleration = acceleration; + DecayRate = decayRate; + GrowthRate = growthRate; + Smooth = smooth; Scale = scale; Cap = cap; Weight = weight; @@ -105,6 +111,12 @@ namespace grapher public Option Acceleration { get; } + public Option DecayRate { get; } + + public Option GrowthRate { get; } + + public Option Smooth { get; } + public Option Scale { get; } public Option Cap { get; } @@ -218,6 +230,9 @@ namespace grapher GainSwitch.Hide(); Acceleration.Hide(); + DecayRate.Hide(); + GrowthRate.Hide(); + Smooth.Hide(); Scale.Hide(); Cap.Hide(); Weight.Hide(); @@ -251,7 +266,10 @@ namespace grapher Weight.SetActiveValue(args.weight); Cap.SetActiveValue(args.cap); Offset.SetActiveValue(args.offset); - Acceleration.SetActiveValue(AccelerationParameterFromArgs(ref args)); + Acceleration.SetActiveValue(args.accelClassic); + DecayRate.SetActiveValue(args.decayRate); + GrowthRate.SetActiveValue(args.growthRate); + Smooth.SetActiveValue(args.smooth); Scale.SetActiveValue(args.scale); Limit.SetActiveValue(args.limit); PowerClassic.SetActiveValue(args.power); @@ -293,27 +311,12 @@ namespace grapher if (AccelerationType == Unsupported) throw new NotImplementedException(); args.mode = AccelerationType.Mode; - - if (Acceleration.Visible) - { - if (args.mode == AccelMode.natural) - { - args.decayRate = Acceleration.Field.Data; - } - else if (args.mode == AccelMode.motivity) - { - args.growthRate = Acceleration.Field.Data; - } - else - { - args.accelClassic = Acceleration.Field.Data; - } - - args.smooth = Acceleration.Field.Data; - } - args.legacy = !GainSwitch.CheckBox.Checked; + if (Acceleration.Visible) args.accelClassic = Acceleration.Field.Data; + if (DecayRate.Visible) args.decayRate = DecayRate.Field.Data; + if (GrowthRate.Visible) args.growthRate = DecayRate.Field.Data; + if (Smooth.Visible) args.smooth = DecayRate.Field.Data; if (Scale.Visible) args.scale = Scale.Field.Data; if (Cap.Visible) args.cap = Cap.Field.Data; if (Limit.Visible) args.limit = Limit.Field.Data; @@ -372,6 +375,9 @@ namespace grapher AccelerationType.Layout( GainSwitch, Acceleration, + DecayRate, + GrowthRate, + Smooth, Scale, Cap, Weight, |