summaryrefslogtreecommitdiff
path: root/grapher/Models/AccelGUI.cs
diff options
context:
space:
mode:
authorJacob Palecki <[email protected]>2020-09-02 01:02:51 -0700
committerJacob Palecki <[email protected]>2020-09-02 01:02:51 -0700
commit5b9b8ed308e7a8cefbd27b2db72d33d7b002e223 (patch)
tree0d66b20cb15f95ac795247da90d3eb1d85a54d58 /grapher/Models/AccelGUI.cs
parentSmall fixes, correctly align labels and boxes (diff)
downloadrawaccel-5b9b8ed308e7a8cefbd27b2db72d33d7b002e223.tar.xz
rawaccel-5b9b8ed308e7a8cefbd27b2db72d33d7b002e223.zip
Move optionsets to applyoptions
Diffstat (limited to 'grapher/Models/AccelGUI.cs')
-rw-r--r--grapher/Models/AccelGUI.cs24
1 files changed, 3 insertions, 21 deletions
diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs
index 891cd01..6b14672 100644
--- a/grapher/Models/AccelGUI.cs
+++ b/grapher/Models/AccelGUI.cs
@@ -27,8 +27,6 @@ namespace grapher
ApplyOptions applyOptions,
OptionXY sensitivity,
Option rotation,
- AccelOptionSet optionSetX,
- AccelOptionSet optionSetY,
Button writeButton,
Label mouseMoveLabel,
ToolStripMenuItem scaleMenuItem)
@@ -42,8 +40,6 @@ namespace grapher
WriteButton = writeButton;
ScaleMenuItem = scaleMenuItem;
Settings = settings;
- OptionSetX = optionSetX;
- OptionSetY = optionSetY;
Settings.Startup();
RefreshOnRead();
@@ -70,10 +66,6 @@ namespace grapher
public Option Rotation { get; }
- public AccelOptionSet OptionSetX { get; }
-
- public AccelOptionSet OptionSetY { get; }
-
public Button WriteButton { get; }
public MouseWatcher MouseWatcher { get; }
@@ -95,16 +87,8 @@ namespace grapher
y = Sensitivity.Fields.Y
},
combineMagnitudes = ApplyOptions.IsWhole,
- modes = new Vec2<AccelMode>
- {
- x = (AccelMode)OptionSetX.AccelTypeOptions.AccelerationIndex,
- y = (AccelMode)OptionSetY.AccelTypeOptions.AccelerationIndex
- },
- args = new Vec2<AccelArgs>
- {
- x = OptionSetX.GenerateArgs(),
- y = OptionSetY.GenerateArgs()
- },
+ modes = ApplyOptions.GetModes(),
+ args = ApplyOptions.GetArgs(),
minimumTime = .4
});
RefreshOnRead();
@@ -131,9 +115,7 @@ namespace grapher
Sensitivity.SetActiveValues(settings.sensitivity.x, settings.sensitivity.y);
Rotation.SetActiveValue(settings.rotation);
- ApplyOptions.SetActive(settings.combineMagnitudes);
- OptionSetX.SetActiveValues((int)settings.modes.x, settings.args.x);
- OptionSetY.SetActiveValues((int)settings.modes.y, settings.args.y);
+ ApplyOptions.SetActiveValues(settings);
AccelCharts.RefreshXY(settings.combineMagnitudes);
}