diff options
| author | Jacob Palecki <[email protected]> | 2020-09-29 10:08:13 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-09-29 10:08:13 -0700 |
| commit | 49675a0fa01a1d7f04a7a2e31ec1872125a0cf37 (patch) | |
| tree | ac4a331892ff777de67deb8b8be8905bb017434e /grapher | |
| parent | Use 0 for cap\offset when not visible (diff) | |
| parent | set invisible args to default values before write (diff) | |
| download | rawaccel-49675a0fa01a1d7f04a7a2e31ec1872125a0cf37.tar.xz rawaccel-49675a0fa01a1d7f04a7a2e31ec1872125a0cf37.zip | |
merge + small fixes
Diffstat (limited to 'grapher')
| -rw-r--r-- | grapher/Models/AccelGUI.cs | 2 | ||||
| -rw-r--r-- | grapher/Models/Options/AccelOptionSet.cs | 8 | ||||
| -rw-r--r-- | grapher/Models/Options/AccelTypeOptions.cs | 25 | ||||
| -rw-r--r-- | grapher/Models/Options/ApplyOptions.cs | 6 | ||||
| -rw-r--r-- | grapher/grapher.csproj | 38 | ||||
| -rw-r--r-- | grapher/mouse.ico | bin | 0 -> 112630 bytes |
6 files changed, 59 insertions, 20 deletions
diff --git a/grapher/Models/AccelGUI.cs b/grapher/Models/AccelGUI.cs index 15a0c0e..11685ee 100644 --- a/grapher/Models/AccelGUI.cs +++ b/grapher/Models/AccelGUI.cs @@ -84,7 +84,7 @@ namespace grapher }, combineMagnitudes = ApplyOptions.IsWhole, modes = ApplyOptions.GetModes(), - args = ApplyOptions.GetUpdatedArgs(ref driverSettings.args), + args = ApplyOptions.GetArgs(), minimumTime = driverSettings.minimumTime }; diff --git a/grapher/Models/Options/AccelOptionSet.cs b/grapher/Models/Options/AccelOptionSet.cs index 53c39af..11a7f10 100644 --- a/grapher/Models/Options/AccelOptionSet.cs +++ b/grapher/Models/Options/AccelOptionSet.cs @@ -98,14 +98,14 @@ namespace grapher.Models.Options Options.Top = TopAnchor; } - public void SetArgs(ref AccelArgs args, ref /*readonly*/ AccelArgs last) + public void SetArgs(ref AccelArgs args) { - Options.SetArgs(ref args, ref last); + Options.SetArgs(ref args); } - public AccelArgs GenerateArgs(ref /*readonly*/ AccelArgs last) + public AccelArgs GenerateArgs() { - return Options.GenerateArgs(ref last); + return Options.GenerateArgs(); } public void SetActiveValues(int mode, AccelArgs args) diff --git a/grapher/Models/Options/AccelTypeOptions.cs b/grapher/Models/Options/AccelTypeOptions.cs index e8d0e46..f9ecac1 100644 --- a/grapher/Models/Options/AccelTypeOptions.cs +++ b/grapher/Models/Options/AccelTypeOptions.cs @@ -225,24 +225,25 @@ namespace grapher Width = Acceleration.Field.Width; } - public void SetArgs(ref AccelArgs args, ref /*readonly*/ AccelArgs last) + public void SetArgs(ref AccelArgs args) { - args.acceleration = Acceleration.Visible ? Acceleration.Field.Data : last.acceleration; - args.scale = Scale.Visible ? Scale.Field.Data : last.scale; - args.gainCap = Cap.Visible ? Cap.VelocityGainCap : 0.0; - args.scaleCap = Cap.Visible ? Cap.SensitivityCap : 0.0; - args.limit = Limit.Visible ? Limit.Field.Data : last.limit; - args.exponent = Exponent.Visible ? Exponent.Field.Data : last.exponent; - args.offset = Offset.Visible ? Offset.Offset : 0.0; + AccelArgs defaults = (AccelArgs)DriverInterop.DefaultArgs; + args.acceleration = Acceleration.Visible ? Acceleration.Field.Data : defaults.acceleration; + args.scale = Scale.Visible ? Scale.Field.Data : defaults.scale; + args.gainCap = Cap.Visible ? Cap.VelocityGainCap : defaults.gainCap; + args.scaleCap = Cap.Visible ? Cap.SensitivityCap : defaults.scaleCap; + args.limit = Limit.Visible ? Limit.Field.Data : defaults.limit; + args.exponent = Exponent.Visible ? Exponent.Field.Data : defaults.exponent; + args.offset = Offset.Visible ? Offset.Offset : defaults.offset; args.legacyOffset = Offset.IsLegacy; - args.midpoint = Midpoint.Visible ? Midpoint.Field.Data : last.midpoint; - args.weight = Weight.Visible ? Weight.Field.Data : last.weight; + args.midpoint = Midpoint.Visible ? Midpoint.Field.Data : defaults.midpoint; + args.weight = Weight.Visible ? Weight.Field.Data : defaults.weight; } - public AccelArgs GenerateArgs(ref /*readonly*/ AccelArgs last) + public AccelArgs GenerateArgs() { AccelArgs args = new AccelArgs(); - SetArgs(ref args, ref last); + SetArgs(ref args); return args; } diff --git a/grapher/Models/Options/ApplyOptions.cs b/grapher/Models/Options/ApplyOptions.cs index 51c80ea..c2ed498 100644 --- a/grapher/Models/Options/ApplyOptions.cs +++ b/grapher/Models/Options/ApplyOptions.cs @@ -89,14 +89,14 @@ namespace grapher.Models.Options }; } - public Vec2<AccelArgs> GetUpdatedArgs(ref /*readonly*/ Vec2<AccelArgs> last) + public Vec2<AccelArgs> GetArgs() { - var xArgs = OptionSetX.GenerateArgs(ref last.x); + var xArgs = OptionSetX.GenerateArgs(); return new Vec2<AccelArgs> { x = xArgs, - y = ByComponentVectorXYLock.Checked ? xArgs : OptionSetY.GenerateArgs(ref last.y) + y = ByComponentVectorXYLock.Checked ? xArgs : OptionSetY.GenerateArgs() }; } diff --git a/grapher/grapher.csproj b/grapher/grapher.csproj index 9e9b15b..3e23226 100644 --- a/grapher/grapher.csproj +++ b/grapher/grapher.csproj @@ -12,6 +12,21 @@ <FileAlignment>512</FileAlignment> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> <Deterministic>true</Deterministic> + <PublishUrl>publish\</PublishUrl> + <Install>true</Install> + <InstallFrom>Disk</InstallFrom> + <UpdateEnabled>false</UpdateEnabled> + <UpdateMode>Foreground</UpdateMode> + <UpdateInterval>7</UpdateInterval> + <UpdateIntervalUnits>Days</UpdateIntervalUnits> + <UpdatePeriodically>false</UpdatePeriodically> + <UpdateRequired>false</UpdateRequired> + <MapFileExtensions>true</MapFileExtensions> + <ApplicationRevision>0</ApplicationRevision> + <ApplicationVersion>1.0.0.%2a</ApplicationVersion> + <IsWebBootstrapper>false</IsWebBootstrapper> + <UseApplicationTrust>false</UseApplicationTrust> + <BootstrapperEnabled>true</BootstrapperEnabled> </PropertyGroup> <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'"> <DebugSymbols>true</DebugSymbols> @@ -35,6 +50,9 @@ <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet> <Prefer32Bit>true</Prefer32Bit> </PropertyGroup> + <PropertyGroup> + <ApplicationIcon>mouse.ico</ApplicationIcon> + </PropertyGroup> <ItemGroup> <Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL"> <HintPath>..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll</HintPath> @@ -140,5 +158,25 @@ <Folder Include="Icon\" /> <Folder Include="ReadMe\" /> </ItemGroup> + <ItemGroup> + <BootstrapperPackage Include=".NETFramework,Version=v4.7.2"> + <Visible>False</Visible> + <ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName> + <Install>true</Install> + </BootstrapperPackage> + <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1"> + <Visible>False</Visible> + <ProductName>.NET Framework 3.5 SP1</ProductName> + <Install>false</Install> + </BootstrapperPackage> + </ItemGroup> + <ItemGroup> + <Content Include="mouse.ico" /> + </ItemGroup> <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <PropertyGroup> + <PostBuildEvent>IF ($(ConfigurationName)) == (Debug) GOTO END +copy /Y "$(TargetPath)" "$(SolutionDir)signed\$(TargetFileName)" +:END</PostBuildEvent> + </PropertyGroup> </Project>
\ No newline at end of file diff --git a/grapher/mouse.ico b/grapher/mouse.ico Binary files differnew file mode 100644 index 0000000..493036a --- /dev/null +++ b/grapher/mouse.ico |