From 069bf5795fbf127d2a8c3233988a77aa7b2107d7 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 4 Apr 2021 23:14:39 -0700 Subject: Fix most errors from wrapper rewrite --- grapher/Layouts/LinearLayout.cs | 6 ++++-- grapher/Layouts/NaturalGainLayout.cs | 24 ------------------------ 2 files changed, 4 insertions(+), 26 deletions(-) delete mode 100644 grapher/Layouts/NaturalGainLayout.cs (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index 0412a2a..186d655 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -4,11 +4,13 @@ namespace grapher.Layouts { public class LinearLayout : LayoutBase { + public const string LinearName = "Linear"; + public LinearLayout() : base() { - Name = "Linear"; - Index = (int)AccelMode.linear; + Name = LinearName; + Index = (int)AccelMode.classic; LogarithmicCharts = false; AccelLayout = new OptionLayout(true, Acceleration); diff --git a/grapher/Layouts/NaturalGainLayout.cs b/grapher/Layouts/NaturalGainLayout.cs deleted file mode 100644 index 12daed3..0000000 --- a/grapher/Layouts/NaturalGainLayout.cs +++ /dev/null @@ -1,24 +0,0 @@ -using grapher.Models.Serialized; - -namespace grapher.Layouts -{ - public class NaturalGainLayout : LayoutBase - { - public NaturalGainLayout() - : base() - { - Name = "NaturalGain"; - Index = (int)AccelMode.naturalgain; - LogarithmicCharts = false; - - AccelLayout = new OptionLayout(true, Acceleration); - ScaleLayout = new OptionLayout(false, string.Empty); - CapLayout = new OptionLayout(false, string.Empty); - WeightLayout = new OptionLayout(true, Weight); - OffsetLayout = new OptionLayout(true, Offset); - LimitLayout = new OptionLayout(true, Limit); - ExponentLayout = new OptionLayout(false, string.Empty); - MidpointLayout = new OptionLayout(false, string.Empty); - } - } -} -- cgit v1.2.3 From 54a6f02eec23758b7f73fbf0affdedb6c4e046b7 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 4 Apr 2021 23:18:23 -0700 Subject: Fix two more errors, add LUT layout --- grapher/Layouts/LUTLayout.cs | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 grapher/Layouts/LUTLayout.cs (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs new file mode 100644 index 0000000..97bfd60 --- /dev/null +++ b/grapher/Layouts/LUTLayout.cs @@ -0,0 +1,27 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace grapher.Layouts +{ + public class LUTLayout : LayoutBase + { + public LUTLayout() + : base() + { + Name = "LookUpTable"; + Index = (int)AccelMode.lut; + + AccelLayout = new OptionLayout(false, Acceleration); + ScaleLayout = new OptionLayout(false, string.Empty); + CapLayout = new OptionLayout(false, Cap); + WeightLayout = new OptionLayout(false, Weight); + OffsetLayout = new OptionLayout(false, Offset); + LimitLayout = new OptionLayout(false, string.Empty); + ExponentLayout = new OptionLayout(false, Exponent); + MidpointLayout = new OptionLayout(false, string.Empty); + } + } +} -- cgit v1.2.3 From cf1fdf2e6cdba8c6ae8493eb744f223b6324594c Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Mon, 5 Apr 2021 20:43:08 -0700 Subject: LUT text layout --- grapher/Layouts/ClassicLayout.cs | 1 + grapher/Layouts/DefaultLayout.cs | 1 + grapher/Layouts/LUTLayout.cs | 3 +++ grapher/Layouts/LayoutBase.cs | 10 ++++++++-- grapher/Layouts/LinearLayout.cs | 1 + grapher/Layouts/MotivityLayout.cs | 1 + grapher/Layouts/NaturalLayout.cs | 1 + grapher/Layouts/OffLayout.cs | 1 + grapher/Layouts/PowerLayout.cs | 1 + 9 files changed, 18 insertions(+), 2 deletions(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/ClassicLayout.cs b/grapher/Layouts/ClassicLayout.cs index 8403c5d..c804282 100644 --- a/grapher/Layouts/ClassicLayout.cs +++ b/grapher/Layouts/ClassicLayout.cs @@ -18,6 +18,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(true, Exponent); MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs index c2f7fd7..495fac0 100644 --- a/grapher/Layouts/DefaultLayout.cs +++ b/grapher/Layouts/DefaultLayout.cs @@ -19,6 +19,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(true, Limit); ExponentLayout = new OptionLayout(true, Exponent); MidpointLayout = new OptionLayout(true, Midpoint); + LUTTextLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs index 97bfd60..7449168 100644 --- a/grapher/Layouts/LUTLayout.cs +++ b/grapher/Layouts/LUTLayout.cs @@ -8,6 +8,8 @@ namespace grapher.Layouts { public class LUTLayout : LayoutBase { + public const string LUTLayoutText = "This mode is for advanced users only. It requires a lut.json file to define the velocity curve. See the guide for specifics."; + public LUTLayout() : base() { @@ -22,6 +24,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, Exponent); MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(true, LUTLayoutText); } } } diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 83af292..1d2615d 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -55,6 +55,8 @@ namespace grapher.Layouts protected OptionLayout MidpointLayout { get; set; } + protected OptionLayout LUTTextLayout { get; set; } + public void Layout( IOption accelOption, IOption scaleOption, @@ -64,6 +66,7 @@ namespace grapher.Layouts IOption limitOption, IOption expOption, IOption midpointOption, + IOption lutTextOption, int top) { @@ -77,7 +80,8 @@ namespace grapher.Layouts (OffsetLayout, offsetOption), (LimitLayout, limitOption), (ExponentLayout, expOption), - (MidpointLayout, midpointOption)}) + (MidpointLayout, midpointOption), + (LUTTextLayout, lutTextOption)}) { option.Item1.Layout(option.Item2); @@ -105,7 +109,8 @@ namespace grapher.Layouts IOption offsetOption, IOption limitOption, IOption expOption, - IOption midpointOption) + IOption midpointOption, + IOption lutTextOption) { Layout(accelOption, scaleOption, @@ -115,6 +120,7 @@ namespace grapher.Layouts limitOption, expOption, midpointOption, + lutTextOption, accelOption.Top); } } diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index 186d655..4681ca9 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -21,6 +21,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/MotivityLayout.cs b/grapher/Layouts/MotivityLayout.cs index b06e4fc..4d7c150 100644 --- a/grapher/Layouts/MotivityLayout.cs +++ b/grapher/Layouts/MotivityLayout.cs @@ -24,6 +24,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(true, Motivity); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(true, Midpoint); + LUTTextLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index 44129f9..ac07ae5 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -19,6 +19,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(true, Limit); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs index 0b54cbb..2a361fb 100644 --- a/grapher/Layouts/OffLayout.cs +++ b/grapher/Layouts/OffLayout.cs @@ -19,6 +19,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/PowerLayout.cs b/grapher/Layouts/PowerLayout.cs index da7d5bb..ed40d67 100644 --- a/grapher/Layouts/PowerLayout.cs +++ b/grapher/Layouts/PowerLayout.cs @@ -19,6 +19,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(true, Exponent); MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(false, string.Empty); } } } -- cgit v1.2.3 From 7c1f14845bc948e9ea25908e96099203d9433a69 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Tue, 6 Apr 2021 01:21:42 -0400 Subject: update wrapper + writer to handle lut grapher is building but applying options still broken for the most part --- grapher/Layouts/JumpLayout.cs | 24 ++++++++++++++++++++++++ grapher/Layouts/LUTLayout.cs | 2 +- grapher/Layouts/LinearLayout.cs | 2 +- 3 files changed, 26 insertions(+), 2 deletions(-) create mode 100644 grapher/Layouts/JumpLayout.cs (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/JumpLayout.cs b/grapher/Layouts/JumpLayout.cs new file mode 100644 index 0000000..cb77963 --- /dev/null +++ b/grapher/Layouts/JumpLayout.cs @@ -0,0 +1,24 @@ +using grapher.Models.Serialized; + +namespace grapher.Layouts +{ + public class JumpLayout : LayoutBase + { + public JumpLayout() + : base() + { + Name = "Jump"; + Index = (int)AccelMode.jump; + LogarithmicCharts = false; + + AccelLayout = new OptionLayout(false, Acceleration); + ScaleLayout = new OptionLayout(false, string.Empty); + CapLayout = new OptionLayout(true, string.Empty); + WeightLayout = new OptionLayout(false, Weight); + OffsetLayout = new OptionLayout(true, Offset); + LimitLayout = new OptionLayout(false, Limit); + ExponentLayout = new OptionLayout(false, string.Empty); + MidpointLayout = new OptionLayout(false, string.Empty); + } + } +} diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs index 7449168..4b4b687 100644 --- a/grapher/Layouts/LUTLayout.cs +++ b/grapher/Layouts/LUTLayout.cs @@ -14,7 +14,7 @@ namespace grapher.Layouts : base() { Name = "LookUpTable"; - Index = (int)AccelMode.lut; + Index = (int)AccelMode.noaccel + 1; AccelLayout = new OptionLayout(false, Acceleration); ScaleLayout = new OptionLayout(false, string.Empty); diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index 4681ca9..d98baa5 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -16,7 +16,7 @@ namespace grapher.Layouts AccelLayout = new OptionLayout(true, Acceleration); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(true, Cap); - WeightLayout = new OptionLayout(true, Weight); + WeightLayout = new OptionLayout(false, Weight); OffsetLayout = new OptionLayout(true, Offset); LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, string.Empty); -- cgit v1.2.3 From 019665015ab30893209ab49fea352405b144f0f8 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Mon, 5 Apr 2021 23:36:26 -0700 Subject: Add gain switch --- grapher/Layouts/ClassicLayout.cs | 1 + grapher/Layouts/DefaultLayout.cs | 1 + grapher/Layouts/JumpLayout.cs | 6 ++++-- grapher/Layouts/LUTLayout.cs | 1 + grapher/Layouts/LayoutBase.cs | 12 +++++++++++- grapher/Layouts/LinearLayout.cs | 1 + grapher/Layouts/MotivityLayout.cs | 1 + grapher/Layouts/NaturalLayout.cs | 1 + grapher/Layouts/OffLayout.cs | 1 + grapher/Layouts/PowerLayout.cs | 5 ++--- 10 files changed, 24 insertions(+), 6 deletions(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/ClassicLayout.cs b/grapher/Layouts/ClassicLayout.cs index c804282..e9013b6 100644 --- a/grapher/Layouts/ClassicLayout.cs +++ b/grapher/Layouts/ClassicLayout.cs @@ -10,6 +10,7 @@ namespace grapher.Layouts Name = "Classic"; Index = (int)AccelMode.classic; + GainSwitchOptionLayout = new OptionLayout(true, Gain); AccelLayout = new OptionLayout(true, Acceleration); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(true, Cap); diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs index 495fac0..42de7f3 100644 --- a/grapher/Layouts/DefaultLayout.cs +++ b/grapher/Layouts/DefaultLayout.cs @@ -11,6 +11,7 @@ namespace grapher.Layouts Index = (int)AccelMode.noaccel; LogarithmicCharts = false; + GainSwitchOptionLayout = new OptionLayout(true, Gain); AccelLayout = new OptionLayout(true, Acceleration); ScaleLayout = new OptionLayout(true, Scale); CapLayout = new OptionLayout(true, Cap); diff --git a/grapher/Layouts/JumpLayout.cs b/grapher/Layouts/JumpLayout.cs index cb77963..d78d273 100644 --- a/grapher/Layouts/JumpLayout.cs +++ b/grapher/Layouts/JumpLayout.cs @@ -11,14 +11,16 @@ namespace grapher.Layouts Index = (int)AccelMode.jump; LogarithmicCharts = false; - AccelLayout = new OptionLayout(false, Acceleration); + GainSwitchOptionLayout = new OptionLayout(true, Gain); + AccelLayout = new OptionLayout(true, Smooth); ScaleLayout = new OptionLayout(false, string.Empty); - CapLayout = new OptionLayout(true, string.Empty); + CapLayout = new OptionLayout(true, Cap); WeightLayout = new OptionLayout(false, Weight); OffsetLayout = new OptionLayout(true, Offset); LimitLayout = new OptionLayout(false, Limit); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs index 4b4b687..fd0b75a 100644 --- a/grapher/Layouts/LUTLayout.cs +++ b/grapher/Layouts/LUTLayout.cs @@ -16,6 +16,7 @@ namespace grapher.Layouts Name = "LookUpTable"; Index = (int)AccelMode.noaccel + 1; + GainSwitchOptionLayout = new OptionLayout(false, string.Empty); AccelLayout = new OptionLayout(false, Acceleration); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(false, Cap); diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 1d2615d..6343ca2 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -14,6 +14,8 @@ namespace grapher.Layouts public const string Offset = "Offset"; public const string Cap = "Cap"; public const string Weight = "Weight"; + public const string Smooth = "Smooth"; + public const string Gain = "Gain"; public LayoutBase() { @@ -25,6 +27,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(false, string.Empty); + GainSwitchOptionLayout = new OptionLayout(false, string.Empty); LogarithmicCharts = false; } @@ -57,7 +61,10 @@ namespace grapher.Layouts protected OptionLayout LUTTextLayout { get; set; } + protected OptionLayout GainSwitchOptionLayout { get; set; } + public void Layout( + IOption gainSwitchOption, IOption accelOption, IOption scaleOption, IOption capOption, @@ -73,6 +80,7 @@ namespace grapher.Layouts IOption previous = null; foreach (var option in new (OptionLayout, IOption)[] { + (GainSwitchOptionLayout, gainSwitchOption), (AccelLayout, accelOption), (ScaleLayout, scaleOption), (CapLayout, capOption), @@ -102,6 +110,7 @@ namespace grapher.Layouts } public void Layout( + IOption gainSwitchOption, IOption accelOption, IOption scaleOption, IOption capOption, @@ -112,7 +121,8 @@ namespace grapher.Layouts IOption midpointOption, IOption lutTextOption) { - Layout(accelOption, + Layout(gainSwitchOption, + accelOption, scaleOption, capOption, weightOption, diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index d98baa5..31ae353 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -13,6 +13,7 @@ namespace grapher.Layouts Index = (int)AccelMode.classic; LogarithmicCharts = false; + GainSwitchOptionLayout = new OptionLayout(true, Gain); AccelLayout = new OptionLayout(true, Acceleration); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(true, Cap); diff --git a/grapher/Layouts/MotivityLayout.cs b/grapher/Layouts/MotivityLayout.cs index 4d7c150..d108d16 100644 --- a/grapher/Layouts/MotivityLayout.cs +++ b/grapher/Layouts/MotivityLayout.cs @@ -16,6 +16,7 @@ namespace grapher.Layouts Index = (int)AccelMode.motivity; LogarithmicCharts = true; + GainSwitchOptionLayout = new OptionLayout(true, Gain); AccelLayout = new OptionLayout(true, Acceleration); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(false, string.Empty); diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index ac07ae5..9fc54fc 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -11,6 +11,7 @@ namespace grapher.Layouts Index = (int)AccelMode.natural; LogarithmicCharts = false; + GainSwitchOptionLayout = new OptionLayout(true, Gain); AccelLayout = new OptionLayout(true, Acceleration); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(false, string.Empty); diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs index 2a361fb..9c56632 100644 --- a/grapher/Layouts/OffLayout.cs +++ b/grapher/Layouts/OffLayout.cs @@ -11,6 +11,7 @@ namespace grapher.Layouts Index = (int)AccelMode.noaccel; LogarithmicCharts = false; + GainSwitchOptionLayout = new OptionLayout(false, string.Empty); AccelLayout = new OptionLayout(false, string.Empty); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(false, string.Empty); diff --git a/grapher/Layouts/PowerLayout.cs b/grapher/Layouts/PowerLayout.cs index ed40d67..8304ccf 100644 --- a/grapher/Layouts/PowerLayout.cs +++ b/grapher/Layouts/PowerLayout.cs @@ -1,6 +1,4 @@ -using grapher.Models.Serialized; - -namespace grapher.Layouts +namespace grapher.Layouts { public class PowerLayout : LayoutBase { @@ -11,6 +9,7 @@ namespace grapher.Layouts Index = (int)AccelMode.power; LogarithmicCharts = false; + GainSwitchOptionLayout = new OptionLayout(true, Gain); AccelLayout = new OptionLayout(false, string.Empty); ScaleLayout = new OptionLayout(true, Scale); CapLayout = new OptionLayout(true, Cap); -- cgit v1.2.3 From 758de1d236f591de1d8b2fba4c58bfd8d5bbd26e Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 6 Apr 2021 18:04:28 -0700 Subject: Rename accelMotivity to growthRate --- grapher/Layouts/LayoutBase.cs | 1 + grapher/Layouts/MotivityLayout.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 6343ca2..7baf5ed 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -16,6 +16,7 @@ namespace grapher.Layouts public const string Weight = "Weight"; public const string Smooth = "Smooth"; public const string Gain = "Gain"; + public const string GrowthRate = "Growth Rate"; public LayoutBase() { diff --git a/grapher/Layouts/MotivityLayout.cs b/grapher/Layouts/MotivityLayout.cs index d108d16..e9c81f4 100644 --- a/grapher/Layouts/MotivityLayout.cs +++ b/grapher/Layouts/MotivityLayout.cs @@ -17,7 +17,7 @@ namespace grapher.Layouts LogarithmicCharts = true; GainSwitchOptionLayout = new OptionLayout(true, Gain); - AccelLayout = new OptionLayout(true, Acceleration); + AccelLayout = new OptionLayout(true, GrowthRate); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(false, string.Empty); WeightLayout = new OptionLayout(false, string.Empty); -- cgit v1.2.3 From 258fcd3bd236a787f07d7dac2049be524d86cb75 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Tue, 6 Apr 2021 23:11:20 -0700 Subject: Fix natural legacy algorithm, rename accelNatural to decayRate --- grapher/Layouts/LayoutBase.cs | 1 + grapher/Layouts/NaturalLayout.cs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 7baf5ed..d9d85b1 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -17,6 +17,7 @@ namespace grapher.Layouts public const string Smooth = "Smooth"; public const string Gain = "Gain"; public const string GrowthRate = "Growth Rate"; + public const string DecayRate = "Decay Rate"; public LayoutBase() { diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index 9fc54fc..070a249 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -12,7 +12,7 @@ namespace grapher.Layouts LogarithmicCharts = false; GainSwitchOptionLayout = new OptionLayout(true, Gain); - AccelLayout = new OptionLayout(true, Acceleration); + AccelLayout = new OptionLayout(true, DecayRate); ScaleLayout = new OptionLayout(false, string.Empty); CapLayout = new OptionLayout(false, string.Empty); WeightLayout = new OptionLayout(true, Weight); -- cgit v1.2.3 From 5e858b059436375ed1c17f7dc1b3e47a7e8e1d5d Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Wed, 7 Apr 2021 01:05:59 -0700 Subject: Add active value labels for gain switch --- grapher/Layouts/LayoutBase.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index d9d85b1..e3583c4 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -1,5 +1,4 @@ using grapher.Models.Options; -using System.Windows.Forms; namespace grapher.Layouts { -- cgit v1.2.3 From a6926be0e911b7b7637861866f41c3bca31a87a3 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Tue, 13 Apr 2021 23:59:21 -0400 Subject: move arbitrary input into settings separate arbitrary mode from spaced modes, arbitrary now deserializes from default settings file --- grapher/Layouts/ClassicLayout.cs | 2 +- grapher/Layouts/DefaultLayout.cs | 2 +- grapher/Layouts/JumpLayout.cs | 2 +- grapher/Layouts/LUTLayout.cs | 2 +- grapher/Layouts/LayoutBase.cs | 11 ++++++----- grapher/Layouts/LinearLayout.cs | 2 +- grapher/Layouts/MotivityLayout.cs | 2 +- grapher/Layouts/NaturalLayout.cs | 2 +- grapher/Layouts/OffLayout.cs | 2 +- grapher/Layouts/PowerLayout.cs | 2 +- grapher/Layouts/UnsupportedLayout.cs | 31 +++++++++++++++++++++++++++++++ 11 files changed, 46 insertions(+), 14 deletions(-) create mode 100644 grapher/Layouts/UnsupportedLayout.cs (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/ClassicLayout.cs b/grapher/Layouts/ClassicLayout.cs index e9013b6..fe5c25d 100644 --- a/grapher/Layouts/ClassicLayout.cs +++ b/grapher/Layouts/ClassicLayout.cs @@ -8,7 +8,7 @@ namespace grapher.Layouts : base() { Name = "Classic"; - Index = (int)AccelMode.classic; + Mode = AccelMode.classic; GainSwitchOptionLayout = new OptionLayout(true, Gain); AccelLayout = new OptionLayout(true, Acceleration); diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs index 42de7f3..8146255 100644 --- a/grapher/Layouts/DefaultLayout.cs +++ b/grapher/Layouts/DefaultLayout.cs @@ -8,7 +8,7 @@ namespace grapher.Layouts : base() { Name = "Default"; - Index = (int)AccelMode.noaccel; + Mode = AccelMode.noaccel; LogarithmicCharts = false; GainSwitchOptionLayout = new OptionLayout(true, Gain); diff --git a/grapher/Layouts/JumpLayout.cs b/grapher/Layouts/JumpLayout.cs index d78d273..cf5eb24 100644 --- a/grapher/Layouts/JumpLayout.cs +++ b/grapher/Layouts/JumpLayout.cs @@ -8,7 +8,7 @@ namespace grapher.Layouts : base() { Name = "Jump"; - Index = (int)AccelMode.jump; + Mode = AccelMode.jump; LogarithmicCharts = false; GainSwitchOptionLayout = new OptionLayout(true, Gain); diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs index fd0b75a..5505114 100644 --- a/grapher/Layouts/LUTLayout.cs +++ b/grapher/Layouts/LUTLayout.cs @@ -14,7 +14,7 @@ namespace grapher.Layouts : base() { Name = "LookUpTable"; - Index = (int)AccelMode.noaccel + 1; + Mode = AccelMode.lut; GainSwitchOptionLayout = new OptionLayout(false, string.Empty); AccelLayout = new OptionLayout(false, Acceleration); diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index e3583c4..900d611 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -34,11 +34,7 @@ namespace grapher.Layouts LogarithmicCharts = false; } - /// - /// Gets or sets mapping from acceleration type to identifying integer. - /// Must match accel_mode defined in rawaccel-settings.h - /// - public int Index { get; protected set; } + public AccelMode Mode { get; protected set; } public string Name { get; protected set; } @@ -64,6 +60,11 @@ namespace grapher.Layouts protected OptionLayout GainSwitchOptionLayout { get; set; } + public override string ToString() + { + return Name; + } + public void Layout( IOption gainSwitchOption, IOption accelOption, diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index 31ae353..88be3d4 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -10,7 +10,7 @@ namespace grapher.Layouts : base() { Name = LinearName; - Index = (int)AccelMode.classic; + Mode = AccelMode.classic; LogarithmicCharts = false; GainSwitchOptionLayout = new OptionLayout(true, Gain); diff --git a/grapher/Layouts/MotivityLayout.cs b/grapher/Layouts/MotivityLayout.cs index e9c81f4..7458dfc 100644 --- a/grapher/Layouts/MotivityLayout.cs +++ b/grapher/Layouts/MotivityLayout.cs @@ -13,7 +13,7 @@ namespace grapher.Layouts : base() { Name = "Motivity"; - Index = (int)AccelMode.motivity; + Mode = AccelMode.motivity; LogarithmicCharts = true; GainSwitchOptionLayout = new OptionLayout(true, Gain); diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index 070a249..ece2b00 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -8,7 +8,7 @@ namespace grapher.Layouts : base() { Name = "Natural"; - Index = (int)AccelMode.natural; + Mode = AccelMode.natural; LogarithmicCharts = false; GainSwitchOptionLayout = new OptionLayout(true, Gain); diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs index 9c56632..e802113 100644 --- a/grapher/Layouts/OffLayout.cs +++ b/grapher/Layouts/OffLayout.cs @@ -8,7 +8,7 @@ namespace grapher.Layouts : base() { Name = "Off"; - Index = (int)AccelMode.noaccel; + Mode = AccelMode.noaccel; LogarithmicCharts = false; GainSwitchOptionLayout = new OptionLayout(false, string.Empty); diff --git a/grapher/Layouts/PowerLayout.cs b/grapher/Layouts/PowerLayout.cs index 8304ccf..bb07457 100644 --- a/grapher/Layouts/PowerLayout.cs +++ b/grapher/Layouts/PowerLayout.cs @@ -6,7 +6,7 @@ : base() { Name = "Power"; - Index = (int)AccelMode.power; + Mode = AccelMode.power; LogarithmicCharts = false; GainSwitchOptionLayout = new OptionLayout(true, Gain); diff --git a/grapher/Layouts/UnsupportedLayout.cs b/grapher/Layouts/UnsupportedLayout.cs new file mode 100644 index 0000000..1607a6c --- /dev/null +++ b/grapher/Layouts/UnsupportedLayout.cs @@ -0,0 +1,31 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace grapher.Layouts +{ + public class UnsupportedLayout : LayoutBase + { + public const string LUTLayoutText = "This mode is unsupported by this program. See the guide for details."; + + public UnsupportedLayout() + : base() + { + Name = "Unsupported"; + Mode = AccelMode.noaccel + 1; + + GainSwitchOptionLayout = new OptionLayout(false, string.Empty); + AccelLayout = new OptionLayout(false, Acceleration); + ScaleLayout = new OptionLayout(false, string.Empty); + CapLayout = new OptionLayout(false, Cap); + WeightLayout = new OptionLayout(false, Weight); + OffsetLayout = new OptionLayout(false, Offset); + LimitLayout = new OptionLayout(false, string.Empty); + ExponentLayout = new OptionLayout(false, Exponent); + MidpointLayout = new OptionLayout(false, string.Empty); + LUTTextLayout = new OptionLayout(true, LUTLayoutText); + } + } +} \ No newline at end of file -- cgit v1.2.3 From 0af5b1d23be9ecfb0134c957197cfd8f838b7998 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 25 Apr 2021 21:57:25 -0700 Subject: Fixed layout issues for LUT --- grapher/Layouts/LUTLayout.cs | 7 +++++++ grapher/Layouts/LayoutBase.cs | 2 ++ 2 files changed, 9 insertions(+) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs index 5505114..1ca5915 100644 --- a/grapher/Layouts/LUTLayout.cs +++ b/grapher/Layouts/LUTLayout.cs @@ -10,6 +10,11 @@ namespace grapher.Layouts { public const string LUTLayoutText = "This mode is for advanced users only. It requires a lut.json file to define the velocity curve. See the guide for specifics."; + /// + /// String small enough to fit in active value label + /// + public const string LUTActiveName = "LUT"; + public LUTLayout() : base() { @@ -27,5 +32,7 @@ namespace grapher.Layouts MidpointLayout = new OptionLayout(false, string.Empty); LUTTextLayout = new OptionLayout(true, LUTLayoutText); } + + public override string ActiveName => LUTActiveName; } } diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 900d611..82d10d8 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -38,6 +38,8 @@ namespace grapher.Layouts public string Name { get; protected set; } + public virtual string ActiveName { get => Name; } + public bool LogarithmicCharts { get; protected set; } protected OptionLayout AccelLayout { get; set; } -- cgit v1.2.3 From 0cf5ce3762926fa556418572e9661d79cbbaa240 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Sun, 25 Apr 2021 23:05:44 -0700 Subject: Start of LUT points editing --- grapher/Layouts/ClassicLayout.cs | 3 ++- grapher/Layouts/DefaultLayout.cs | 3 ++- grapher/Layouts/JumpLayout.cs | 3 ++- grapher/Layouts/LUTLayout.cs | 5 +++-- grapher/Layouts/LayoutBase.cs | 15 +++++++++++---- grapher/Layouts/LinearLayout.cs | 3 ++- grapher/Layouts/MotivityLayout.cs | 3 ++- grapher/Layouts/NaturalLayout.cs | 3 ++- grapher/Layouts/OffLayout.cs | 3 ++- grapher/Layouts/PowerLayout.cs | 3 ++- grapher/Layouts/UnsupportedLayout.cs | 3 ++- 11 files changed, 32 insertions(+), 15 deletions(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/ClassicLayout.cs b/grapher/Layouts/ClassicLayout.cs index fe5c25d..ca9195e 100644 --- a/grapher/Layouts/ClassicLayout.cs +++ b/grapher/Layouts/ClassicLayout.cs @@ -19,7 +19,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(true, Exponent); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/DefaultLayout.cs b/grapher/Layouts/DefaultLayout.cs index 8146255..055536a 100644 --- a/grapher/Layouts/DefaultLayout.cs +++ b/grapher/Layouts/DefaultLayout.cs @@ -20,7 +20,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(true, Limit); ExponentLayout = new OptionLayout(true, Exponent); MidpointLayout = new OptionLayout(true, Midpoint); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/JumpLayout.cs b/grapher/Layouts/JumpLayout.cs index cf5eb24..4e34ef3 100644 --- a/grapher/Layouts/JumpLayout.cs +++ b/grapher/Layouts/JumpLayout.cs @@ -20,7 +20,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, Limit); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs index 1ca5915..37c336e 100644 --- a/grapher/Layouts/LUTLayout.cs +++ b/grapher/Layouts/LUTLayout.cs @@ -8,7 +8,7 @@ namespace grapher.Layouts { public class LUTLayout : LayoutBase { - public const string LUTLayoutText = "This mode is for advanced users only. It requires a lut.json file to define the velocity curve. See the guide for specifics."; + public const string LUTLayoutText = "This mode is for advanced users only. We recommend setting points in the settings file with a script."; /// /// String small enough to fit in active value label @@ -30,7 +30,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, Exponent); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(true, LUTLayoutText); + LutTextLayout = new OptionLayout(true, LUTLayoutText); + LutPanelLayout = new OptionLayout(true, string.Empty); } public override string ActiveName => LUTActiveName; diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index 82d10d8..bc207d3 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -28,7 +28,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); GainSwitchOptionLayout = new OptionLayout(false, string.Empty); LogarithmicCharts = false; @@ -58,7 +59,9 @@ namespace grapher.Layouts protected OptionLayout MidpointLayout { get; set; } - protected OptionLayout LUTTextLayout { get; set; } + protected OptionLayout LutTextLayout { get; set; } + + protected OptionLayout LutPanelLayout { get; set; } protected OptionLayout GainSwitchOptionLayout { get; set; } @@ -78,6 +81,7 @@ namespace grapher.Layouts IOption expOption, IOption midpointOption, IOption lutTextOption, + IOption lutPanelOption, int top) { @@ -93,7 +97,8 @@ namespace grapher.Layouts (LimitLayout, limitOption), (ExponentLayout, expOption), (MidpointLayout, midpointOption), - (LUTTextLayout, lutTextOption)}) + (LutTextLayout, lutTextOption), + (LutPanelLayout, lutPanelOption)}) { option.Item1.Layout(option.Item2); @@ -123,7 +128,8 @@ namespace grapher.Layouts IOption limitOption, IOption expOption, IOption midpointOption, - IOption lutTextOption) + IOption lutTextOption, + IOption lutPanelOption) { Layout(gainSwitchOption, accelOption, @@ -135,6 +141,7 @@ namespace grapher.Layouts expOption, midpointOption, lutTextOption, + lutPanelOption, accelOption.Top); } } diff --git a/grapher/Layouts/LinearLayout.cs b/grapher/Layouts/LinearLayout.cs index 88be3d4..6447833 100644 --- a/grapher/Layouts/LinearLayout.cs +++ b/grapher/Layouts/LinearLayout.cs @@ -22,7 +22,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/MotivityLayout.cs b/grapher/Layouts/MotivityLayout.cs index 7458dfc..7ab2f3f 100644 --- a/grapher/Layouts/MotivityLayout.cs +++ b/grapher/Layouts/MotivityLayout.cs @@ -25,7 +25,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(true, Motivity); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(true, Midpoint); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/NaturalLayout.cs b/grapher/Layouts/NaturalLayout.cs index ece2b00..245a37b 100644 --- a/grapher/Layouts/NaturalLayout.cs +++ b/grapher/Layouts/NaturalLayout.cs @@ -20,7 +20,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(true, Limit); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/OffLayout.cs b/grapher/Layouts/OffLayout.cs index e802113..16e5c19 100644 --- a/grapher/Layouts/OffLayout.cs +++ b/grapher/Layouts/OffLayout.cs @@ -20,7 +20,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, string.Empty); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/PowerLayout.cs b/grapher/Layouts/PowerLayout.cs index bb07457..bf40c24 100644 --- a/grapher/Layouts/PowerLayout.cs +++ b/grapher/Layouts/PowerLayout.cs @@ -18,7 +18,8 @@ LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(true, Exponent); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(false, string.Empty); + LutTextLayout = new OptionLayout(false, string.Empty); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } diff --git a/grapher/Layouts/UnsupportedLayout.cs b/grapher/Layouts/UnsupportedLayout.cs index 1607a6c..c17812d 100644 --- a/grapher/Layouts/UnsupportedLayout.cs +++ b/grapher/Layouts/UnsupportedLayout.cs @@ -25,7 +25,8 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, Exponent); MidpointLayout = new OptionLayout(false, string.Empty); - LUTTextLayout = new OptionLayout(true, LUTLayoutText); + LutTextLayout = new OptionLayout(true, LUTLayoutText); + LutPanelLayout = new OptionLayout(false, string.Empty); } } } \ No newline at end of file -- cgit v1.2.3 From abbe20f63aded56c4714766ca1b93183eafa062a Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Wed, 30 Jun 2021 00:01:26 -0700 Subject: Add class for LUT apply type --- grapher/Layouts/LUTLayout.cs | 3 ++- grapher/Layouts/LayoutBase.cs | 11 +++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs index 37c336e..e570f6a 100644 --- a/grapher/Layouts/LUTLayout.cs +++ b/grapher/Layouts/LUTLayout.cs @@ -8,7 +8,7 @@ namespace grapher.Layouts { public class LUTLayout : LayoutBase { - public const string LUTLayoutText = "This mode is for advanced users only. We recommend setting points in the settings file with a script."; + public const string LUTLayoutText = "This mode is for advanced users only. Format: x1,y1;x2,y2;...xn,yn;"; /// /// String small enough to fit in active value label @@ -32,6 +32,7 @@ namespace grapher.Layouts MidpointLayout = new OptionLayout(false, string.Empty); LutTextLayout = new OptionLayout(true, LUTLayoutText); LutPanelLayout = new OptionLayout(true, string.Empty); + LutApplyOptionsLayout = new OptionLayout(true, string.Empty); } public override string ActiveName => LUTActiveName; diff --git a/grapher/Layouts/LayoutBase.cs b/grapher/Layouts/LayoutBase.cs index bc207d3..db914dc 100644 --- a/grapher/Layouts/LayoutBase.cs +++ b/grapher/Layouts/LayoutBase.cs @@ -30,6 +30,7 @@ namespace grapher.Layouts MidpointLayout = new OptionLayout(false, string.Empty); LutTextLayout = new OptionLayout(false, string.Empty); LutPanelLayout = new OptionLayout(false, string.Empty); + LutApplyOptionsLayout = new OptionLayout(false, string.Empty); GainSwitchOptionLayout = new OptionLayout(false, string.Empty); LogarithmicCharts = false; @@ -63,6 +64,8 @@ namespace grapher.Layouts protected OptionLayout LutPanelLayout { get; set; } + protected OptionLayout LutApplyOptionsLayout { get; set; } + protected OptionLayout GainSwitchOptionLayout { get; set; } public override string ToString() @@ -82,6 +85,7 @@ namespace grapher.Layouts IOption midpointOption, IOption lutTextOption, IOption lutPanelOption, + IOption lutApplyOption, int top) { @@ -98,7 +102,8 @@ namespace grapher.Layouts (ExponentLayout, expOption), (MidpointLayout, midpointOption), (LutTextLayout, lutTextOption), - (LutPanelLayout, lutPanelOption)}) + (LutPanelLayout, lutPanelOption), + (LutApplyOptionsLayout, lutApplyOption)}) { option.Item1.Layout(option.Item2); @@ -129,7 +134,8 @@ namespace grapher.Layouts IOption expOption, IOption midpointOption, IOption lutTextOption, - IOption lutPanelOption) + IOption lutPanelOption, + IOption lutApplyOption) { Layout(gainSwitchOption, accelOption, @@ -142,6 +148,7 @@ namespace grapher.Layouts midpointOption, lutTextOption, lutPanelOption, + lutApplyOption, accelOption.Top); } } -- cgit v1.2.3 From 308eed9ce9ed48984323e6512546a2ffeb195b14 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Thu, 1 Jul 2021 22:32:55 -0700 Subject: LUT Panel formatting --- grapher/Layouts/LUTLayout.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'grapher/Layouts') diff --git a/grapher/Layouts/LUTLayout.cs b/grapher/Layouts/LUTLayout.cs index e570f6a..1e0037f 100644 --- a/grapher/Layouts/LUTLayout.cs +++ b/grapher/Layouts/LUTLayout.cs @@ -8,8 +8,6 @@ namespace grapher.Layouts { public class LUTLayout : LayoutBase { - public const string LUTLayoutText = "This mode is for advanced users only. Format: x1,y1;x2,y2;...xn,yn;"; - /// /// String small enough to fit in active value label /// @@ -30,7 +28,7 @@ namespace grapher.Layouts LimitLayout = new OptionLayout(false, string.Empty); ExponentLayout = new OptionLayout(false, Exponent); MidpointLayout = new OptionLayout(false, string.Empty); - LutTextLayout = new OptionLayout(true, LUTLayoutText); + LutTextLayout = new OptionLayout(true, string.Empty); LutPanelLayout = new OptionLayout(true, string.Empty); LutApplyOptionsLayout = new OptionLayout(true, string.Empty); } -- cgit v1.2.3