Skip to content

Commit

Permalink
Merge pull request #33 from a1xd/1.1
Browse files Browse the repository at this point in the history
1.1
  • Loading branch information
a1xd authored Oct 9, 2020
2 parents f7f598f + bcacf97 commit f4c04b4
Show file tree
Hide file tree
Showing 20 changed files with 1,382 additions and 1,268 deletions.
4 changes: 3 additions & 1 deletion doc/Guide.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
# Raw Accel Guide

## Installation
Run `installer.exe` in the release directory to install the Raw Accel driver. Restart your computer for the installation to take effect.

Run `installer.exe` in the release directory to install the Raw Accel driver. Restart your computer for the installation to take effect.
* If you encounter a `VCRUNTIME` related system error, [download and install the latest version from Microsoft.](https://aka.ms/vs/16/release/vc_redist.x64.exe)

Run `uninstaller.exe` in the release directory to uninstall the driver. Restart for the uninstallation to take effect.

Expand Down
14 changes: 11 additions & 3 deletions grapher/Constants/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,9 @@ public static class Constants
public const int NarrowChartLeft = 482;

/// <summary> Vertical placement of write button above bottom of sensitivity graph </summary>
public const int WriteButtonVerticalOffset = 80;
public const int ButtonVerticalOffset = 60;

public const float SmallButtonSizeFactor = 0.666f;

/// <summary> Format string for shortened x and y textboxes. </summary>
public const string ShortenedFormatString = "0.###";
Expand All @@ -84,9 +86,12 @@ public static class Constants
/// <summary> Default text to be displayed on write button. </summary>
public const string WriteButtonDefaultText = "Apply";

/// <summary> Default text to be displayed on write button. </summary>
public const string WriteButtonDelayText = "Delay";
/// <summary> Default text to be displayed on toggle button. </summary>
public const string ToggleButtonDefaultText = "Toggle";

/// <summary> Default text to be displayed on button delay. </summary>
public const string ButtonDelayText = "Delay";

/// <summary> Title of sensitivity chart. </summary>
public const string SensitivityChartTitle = "Sensitivity";

Expand All @@ -112,6 +117,9 @@ public static class Constants
/// <summary> Color of font in active value labels. </summary>
public static readonly Color ActiveValueFontColor = Color.FromArgb(255, 65, 65, 65);

public static readonly Point Origin = new Point(0);
public static readonly Size MaxSize = new Size(9999, 9999);

#endregion ReadOnly
}
}
2,180 changes: 1,100 additions & 1,080 deletions grapher/Form1.Designer.cs

Large diffs are not rendered by default.

26 changes: 25 additions & 1 deletion grapher/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ public RawAcceleration()
accelTypeDropX,
accelTypeDropY,
writeButton,
toggleButton,
showVelocityGainToolStripMenuItem,
showLastMouseMoveToolStripMenuItem,
wholeVectorToolStripMenuItem,
Expand All @@ -58,7 +59,6 @@ public RawAcceleration()
legacyCapToolStripMenuItem,
gainOffsetToolStripMenuItem,
legacyOffsetToolStripMenuItem,
AutoWriteMenuItem,
ScaleMenuItem,
DPITextBox,
PollRateTextBox,
Expand Down Expand Up @@ -155,11 +155,35 @@ private void Form1_Load(object sender, EventArgs e)

}

public void ResetAutoScroll()
{
chartsPanel.AutoScrollPosition = Constants.Origin;
}

public void DoResize()
{
ResetAutoScroll();

var workingArea = Screen.PrimaryScreen.WorkingArea;
var chartsPreferredSize = chartsPanel.GetPreferredSize(Constants.MaxSize);

Size = new Size
{
Width = Math.Min(workingArea.Width - Location.X, optionsPanel.Size.Width + chartsPreferredSize.Width),
Height = Math.Min(workingArea.Height - Location.Y, chartsPreferredSize.Height + 48)
};
}

private void RawAcceleration_Paint(object sender, PaintEventArgs e)
{
//AccelGUI.AccelCharts.DrawLastMovement();
}

#endregion Method

private void optionsPanel_Paint(object sender, PaintEventArgs e)
{

}
}
}
1 change: 0 additions & 1 deletion grapher/Layouts/DefaultLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public DefaultLayout()
{
Name = "Default";
Index = (int)AccelMode.noaccel;
ButtonEnabled = false;
LogarithmicCharts = false;

AccelLayout = new OptionLayout(true, Acceleration);
Expand Down
4 changes: 0 additions & 4 deletions grapher/Layouts/LayoutBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public LayoutBase()
ExponentLayout = new OptionLayout(false, string.Empty);
MidpointLayout = new OptionLayout(false, string.Empty);

ButtonEnabled = true;
LogarithmicCharts = false;
}

Expand All @@ -40,8 +39,6 @@ public LayoutBase()

public bool LogarithmicCharts { get; protected set; }

protected bool ButtonEnabled { get; set; }

protected OptionLayout AccelLayout { get; set; }

protected OptionLayout ScaleLayout { get; set; }
Expand Down Expand Up @@ -70,7 +67,6 @@ public void Layout(
Button button,
int top)
{
button.Enabled = ButtonEnabled;

IOption previous = null;

Expand Down
1 change: 0 additions & 1 deletion grapher/Layouts/OffLayout.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ public OffLayout()
{
Name = "Off";
Index = (int)AccelMode.noaccel;
ButtonEnabled = true;
LogarithmicCharts = false;

AccelLayout = new OptionLayout(false, string.Empty);
Expand Down
Loading

0 comments on commit f4c04b4

Please sign in to comment.