summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2021-04-05 20:43:08 -0700
committerJacob Palecki <[email protected]>2021-04-05 20:43:08 -0700
commitcf1fdf2e6cdba8c6ae8493eb744f223b6324594c (patch)
treea38093e20708920dff4798f682c9c003a3694ffc
parentIt builds (diff)
downloadrawaccel-cf1fdf2e6cdba8c6ae8493eb744f223b6324594c.tar.xz
rawaccel-cf1fdf2e6cdba8c6ae8493eb744f223b6324594c.zip
LUT text layout
-rw-r--r--grapher/Form1.Designer.cs12
-rw-r--r--grapher/Form1.cs1
-rw-r--r--grapher/Layouts/ClassicLayout.cs1
-rw-r--r--grapher/Layouts/DefaultLayout.cs1
-rw-r--r--grapher/Layouts/LUTLayout.cs3
-rw-r--r--grapher/Layouts/LayoutBase.cs10
-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.cs1
-rw-r--r--grapher/Models/AccelGUIFactory.cs5
-rw-r--r--grapher/Models/Options/AccelTypeOptions.cs8
13 files changed, 43 insertions, 3 deletions
diff --git a/grapher/Form1.Designer.cs b/grapher/Form1.Designer.cs
index 20af913..1fbe28b 100644
--- a/grapher/Form1.Designer.cs
+++ b/grapher/Form1.Designer.cs
@@ -71,6 +71,7 @@ namespace grapher
System.Windows.Forms.DataVisualization.Charting.Title title6 = new System.Windows.Forms.DataVisualization.Charting.Title();
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RawAcceleration));
this.optionsPanel = new System.Windows.Forms.Panel();
+ this.LUTTextLabel = new System.Windows.Forms.Label();
this.FakeBox = new System.Windows.Forms.CheckBox();
this.DirectionalityPanel = new System.Windows.Forms.Panel();
this.LpNormActiveValue = new System.Windows.Forms.Label();
@@ -203,6 +204,7 @@ namespace grapher
// optionsPanel
//
this.optionsPanel.AutoSize = true;
+ this.optionsPanel.Controls.Add(this.LUTTextLabel);
this.optionsPanel.Controls.Add(this.FakeBox);
this.optionsPanel.Controls.Add(this.DirectionalityPanel);
this.optionsPanel.Controls.Add(this.toggleButton);
@@ -283,6 +285,15 @@ namespace grapher
this.optionsPanel.Size = new System.Drawing.Size(483, 956);
this.optionsPanel.TabIndex = 34;
//
+ // LUTTextLabel
+ //
+ this.LUTTextLabel.AutoSize = true;
+ this.LUTTextLabel.Location = new System.Drawing.Point(38, 350);
+ this.LUTTextLabel.Name = "LUTTextLabel";
+ this.LUTTextLabel.Size = new System.Drawing.Size(52, 13);
+ this.LUTTextLabel.TabIndex = 152;
+ this.LUTTextLabel.Text = "LUT Text";
+ //
// FakeBox
//
this.FakeBox.AutoSize = true;
@@ -1642,6 +1653,7 @@ namespace grapher
private System.Windows.Forms.Label RangeActiveValueY;
private System.Windows.Forms.CheckBox FakeBox;
private System.Windows.Forms.ToolStripMenuItem UseSpecificDeviceMenuItem;
+ private System.Windows.Forms.Label LUTTextLabel;
}
}
diff --git a/grapher/Form1.cs b/grapher/Form1.cs
index 12fc9ff..5b13c8f 100644
--- a/grapher/Form1.cs
+++ b/grapher/Form1.cs
@@ -120,6 +120,7 @@ namespace grapher
limitLabelY,
expLabelX,
expLabelY,
+ LUTTextLabel,
constantThreeLabelX,
constantThreeLabelY,
ActiveValueTitle,
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);
}
}
}
diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs
index 1c42c76..c8446f0 100644
--- a/grapher/Models/AccelGUIFactory.cs
+++ b/grapher/Models/AccelGUIFactory.cs
@@ -85,6 +85,7 @@ namespace grapher.Models
Label limitLabelY,
Label expLabelX,
Label expLabelY,
+ Label lutTextLabel,
Label constantThreeLabelX,
Label constantThreeLabelY,
Label activeValueTitleX,
@@ -332,6 +333,8 @@ namespace grapher.Models
legacyCapToolStripMenuItem,
capY);
+ var lutText = new TextOption(lutTextLabel);
+
var accelerationOptionsX = new AccelTypeOptions(
accelTypeDropX,
accelerationX,
@@ -342,6 +345,7 @@ namespace grapher.Models
limitX,
exponentX,
midpointX,
+ lutText,
writeButton,
new ActiveValueLabel(accelTypeActiveLabelX, activeValueTitleX));
@@ -355,6 +359,7 @@ namespace grapher.Models
limitY,
exponentY,
midpointY,
+ lutText,
writeButton,
new ActiveValueLabel(accelTypeActiveLabelY, activeValueTitleY));
diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs
index aeada3f..7e2e3d7 100644
--- a/grapher/Models/Options/AccelTypeOptions.cs
+++ b/grapher/Models/Options/AccelTypeOptions.cs
@@ -19,7 +19,8 @@ namespace grapher
new NaturalLayout(),
new PowerLayout(),
new MotivityLayout(),
- new OffLayout()
+ new OffLayout(),
+ new LUTLayout(),
}.ToDictionary(k => k.Name);
public static readonly ManagedAccel DefaultSettings = new ManagedAccel();
@@ -38,6 +39,7 @@ namespace grapher
Option limit,
Option exponent,
Option midpoint,
+ TextOption lutText,
Button writeButton,
ActiveValueLabel accelTypeActiveValue)
{
@@ -56,6 +58,7 @@ namespace grapher
Midpoint = midpoint;
WriteButton = writeButton;
AccelTypeActiveValue = accelTypeActiveValue;
+ LutText = lutText;
AccelTypeActiveValue.Left = AccelDropdown.Left + AccelDropdown.Width;
AccelTypeActiveValue.Height = AccelDropdown.Height;
@@ -101,6 +104,8 @@ namespace grapher
public Option Midpoint { get; }
+ public TextOption LutText { get; }
+
public override int Top
{
get
@@ -290,6 +295,7 @@ namespace grapher
Limit,
Exponent,
Midpoint,
+ LutText,
top);
}