diff options
| author | a1xd <[email protected]> | 2021-09-19 02:08:06 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2021-09-23 22:37:02 -0400 |
| commit | 4c4eabc0cb85cfef22900773649d96f610bb25dc (patch) | |
| tree | 3a2918f93b7fcfb856b6f00c8399fece3860f8b7 /grapher/Models | |
| parent | fix input checks (diff) | |
| download | rawaccel-4c4eabc0cb85cfef22900773649d96f610bb25dc.tar.xz rawaccel-4c4eabc0cb85cfef22900773649d96f610bb25dc.zip | |
fix jump fields
Diffstat (limited to 'grapher/Models')
| -rw-r--r-- | grapher/Models/AccelGUIFactory.cs | 52 | ||||
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 19 |
2 files changed, 71 insertions, 0 deletions
diff --git a/grapher/Models/AccelGUIFactory.cs b/grapher/Models/AccelGUIFactory.cs index bb65541..e7ae672 100644 --- a/grapher/Models/AccelGUIFactory.cs +++ b/grapher/Models/AccelGUIFactory.cs @@ -54,6 +54,10 @@ namespace grapher.Models TextBox inCapBoxYPower, TextBox outCapBoxXPower, TextBox outCapBoxYPower, + TextBox inputJumpBoxX, + TextBox inputJumpBoxY, + TextBox outputJumpBoxX, + TextBox outputJumpBoxY, TextBox inputOffsetBoxX, TextBox inputOffsetBoxY, TextBox outputOffsetBoxX, @@ -108,6 +112,10 @@ namespace grapher.Models Label outCapLabelYPower, Label capTypeLabelXPower, Label capTypeLabelYPower, + Label inputJumpLabelX, + Label inputJumpLabelY, + Label outputJumpLabelX, + Label outputJumpLabelY, Label inputOffsetLabelX, Label inputOffsetLabelY, Label outputOffsetLabelX, @@ -149,6 +157,10 @@ namespace grapher.Models Label outCapActiveYLabelPower, Label capTypeActiveXLabelPower, Label capTypeActiveYLabelPower, + Label inputJumpActiveLabelX, + Label inputJumpActiveLabelY, + Label outputJumpActiveLabelX, + Label outputJumpActiveLabelY, Label inputOffsetActiveLabelX, Label inputOffsetActiveLabelY, Label outputOffsetActiveLabelX, @@ -247,6 +259,42 @@ namespace grapher.Models var directionalityLeft = directionalityPanel.Left; + var inputJumpX = new Option( + inputJumpBoxX, + form, + 0, + inputJumpLabelX, + 0, + new ActiveValueLabel(inputJumpActiveLabelX, activeValueTitleX), + "Jump"); + + var inputJumpY = new Option( + inputJumpBoxY, + form, + 0, + inputJumpLabelY, + optionSetYLeft, + new ActiveValueLabel(inputJumpActiveLabelY, activeValueTitleY), + "Jump"); + + var outputJumpX = new Option( + outputJumpBoxX, + form, + 0, + outputJumpLabelX, + 0, + new ActiveValueLabel(outputJumpActiveLabelX, activeValueTitleX), + "Jump"); + + var outputJumpY = new Option( + outputJumpBoxY, + form, + 0, + outputJumpLabelY, + optionSetYLeft, + new ActiveValueLabel(outputJumpActiveLabelY, activeValueTitleY), + "Jump"); + var inputOffsetX = new Option( inputOffsetBoxX, form, @@ -556,10 +604,12 @@ namespace grapher.Models gainSwitchOptionX, classicCapOptionsX, powerCapOptionsX, + outputJumpX, outputOffsetX, decayRateX, growthRateX, smoothX, + inputJumpX, inputOffsetX, limitX, powerClassicX, @@ -579,10 +629,12 @@ namespace grapher.Models gainSwitchOptionY, classicCapOptionsY, powerCapOptionsY, + outputJumpY, outputOffsetY, decayRateY, growthRateY, smoothY, + inputJumpY, inputOffsetY, limitY, powerClassicY, diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index f079542..359b6b8 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -29,10 +29,12 @@ namespace grapher CheckBoxOption gainSwitch, CapOptions classicCap, CapOptions powerCap, + Option outputJump, Option outputOffset, Option decayRate, Option growthRate, Option smooth, + Option inputJump, Option inputOffset, Option limit, Option powerClassic, @@ -67,10 +69,12 @@ namespace grapher Smooth = smooth; ClassicCap = classicCap; PowerCap = powerCap; + InputJump = inputJump; InputOffset = inputOffset; Limit = limit; PowerClassic = powerClassic; Exponent = exponent; + OutputJump = outputJump; OutputOffset = outputOffset; Midpoint = midpoint; WriteButton = writeButton; @@ -114,6 +118,10 @@ namespace grapher public CapOptions PowerCap { get; } + public Option InputJump { get; } + + public Option OutputJump { get; } + public Option InputOffset { get; } public Option OutputOffset { get; } @@ -229,6 +237,8 @@ namespace grapher PowerCap.Hide(); OutputOffset.Hide(); InputOffset.Hide(); + InputJump.Hide(); + OutputJump.Hide(); Limit.Hide(); PowerClassic.Hide(); Exponent.Hide(); @@ -265,6 +275,8 @@ namespace grapher args.cap.x, args.cap.y, args.capMode); + InputJump.SetActiveValue(args.cap.x); + OutputJump.SetActiveValue(args.cap.y); OutputOffset.SetActiveValue(args.outputOffset); InputOffset.SetActiveValue(args.inputOffset); DecayRate.SetActiveValue(args.decayRate); @@ -329,6 +341,8 @@ namespace grapher args.cap.y = PowerCap.Out.Field.Data; args.capMode = PowerCap.CapTypeOptions.GetSelectedCapMode(); } + if (InputJump.Visible) args.cap.x = InputJump.Field.Data; + if (OutputJump.Visible) args.cap.y = OutputJump.Field.Data; if (Limit.Visible) { if (args.mode == AccelMode.motivity) @@ -344,6 +358,7 @@ namespace grapher if (Exponent.Visible) args.exponentPower = Exponent.Field.Data; if (InputOffset.Visible) args.inputOffset = InputOffset.Field.Data; if (OutputOffset.Visible) args.outputOffset = OutputOffset.Field.Data; + if (Midpoint.Visible) args.midpoint = Midpoint.Field.Data; if (LutPanel.Visible) { @@ -372,6 +387,8 @@ namespace grapher PowerCap.AlignActiveValues(); OutputOffset.AlignActiveValues(); InputOffset.AlignActiveValues(); + OutputJump.AlignActiveValues(); + InputJump.AlignActiveValues(); Limit.AlignActiveValues(); PowerClassic.AlignActiveValues(); Exponent.AlignActiveValues(); @@ -408,10 +425,12 @@ namespace grapher DecayRate, GrowthRate, Smooth, + InputJump, InputOffset, Limit, PowerClassic, Exponent, + OutputJump, OutputOffset, Midpoint, LutText, |