summaryrefslogtreecommitdiff
path: root/grapher/Form1.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-07-29 21:03:02 -0700
committerJacob Palecki <[email protected]>2020-07-29 21:03:02 -0700
commit36abeecf953e0efcd1ec9dcafa4bd1c554e362f5 (patch)
tree92683e3c6b6330df917b366d24c1dfa0452c70a4 /grapher/Form1.cs
parentAll single-value boxes use fields (diff)
downloadrawaccel-36abeecf953e0efcd1ec9dcafa4bd1c554e362f5.tar.xz
rawaccel-36abeecf953e0efcd1ec9dcafa4bd1c554e362f5.zip
Add FieldXY
Diffstat (limited to 'grapher/Form1.cs')
-rw-r--r--grapher/Form1.cs38
1 files changed, 11 insertions, 27 deletions
diff --git a/grapher/Form1.cs b/grapher/Form1.cs
index ef0dd3a..2bc4da7 100644
--- a/grapher/Form1.cs
+++ b/grapher/Form1.cs
@@ -20,14 +20,14 @@ namespace grapher
ManagedAcceleration = new ManagedAccel(5, 0, 0.3, 1.25, 15);
AccelerationType = 5;
- Sensitivity = new VectorXY(1);
- Rotation = new Field("0.0", rotationBox, this, 0);
- Weight = new VectorXY(1);
- Cap = new VectorXY(0);
- Offset = new Field("0.0", offsetBox, this, 0);
- Acceleration = new Field("0.0", accelerationBox, this, 0);
- LimitOrExponent = new Field("2.0", limitBox, this, 2);
- Midpoint = new Field("0.0", midpointBox, this, 0);
+ Sensitivity = new FieldXY(sensitivityBoxX, sensitivityBoxY, sensXYLock, this, 1);
+ Rotation = new Field(rotationBox, this, 0);
+ Weight = new FieldXY(weightBoxFirst, weightBoxSecond, weightXYLock, this, 1);
+ Cap = new FieldXY(capBoxX, capBoxY, capXYLock, this, 0);
+ Offset = new Field(offsetBox, this, 0);
+ Acceleration = new Field(accelerationBox, this, 0);
+ LimitOrExponent = new Field(limitBox, this, 2);
+ Midpoint = new Field(midpointBox, this, 0);
UpdateGraph();
@@ -59,13 +59,13 @@ namespace grapher
private int AccelerationType { get; set; }
- private VectorXY Sensitivity { get; set; }
+ private FieldXY Sensitivity { get; set; }
private Field Rotation { get; set; }
- private VectorXY Weight { get; set; }
+ private FieldXY Weight { get; set; }
- private VectorXY Cap { get; set; }
+ private FieldXY Cap { get; set; }
private Field Offset { get; set; }
@@ -165,22 +165,6 @@ namespace grapher
UpdateGraph();
}
- private void sensitivityBox_KeyDown(object sender, KeyEventArgs e)
- {
- if (TryHandleWithEnter(e, sender, out double data))
- {
- Sensitivity.SetBoth(data);
- }
- }
-
- private void capBox_KeyDown(object sender, KeyEventArgs e)
- {
- if (TryHandleWithEnter(e, sender, out double data))
- {
- Cap.SetBoth(data);
- }
- }
-
#endregion Methods
}
}