From 01f870a493378a62ab76dcbf5dc37c0390ca7afe Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Thu, 3 Sep 2020 19:36:44 -0700 Subject: Refactor for nice gain offset --- grapher/Models/AccelGUI.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'grapher/Models/AccelGUI.cs') diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 7a32b4e..1657074 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -120,6 +120,7 @@ namespace grapher x = new AccelArgs { offset = Offset.Field.Data, + legacy_offset = 0, weight = Weight.Fields.X, gainCap = Cap.VelocityGainCap, scaleCap = Cap.SensitivityCapX, -- cgit v1.2.3 From 2fbc4b3d504962c2462d7aec98f5f389e5333164 Mon Sep 17 00:00:00 2001 From: Jacob Palecki Date: Thu, 3 Sep 2020 20:10:43 -0700 Subject: Add offset options to GUI, make gain options default --- grapher/Models/AccelGUI.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'grapher/Models/AccelGUI.cs') diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 1657074..a7d5d49 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -1,5 +1,6 @@ using grapher.Models.Calculations; using grapher.Models.Mouse; +using grapher.Models.Options; using grapher.Models.Serialized; using System; using System.CodeDom; @@ -28,7 +29,7 @@ namespace grapher Option rotation, OptionXY weight, CapOptions cap, - Option offset, + OffsetOptions offset, Option acceleration, Option limtOrExp, Option midpoint, @@ -82,7 +83,7 @@ namespace grapher public CapOptions Cap { get; } - public Option Offset { get; } + public OffsetOptions Offset { get; } public Option Acceleration { get; } @@ -119,8 +120,8 @@ namespace grapher { x = new AccelArgs { - offset = Offset.Field.Data, - legacy_offset = 0, + offset = Offset.Offset, + legacy_offset = Offset.LegacyOffset, weight = Weight.Fields.X, gainCap = Cap.VelocityGainCap, scaleCap = Cap.SensitivityCapX, @@ -163,7 +164,7 @@ namespace grapher Sensitivity.SetActiveValues(settings.sensitivity.x, settings.sensitivity.y); Rotation.SetActiveValue(settings.rotation); AccelerationOptions.SetActiveValue((int)settings.modes.x); - Offset.SetActiveValue(settings.args.x.offset); + Offset.SetActiveValue(settings.args.x.offset, settings.args.y.offset); Weight.SetActiveValues(settings.args.x.weight, settings.args.x.weight); Acceleration.SetActiveValue(settings.args.x.accel); // rate, powerscale LimitOrExponent.SetActiveValue(settings.args.x.limit); //exp, powerexp -- cgit v1.2.3