summaryrefslogtreecommitdiff
path: root/grapher/Models/AccelGUIFactory.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-07 15:19:39 -0700
committerJacob Palecki <[email protected]>2020-09-07 15:19:39 -0700
commitaff3a066575f4bfa429f67a5104a1fcffc5f326e (patch)
tree975c8cf984e97d818ebf530b68a246f4a4b1aefb /grapher/Models/AccelGUIFactory.cs
parentPass args by ref for setting (diff)
downloadrawaccel-aff3a066575f4bfa429f67a5104a1fcffc5f326e.tar.xz
rawaccel-aff3a066575f4bfa429f67a5104a1fcffc5f326e.zip
Refactor type options
Diffstat (limited to 'grapher/Models/AccelGUIFactory.cs')
-rw-r--r--grapher/Models/AccelGUIFactory.cs59
1 files changed, 20 insertions, 39 deletions
diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs
index 230b64d..5d52f2e 100644
--- a/grapher/Models/AccelGUIFactory.cs
+++ b/grapher/Models/AccelGUIFactory.cs
@@ -185,7 +185,6 @@ namespace grapher.Models
legacyOffsetToolStripMenuItem,
offsetY);
- // The name and layout of these options is handled by AccelerationOptions object.
var accelerationX = new Option(
new Field(accelerationBoxX, form, 0),
constantOneLabelX,
@@ -222,34 +221,6 @@ namespace grapher.Models
new ActiveValueLabel(midpointActiveLabelY, activeValueTitle),
optionSetYLeft);
- var accelerationOptionsX = new AccelTypeOptions(
- accelTypeDropX,
- new Option[]
- {
- offsetX,
- accelerationX,
- limitOrExponentX,
- midpointX,
- capX,
- weightX
- },
- writeButton,
- new ActiveValueLabel(accelTypeActiveLabelX, activeValueTitle));
-
- var accelerationOptionsY = new AccelTypeOptions(
- accelTypeDropY,
- new Option[]
- {
- offsetY,
- accelerationY,
- limitOrExponentY,
- midpointY,
- capY,
- weightY
- },
- writeButton,
- new ActiveValueLabel(accelTypeActiveLabelY, activeValueTitle));
-
var capOptionsX = new CapOptions(
velocityGainCapToolStripMenuItem,
legacyCapToolStripMenuItem,
@@ -260,27 +231,37 @@ namespace grapher.Models
legacyCapToolStripMenuItem,
capY);
- var optionsSetX = new AccelOptionSet(
- optionSetXTitle,
- rotationBox.Top + rotationBox.Height + Constants.OptionVerticalSeperation,
- accelerationOptionsX,
+ var accelerationOptionsX = new AccelTypeOptions(
+ accelTypeDropX,
accelerationX,
capOptionsX,
weightX,
offsetOptionsX,
limitOrExponentX,
- midpointX);
+ midpointX,
+ writeButton,
+ new ActiveValueLabel(accelTypeActiveLabelX, activeValueTitle));
- var optionsSetY = new AccelOptionSet(
- optionSetYTitle,
- rotationBox.Top + rotationBox.Height + Constants.OptionVerticalSeperation,
- accelerationOptionsY,
+ var accelerationOptionsY = new AccelTypeOptions(
+ accelTypeDropY,
accelerationY,
capOptionsY,
weightY,
offsetOptionsY,
limitOrExponentY,
- midpointY);
+ midpointY,
+ writeButton,
+ new ActiveValueLabel(accelTypeActiveLabelY, activeValueTitle));
+
+ var optionsSetX = new AccelOptionSet(
+ optionSetXTitle,
+ rotationBox.Top + rotationBox.Height + Constants.OptionVerticalSeperation,
+ accelerationOptionsX);
+
+ var optionsSetY = new AccelOptionSet(
+ optionSetYTitle,
+ rotationBox.Top + rotationBox.Height + Constants.OptionVerticalSeperation,
+ accelerationOptionsY);
var applyOptions = new ApplyOptions(
wholeVectorToolStripMenuItem,