Skip to content

Commit

Permalink
Run and --hide at Window startup
Browse files Browse the repository at this point in the history
  • Loading branch information
hawku committed Mar 19, 2018
1 parent 911056d commit 2b6994a
Show file tree
Hide file tree
Showing 3 changed files with 202 additions and 54 deletions.
7 changes: 6 additions & 1 deletion TabletDriverGUI/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ public enum OutputModes
public int WindowWidth;
public int WindowHeight;

public bool RunAtStartup;

public string DriverPath;
public string DriverArguments;
public string DriverArguments;

public bool DeveloperMode;

Expand Down Expand Up @@ -85,6 +87,9 @@ public Configuration()

WindowWidth = 800;
WindowHeight = 690;

RunAtStartup = false;

DriverPath = "bin/TabletDriverService.exe";
DriverArguments = "config/init.cfg";
DeveloperMode = false;
Expand Down
148 changes: 105 additions & 43 deletions TabletDriverGUI/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,24 @@

<!-- Screen Mapping -->
<GroupBox Header="Screen Map" VerticalAlignment="Top" HorizontalAlignment="Left" Width="650">

<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold">
Screen Map
</TextBlock>
<TextBlock>
- You can drag the screen area with a mouse.
<LineBreak/>
- Drag + Control = Move area in X direction.
<LineBreak/>
- Drag + Shift = Move area Y direction.
<LineBreak/>
- Use the "Set Area" to set the screen area to single monitor or full desktop.
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>

<StackPanel>
<!-- Screen map canvas -->
<Canvas Name="canvasScreenMap"
Expand All @@ -38,17 +56,6 @@
MouseMove="Canvas_MouseMove"
MouseUp="Canvas_MouseUp"
>
<Canvas.ToolTip>
<TextBlock>
You can drag the area with a mouse.
<LineBreak/>
Left Control = Only in X direction.
<LineBreak/>
Left Shift = Only Y direction.
</TextBlock>
</Canvas.ToolTip>


</Canvas>

<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
Expand Down Expand Up @@ -108,6 +115,25 @@

<!-- Tablet area -->
<GroupBox Header="Tablet Area" VerticalAlignment="Top" HorizontalAlignment="Left" Width="650" Margin="0,5,0,5">
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold">
Tablet Area
</TextBlock>
<TextBlock>
- You can drag the tablet area with a mouse.
<LineBreak/>
- Drag + Control = Move area in X direction.
<LineBreak/>
- Drag + Shift = Move area Y direction.
<LineBreak/>
- For left handed mode, use rotation value of 180 degrees.
<LineBreak/>
- Click Wacom Area button to type in the Wacom driver area settings.
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>

<StackPanel>

<Grid>
Expand Down Expand Up @@ -144,15 +170,6 @@
MouseMove="Canvas_MouseMove"
MouseUp="Canvas_MouseUp"
>
<Canvas.ToolTip>
<TextBlock>
You can drag the area with a mouse.
<LineBreak/>
Left Control = Only in X direction.
<LineBreak/>
Left Shift = Only Y direction.
</TextBlock>
</Canvas.ToolTip>
</Canvas>

<StackPanel Grid.Column="2">
Expand All @@ -164,10 +181,10 @@
<!-- Output mode-->
<GroupBox Header="Mode" Width="130" HorizontalAlignment="Left">
<StackPanel>
<RadioButton Name="radioModeAbsolute" GroupName="OutputMode" Margin="2" Content="Absolute"
<RadioButton Name="radioModeAbsolute" GroupName="OutputMode" Margin="2" Content="Absolute (osu!)"
IsChecked="True"
Checked="CheckboxChanged" />
<RadioButton Name="radioModeRelative" GroupName="OutputMode" Margin="2" Content="Relative"
<RadioButton Name="radioModeRelative" GroupName="OutputMode" Margin="2" Content="Relative (mouse)"
Checked="CheckboxChanged" />
<RadioButton Name="radioModeDigitizer" GroupName="OutputMode" Margin="2" Content="Windows Ink"
Checked="CheckboxChanged" />
Expand Down Expand Up @@ -236,12 +253,25 @@
</StackPanel>
</GroupBox>


<!-- Button Mapping and Smoothing Filter -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">

<!-- Button Map -->
<GroupBox Header="Button Map" VerticalAlignment="Top" HorizontalAlignment="Left" Height="73">
<GroupBox Header="Button Mapping" VerticalAlignment="Top" HorizontalAlignment="Left" Height="73">
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold">
Button Mapping
</TextBlock>
<TextBlock>
- You can disable single button by selecting "Disable" from the list.
<LineBreak/>
- The "Disable buttons" checkbox will disable all tablet buttons.
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>

<StackPanel Orientation="Horizontal" VerticalAlignment="Top">

<!-- Tip -->
Expand Down Expand Up @@ -274,25 +304,44 @@


<!-- Smoothing -->
<GroupBox Name="groupFilter" Header="Smoothing Filter" VerticalAlignment="Bottom" Margin="5,0,0,0" HorizontalAlignment="Left">
<GroupBox Name="groupFilter" Header="Smoothing Filter" VerticalAlignment="Bottom" Margin="5,0,0,0" HorizontalAlignment="Left"
>
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold">
Cursor position smoothing filter
</TextBlock>
<TextBlock>
- Smoothing filter adds latency to the input, so don't enable it if you want to have the lowest possible input lag.
<LineBreak/>
- On Wacom tablets you can use latency value between 15 and 25 to have a similar smoothing as in the Wacom drivers.
<LineBreak/>
- You can test out different filter values, but recommended maximum for osu! is around 50 milliseconds.
<LineBreak/>
- Filter latency value lower than 4 milliseconds isn't recommended. It is just better to disable the smoothing filter.
<LineBreak/>
- You don't have to change the filter rate, but you can use the highest rate your computer can run without performance problems.
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>

<StackPanel Orientation="Horizontal" VerticalAlignment="Top">

<!-- Filter Latency -->
<GroupBox Header="Latency" Height="50" Width="80" Margin="0,0,0,0">
<Grid>
<TextBox Name="textFilterLatency" Padding="4,0,0,0"
ToolTip="In Windows 7 you need to manually type in main monitor size!"
HorizontalContentAlignment="Left" VerticalContentAlignment="Center"
TextChanged="TextChanged">0</TextBox>
<Label Width="30" HorizontalAlignment="Right">ms</Label>
</Grid>
</GroupBox>

<!-- Filter Rate -->
<GroupBox Header="Rate" VerticalAlignment="Top" HorizontalAlignment="Left" Width="85" Height="50">
<ComboBox Name="comboBoxFilterRate" SelectionChanged="ItemSelectionChanged" VerticalContentAlignment="Center">


<ComboBoxItem>500 Hz</ComboBoxItem>
<ComboBoxItem>333 Hz</ComboBoxItem>
<ComboBoxItem Selector.IsSelected="True">250 Hz</ComboBoxItem>
Expand All @@ -305,11 +354,6 @@
VerticalAlignment="Center"
Margin="5"
Checked="CheckboxChanged" Unchecked="CheckboxChanged">
<CheckBox.ToolTip>
<TextBlock>
Enables cursor position filter
</TextBlock>
</CheckBox.ToolTip>
Enabled
</CheckBox>
</StackPanel>
Expand All @@ -320,14 +364,24 @@

</StackPanel>


<!-- Desktop Size -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<!-- Desktop size -->
<GroupBox Name="groupDesktopSize" Header="Desktop Size" VerticalAlignment="Bottom" Margin="5,0,0,0" HorizontalAlignment="Left"
ToolTip="In some cases you may have to disable the auto size and manually type in the main monitor resolution."

>
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold">
Desktop Size
</TextBlock>
<TextBlock>
- In some cases you may have to disable the auto size and manually type in the main monitor resolution.
<LineBreak/>
- If you don't have problems with screen mapping, leave the automatic desktop size enabled.
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>
<StackPanel Orientation="Horizontal" VerticalAlignment="Top">

<!-- Desktop Width -->
Expand Down Expand Up @@ -446,19 +500,27 @@
</TabItem>
</TabControl>

<StackPanel Orientation="Horizontal" Margin="5,5,5,25" Height="35" VerticalAlignment="Bottom">
<Button Name="buttonSaveSettings" Margin="0,5,0,5" Width="50" Click="SaveSettings">Save</Button>
<Button Name="buttonApplySettings" Margin="5,5,0,5" Width="50" Click="ApplySettings">Apply</Button>
</StackPanel>
<Grid Margin="5,5,5,25" Height="35" VerticalAlignment="Bottom">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Left">
<Button Name="buttonSaveSettings" Margin="0,5,0,5" Width="50" Click="SaveSettings"
ToolTip="Saves settings to Config.xml">Save</Button>
<Button Name="buttonApplySettings" Margin="5,5,0,5" Width="50" Click="ApplySettings"
ToolTip="Applies driver settings.">Apply</Button>
</StackPanel>
<CheckBox Name="checkRunAtStartup"
HorizontalAlignment="Right" VerticalAlignment="Center" VerticalContentAlignment="Center"
Checked="CheckboxChanged" Unchecked="CheckboxChanged"
ToolTip="Starts and hides the TabletDriverGUI at Windows startup">Run at Windows startup</CheckBox>
</Grid>

<StatusBar Height="25" VerticalAlignment="Bottom">
<StatusBarItem HorizontalAlignment="Left">
<TextBlock Name="textStatus"></TextBlock>
</StatusBarItem>
<StatusBarItem HorizontalAlignment="Right">
<StackPanel Orientation="Horizontal">
<TextBlock Name="textStatusWarning" Foreground="#F60" Margin="0,0,5,0" MouseDown="StatusWarning_MouseDown"></TextBlock>
<TextBlock Name="textVersion">0.0.0</TextBlock>
<TextBlock Name="textStatusWarning" Foreground="#F60" Margin="0,0,5,0" MouseDown="StatusWarning_MouseDown"></TextBlock>
<TextBlock Name="textVersion">0.0.0</TextBlock>
</StackPanel>
</StatusBarItem>

Expand Down
Loading

0 comments on commit 2b6994a

Please sign in to comment.