summaryrefslogtreecommitdiff
path: root/grapher/Layouts
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2021-04-05 23:36:26 -0700
committerJacob Palecki <[email protected]>2021-04-05 23:36:26 -0700
commit019665015ab30893209ab49fea352405b144f0f8 (patch)
tree92b929da43466d8c4b3b3fb2d9c53daf8eb0d05a /grapher/Layouts
parentLUT GUI fixes (diff)
downloadrawaccel-019665015ab30893209ab49fea352405b144f0f8.tar.xz
rawaccel-019665015ab30893209ab49fea352405b144f0f8.zip
Add gain switch
Diffstat (limited to 'grapher/Layouts')
-rw-r--r--grapher/Layouts/ClassicLayout.cs1
-rw-r--r--grapher/Layouts/DefaultLayout.cs1
-rw-r--r--grapher/Layouts/JumpLayout.cs6
-rw-r--r--grapher/Layouts/LUTLayout.cs1
-rw-r--r--grapher/Layouts/LayoutBase.cs12
-rw-r--r--grapher/Layouts/LinearLayout.cs1
-rw-r--r--grapher/Layouts/MotivityLayout.cs1
-rw-r--r--grapher/Layouts/NaturalLayout.cs1
-rw-r--r--grapher/Layouts/OffLayout.cs1
-rw-r--r--grapher/Layouts/PowerLayout.cs5
10 files changed, 24 insertions, 6 deletions
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);