-
Notifications
You must be signed in to change notification settings - Fork 284
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
1493 lines (1296 loc) · 67.5 KB
/
MainWindow.xaml
File metadata and controls
1493 lines (1296 loc) · 67.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<Window x:Class="TabletDriverGUI.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
Keyboard.PreviewKeyDown="Window_PreviewKeyDown"
Title="TabletDriverGUI" Height="750" Width="770">
<Window.Resources>
<!-- Default colors -->
<SolidColorBrush x:Key="DefaultBackground" Color="#fff" />
<SolidColorBrush x:Key="DefaultControlBackground" Color="#fff" />
<SolidColorBrush x:Key="DefaultButtonBackground" Color="#eee" />
<SolidColorBrush x:Key="DefaultForeground" Color="#000" />
<Style x:Key="StylePanel" TargetType="Panel">
<Setter Property="Background" Value="{StaticResource DefaultBackground}"/>
</Style>
<Style x:Key="StyleContentControl" TargetType="ContentControl">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultBackground}"/>
</Style>
<Style TargetType="StackPanel" BasedOn="{StaticResource StylePanel}" />
<Style TargetType="ScrollViewer" BasedOn="{StaticResource StyleContentControl}" />
<Style TargetType="Grid" BasedOn="{StaticResource StylePanel}"/>
<Style TargetType="TabControl">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultBackground}"/>
</Style>
<Style TargetType="StatusBar">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultButtonBackground}"/>
</Style>
<Style TargetType="Button">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultButtonBackground}"/>
</Style>
<Style TargetType="CheckBox">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultControlBackground}"/>
</Style>
<Style TargetType="RadioButton">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultControlBackground}"/>
</Style>
<Style TargetType="Label">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
</Style>
<Style TargetType="ComboBox">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultControlBackground}"/>
</Style>
<Style TargetType="ComboBoxItem">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultControlBackground}"/>
</Style>
<!-- GroupBox style -->
<Style TargetType="GroupBox">
<Setter Property="HeaderTemplate">
<Setter.Value>
<DataTemplate>
<Label Margin="0,0,0,1" Padding="0" FontWeight="Bold" Content="{Binding}"/>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>
<!-- TextBox style -->
<SolidColorBrush x:Key="DisabledForegroundBrush" Color="#999" />
<SolidColorBrush x:Key="DisabledBackgroundBrush" Color="#f9f9f9" />
<Style TargetType="TextBox">
<Setter Property="Foreground" Value="{StaticResource DefaultForeground}"/>
<Setter Property="Background" Value="{StaticResource DefaultControlBackground}"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="VerticalContentAlignment" Value="Center"/>
<Setter Property="Padding" Value="5,0"/>
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="TextBox">
<Border Name="Bd" BorderThickness="{TemplateBinding BorderThickness}"
BorderBrush="{TemplateBinding BorderBrush}"
Background="{TemplateBinding Background}"
SnapsToDevicePixels="true">
<ScrollViewer Name="PART_ContentHost" Background="{TemplateBinding Background}"
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsEnabled" Value="False">
<Setter Value="{StaticResource DisabledBackgroundBrush}" Property="Background" />
<Setter Value="{StaticResource DisabledForegroundBrush}" Property="Foreground" />
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
</Setter.Value>
</Setter>
</Style>
</Window.Resources>
<Grid Margin="0,0,0,0">
<Grid.RowDefinitions>
<RowDefinition Height="auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Background="White" Height="18">
<Menu DockPanel.Dock="Top" Background="White">
<MenuItem Header="Fil_e">
<MenuItem Name="mainMenuSaveSettings" Header="_Save settings" InputGestureText="Ctrl+S" Click="MainMenuClick"
ToolTip="Save and apply settings."
/>
<Separator/>
<MenuItem Name="mainMenuImport" InputGestureText="Ctrl+I" Header="_Import Settings" Click="MainMenuClick"
ToolTip="Import settings from a XML file."
/>
<MenuItem Name="mainMenuExport" InputGestureText="Ctrl+E" Header="_Export Settings" Click="MainMenuClick"
ToolTip="Export settings to a XML file."
/>
<Separator/>
<MenuItem Name="mainMenuResetToDefault" Header="_Reset to default" Click="MainMenuClick"
ToolTip="Resets all settings to default values."
/>
<Separator />
<MenuItem Name="mainMenuExitGUI" Header="Close _GUI" Click="MainMenuClick"
ToolTip="Closes the GUI without stopping the driver." />
<MenuItem Name="mainMenuExit" Header="E_xit" Click="MainMenuClick"
ToolTip="Stops the driver and closes the GUI"
/>
</MenuItem>
<MenuItem Header="_Tools">
<MenuItem Header="Show folder" IsCheckable="False">
<MenuItem Name="mainMenuOpenCurrentDirectory" Header="_TabletDriver" Click="MainMenuClick"
ToolTip="Opens the TabletDriver folder."
/>
<MenuItem Name="mainMenuOpenConfig" Header="_Config" Click="MainMenuClick"
ToolTip="Opens the TabletDriver config folder."
/>
<MenuItem Name="mainMenuOpenTools" Header="T_ools" Click="MainMenuClick"
ToolTip="Opens the TabletDriver tools folder."
/>
</MenuItem>
<MenuItem Name="mainMenuTabletView" Header="_Tablet View" Click="MainMenuClick" />
<MenuItem Name="mainMenuTabletViewSettings" Header="Tablet View _Settings" Click="MainMenuClick" />
<MenuItem Name="mainMenuUpdateDesktopImage" Header="_Update desktop image" Click="MainMenuClick"
ToolTip="Updates the screen map desktop image."
/>
<MenuItem Name="mainMenuFitToContent" Header="_Fit window" Click="MainMenuClick"
ToolTip="Fits the GUI window to content of active tab."
/>
</MenuItem>
</Menu>
<TextBox AcceptsReturn="True" />
</DockPanel>
<TabControl Grid.Row="1" Name="tabControl"
Selector.IsSelected="True"
SelectionChanged="TabControl_SelectionChanged">
<!-- Area tab -->
<TabItem Name="tabArea"
Margin="10,0,-10,0"
Padding="10,5" BorderThickness="0">
<TabItem.Header>
<TextBlock FontSize="14" Foreground="#006600" FontWeight="Bold">
<AccessText Text="_Area"/>
</TextBlock>
</TabItem.Header>
<ScrollViewer VerticalScrollBarVisibility="Auto" FocusVisualStyle="{x:Null}">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<!-- Screen Mapping -->
<GroupBox Header="Screen Map" Grid.Row="0">
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" FontSize="16">
Screen Map
</TextBlock>
<TextBlock>
- You can drag the screen area with a mouse.
<LineBreak/>
- Control + Drag = Move area in X direction.
<LineBreak/>
- Shift + Drag = Move area Y direction.
<LineBreak/>
- Alt + Drag = Move area 80 pixels at a time.
<LineBreak/>
- Mouse scroll = Resize area 10 pixels per scroll.
<LineBreak/>
- Control + Mouse scroll = Resize area 100 pixels per scroll.
<LineBreak/>
- Use the "Move Area To" to set move screen area to single monitor or full desktop.
<LineBreak/>
- <TextBlock FontWeight="Bold" Foreground="#000099">Right-clicking the area will show more options</TextBlock>
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="*"/>
<RowDefinition Height="auto"/>
</Grid.RowDefinitions>
<!-- Screen map canvas -->
<Canvas Name="canvasScreenMap"
Grid.Row="0"
MinWidth="500"
MinHeight="130"
Margin="0,0,0,0"
Background="Transparent"
ClipToBounds="True"
Focusable="True"
ContextMenuOpening="CanvasArea_ContextMenuOpening"
MouseWheel="CanvasArea_MouseWheel"
MouseMove="CanvasArea_MouseMove"
MouseDown="CanvasArea_MouseDown"
MouseUp="CanvasArea_MouseUp">
<Canvas.ContextMenu>
<ContextMenu>
<MenuItem Header="" Name="menuCanvasScreenAreaInfo" FontWeight="Bold"/>
<MenuItem Header="Move to center of a monitor" Name="menuCanvasMoveToMonitorCenter" Click="CanvasArea_MenuClick" />
<MenuItem Header="Set to full monitor" Name="menuCanvasSetToFullMonitor" Click="CanvasArea_MenuClick" />
<MenuItem Header="Set to full desktop" Name="menuCanvasSetToFullDesktop" Click="CanvasArea_MenuClick" />
<Separator/>
<MenuItem Header="Add area" Name="menuCanvasAddScreenArea" Click="CanvasArea_MenuClick" />
<MenuItem Header="Edit area" Name="menuCanvasEditScreenArea" Click="CanvasArea_MenuClick" />
<MenuItem Header="Remove area" Name="menuCanvasRemoveScreenArea" Click="CanvasArea_MenuClick" />
<Separator/>
<MenuItem Header="Reset all areas" Name="menuCanvasResetScreenAreas" Click="CanvasArea_MenuClick" />
</ContextMenu>
</Canvas.ContextMenu>
</Canvas>
<StackPanel Grid.Row="1" Orientation="Vertical" >
<!-- Screen area information -->
<Label Name="labelScreenAreaInfo"
HorizontalAlignment="Center"
FontSize="11"
FontWeight="Bold"
Padding="0">
RATIO 1.777:1
</Label>
<!-- Screen map controls -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<!-- Screen Area Width -->
<GroupBox Header="Width" Height="50" Width="100">
<Grid>
<TextBox Name="textScreenAreaWidth" TextChanged="TextChanged" />
<Label HorizontalAlignment="Right">px</Label>
</Grid>
</GroupBox>
<!-- Screen Area Height -->
<GroupBox Header="Height" Height="50" Width="100" Margin="5,0,0,0">
<Grid>
<TextBox Name="textScreenAreaHeight" TextChanged="TextChanged"/>
<Label HorizontalAlignment="Right">px</Label>
</Grid>
</GroupBox>
<!-- Screen Area Left -->
<GroupBox Header="Left Offset" Height="50" Width="100" Margin="5,0,0,0">
<Grid>
<TextBox Name="textScreenAreaX" TextChanged="TextChanged"/>
<Label HorizontalAlignment="Right">px</Label>
</Grid>
</GroupBox>
<!-- Screen Area Top -->
<GroupBox Header="Top Offset" Height="50" Width="100" Margin="5,0,0,0">
<Grid>
<TextBox Name="textScreenAreaY" TextChanged="TextChanged"/>
<Label HorizontalAlignment="Right">px</Label>
</Grid>
</GroupBox>
<!-- Move area to -->
<GroupBox Header="Move Area To" Height="50" Width="150" Margin="5,0,0,0">
<ComboBox Name="comboBoxMonitor"
PreviewMouseDown="ComboBoxMonitor_MouseDown"
SelectionChanged="ComboBoxMonitor_SelectionChanged"
/>
</GroupBox>
</StackPanel>
</StackPanel>
</Grid>
</GroupBox>
<!-- Tablet area -->
<GroupBox Header="Tablet Area"
Grid.Row="1"
HorizontalAlignment="Center"
Margin="0,5,0,5">
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" FontSize="16">
Tablet Area
</TextBlock>
<TextBlock>
- You can drag the tablet area with a mouse.
<LineBreak/>
- Control + Drag = Move area in X direction.
<LineBreak/>
- Shift + Drag = Move area Y direction.
<LineBreak/>
- Alt + Drag = Move area 5 mm at a time.
<LineBreak/>
- Mouse scroll = Resize area 1 mm per scroll.
<LineBreak/>
- Control + Mouse scroll = Resize area 10 mm per scroll.
<LineBreak/>
- For left handed mode, enable the "Left handed (Inverted)" checkbox or use a rotation value of 180 degrees.
<LineBreak/>
- Click Wacom Area button to type in the Wacom driver area settings.
<LineBreak/>
- Draw Area will allow you to set the tablet area by clicking two points with a pen.
<LineBreak/>
- <TextBlock FontWeight="Bold" Foreground="#000099">Right-clicking the area will show more options.</TextBlock>
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>
<StackPanel>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Rotation + invert + area buttons -->
<StackPanel Grid.Column="0" HorizontalAlignment="Right">
<!-- Rotation + Invert -->
<StackPanel Orientation="Horizontal">
<!-- Invert -->
<CheckBox Name="checkBoxInvert" Margin="5"
VerticalAlignment="Bottom"
VerticalContentAlignment="Center"
Checked="CheckboxChanged"
Unchecked="CheckboxChanged">
<TextBlock>
Left handed
<LineBreak/>
(Invert)
</TextBlock>
</CheckBox>
<!-- Rotation -->
<GroupBox Header="Rotation" Height="50" Width="90" HorizontalAlignment="Left">
<Grid>
<TextBox Name="textTabletAreaRotation" TextChanged="TextChanged">0</TextBox>
<Label HorizontalAlignment="Right">deg</Label>
</Grid>
</GroupBox>
</StackPanel>
<!-- Tablet area buttons -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,5,2,0">
<!-- Draw Area -->
<Button Name="buttonDrawArea"
Width="80"
Margin="0,0,5,0"
Padding="5"
Click="ButtonDrawArea_Click"
>
<Button.ToolTip>
<TextBlock>
<TextBlock FontWeight="Bold" FontSize="14">Draw Area</TextBlock>
<LineBreak/>
To set the area, click the top left and the bottom right corners of the area with your tablet pen.
</TextBlock>
</Button.ToolTip>
<TextBlock>
Draw Area
</TextBlock>
</Button>
<!-- Wacom Area -->
<Button Name="buttonWacomArea"
Padding="5"
Margin="0,0,3,0"
Click="ButtonWacomArea_Click">
Wacom Area
</Button>
</StackPanel>
<Button x:Name="ConvertMouse" Content="Convert mouse DPI" Height="28" Width="115"
Margin="0,5,0,0" IsCancel="True" Click="ConvertMouse_Click">
<Button.ToolTip>
<TextBlock>
<TextBlock FontWeight="Bold" FontSize="14">Convert mouse DPI</TextBlock>
<LineBreak/>
Matches the physical movement of your mouse to the physical movement of your pen.
</TextBlock>
</Button.ToolTip>
</Button>
</StackPanel>
<!-- Tablet area canvas -->
<Canvas Grid.Column="1" Name="canvasTabletArea"
Width="260"
Height="150"
Margin="5,0,5,0"
Background="Transparent"
ClipToBounds="True"
Focusable="True"
ContextMenuOpening="CanvasArea_ContextMenuOpening"
MouseWheel="CanvasArea_MouseWheel"
MouseMove="CanvasArea_MouseMove"
MouseDown="CanvasArea_MouseDown"
MouseUp="CanvasArea_MouseUp">
<Canvas.ContextMenu>
<ContextMenu>
<MenuItem Header="" Name="menuCanvasTabletAreaInfo" FontWeight="Bold"/>
<MenuItem Name="menuCanvasMoveToCenter" Header="Move to center" Click="CanvasArea_MenuClick" />
<MenuItem Name="menuCanvasSetToFullTabletArea" Header="Set to full area" Click="CanvasArea_MenuClick" />
<MenuItem Name="menuCanvasForceProportions" Header="Force proportions" Click="CanvasArea_MenuClick" />
<Separator/>
<MenuItem Name="menuCanvasAddTabletArea" Header="Add area" Click="CanvasArea_MenuClick" />
<MenuItem Name="menuCanvasEditTabletArea" Header="Edit area" Click="CanvasArea_MenuClick" />
<MenuItem Name="menuCanvasRemoveTabletArea" Header="Remove area" Click="CanvasArea_MenuClick" />
<Separator/>
<MenuItem Name="menuCanvasResetTabletAreas" Header="Reset all areas" Click="CanvasArea_MenuClick" />
</ContextMenu>
</Canvas.ContextMenu>
</Canvas>
<!-- Output mode selector -->
<StackPanel Grid.Column="2" HorizontalAlignment="Left">
<!-- Positioning -->
<GroupBox Header="Positioning" Width="170" HorizontalAlignment="Left">
<ComboBox Name="comboBoxOutputPositioning"
SelectionChanged="ItemSelectionChanged"
SelectedIndex="0">
<ComboBoxItem>Absolute (Pen)</ComboBoxItem>
<ComboBoxItem>Relative (Mouse)</ComboBoxItem>
</ComboBox>
</GroupBox>
<!-- Output mode -->
<GroupBox Header="Mode" HorizontalAlignment="Left" Width="170" Padding="0,3,0,0">
<GroupBox.ToolTip>
<TextBlock>
<TextBlock FontWeight="Bold" FontSize="16">Mode</TextBlock>
<LineBreak/>
<TextBlock FontWeight="Bold">Standard:</TextBlock> Gaming and other programs that don't need pen pressure.
<LineBreak/>
<TextBlock FontWeight="Bold">Windows Ink:</TextBlock> Enables pen pressure for applications that support Windows Ink.
<LineBreak/>
<TextBlock FontWeight="Bold">Compatibility:</TextBlock> Use this mode if you have problems with cursor movement in standard mode.
</TextBlock>
</GroupBox.ToolTip>
<StackPanel>
<RadioButton Name="radioOutputModeStandard" GroupName="OutputMode" Margin="2" Content="Standard (Game)"
IsChecked="True"
Checked="CheckboxChanged" />
<RadioButton Name="radioOutputModeWindowsInk" GroupName="OutputMode" Margin="2" Content="Windows Ink (Draw)"
Checked="CheckboxChanged" />
<RadioButton Name="radioOutputModeCombatibility" GroupName="OutputMode" Margin="2" Content="Compatibility (Debug)"
Checked="CheckboxChanged" />
</StackPanel>
</GroupBox>
</StackPanel>
</Grid>
<!-- Tablet area information -->
<Label Name="labelTabletAreaInfo"
HorizontalAlignment="Center"
Padding="0"
FontSize="11"
FontWeight="Bold">
RATIO 1:777:1
</Label>
<!-- Tablet area settings -->
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
<!-- Tablet Area Width -->
<GroupBox Header="Width" Height="50" Width="90" Margin="0,0,0,0">
<Grid>
<TextBox Name="textTabletAreaWidth" TextChanged="TextChanged"/>
<Label HorizontalAlignment="Right">mm</Label>
</Grid>
</GroupBox>
<!-- Tablet Area Height -->
<GroupBox Header="Height" Height="50" Width="90" Margin="5,0,0,0">
<Grid>
<TextBox Name="textTabletAreaHeight" TextChanged="TextChanged" />
<Label HorizontalAlignment="Right">mm</Label>
</Grid>
</GroupBox>
<!-- Tablet Area Left -->
<GroupBox Header="X" Height="50" Width="90" Margin="5,0,0,0">
<Grid>
<TextBox Name="textTabletAreaX" TextChanged="TextChanged"/>
<Label HorizontalAlignment="Right">mm</Label>
</Grid>
</GroupBox>
<!-- Tablet Area Top -->
<GroupBox Header="Y" Height="50" Width="90" Margin="5,0,0,0">
<Grid>
<TextBox Name="textTabletAreaY" TextChanged="TextChanged"/>
<Label HorizontalAlignment="Right">mm</Label>
</Grid>
</GroupBox>
<!-- Tablet area checkboxes -->
<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<!-- Full area checkbox -->
<!-- Force Aspect Ratio -->
<CheckBox Name="checkBoxForceAspect"
Margin="3"
Checked="CheckboxChanged"
Unchecked="CheckboxChanged">
Force aspect ratio
</CheckBox>
</StackPanel>
</StackPanel>
</StackPanel>
</GroupBox>
</Grid>
</ScrollViewer>
</TabItem>
<!-- Buttons tab -->
<TabItem Name="tabButtons" Margin="10,0,-10,0" Padding="10,5">
<TabItem.Header>
<TextBlock FontSize="14" Foreground="#006699" FontWeight="Bold">
<AccessText Text="_Buttons"/>
</TextBlock>
</TabItem.Header>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel Orientation="Vertical"
Margin="5,0"
HorizontalAlignment="Left"
VerticalAlignment="Top"
Width="650">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="auto" />
</Grid.ColumnDefinitions>
<Grid.RowDefinitions>
<RowDefinition Height="auto" />
<RowDefinition Height="auto" />
</Grid.RowDefinitions>
<!-- Pen Buttons -->
<GroupBox Grid.Column="0" Grid.Row="0" Header="Pen Buttons">
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" FontSize="16">
Pen Buttons
</TextBlock>
<TextBlock>
- You can disable a single button by clicking "Clear" in the mapping dialog.
<LineBreak/>
- The "Disable buttons" checkbox will disable all pen buttons.
<LineBreak/>
- Use negative number in scroll sensitivity to invert the direction.
<LineBreak/>
- Scroll acceleration 1.0 = No acceleration.
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center" >
<!-- Top -->
<GroupBox Header="Top" Width="120" HorizontalAlignment="Left">
<Button Name="buttonPenButton3" Height="22"
Padding="2,0"
Background="White"
ToolTip=""
ToolTipOpening="ButtonMap_ToolTipOpening"
Click="ButtonMap_Click">
MOUSE1
</Button>
</GroupBox>
<!-- Bottom -->
<GroupBox Header="Bottom" Width="120" HorizontalAlignment="Left">
<Button Name="buttonPenButton2" Height="22"
Padding="2,0"
Background="White"
ToolTip=""
ToolTipOpening="ButtonMap_ToolTipOpening"
Click="ButtonMap_Click">
MOUSE1
</Button>
</GroupBox>
<!-- Tip -->
<GroupBox Header="Tip" Width="120" HorizontalAlignment="Left">
<Button Name="buttonPenButton1" Height="22"
Padding="2,0"
Background="White"
ToolTip=""
ToolTipOpening="ButtonMap_ToolTipOpening"
Click="ButtonMap_Click">
MOUSE1
</Button>
</GroupBox>
<!-- Disable buttons -->
<CheckBox Name="checkBoxDisableButtons"
HorizontalAlignment="Left"
Margin="7,5,0,0"
Checked="CheckboxChanged"
Unchecked="CheckboxChanged">
<TextBlock>Disable buttons</TextBlock>
</CheckBox>
</StackPanel>
</GroupBox>
<!-- Scroll -->
<GroupBox Grid.Row="1" Header="Mouse Scroll">
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" FontSize="16">
Mouse Scroll
</TextBlock>
<TextBlock>
- Use negative number in sensitivity to invert the direction.
<LineBreak/>
- Acceleration 1.0 = No acceleration. Recommended range is from 1 to 5.
<LineBreak/>
- <TextBlock FontWeight="Bold">Stop cursor</TextBlock>: cursor will be stopped when scrolling.
<LineBreak/>
- <TextBlock FontWeight="Bold">Drag scroll</TextBlock>: scrolls only when the pen tip is pressed down.
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>
<StackPanel Orientation="Vertical" HorizontalAlignment="Center">
<!-- Scroll sensitivity -->
<GroupBox Header="Sensitivity" Height="50" Width="120" HorizontalAlignment="Left">
<Grid>
<TextBox Name="textScrollSensitivity" TextChanged="TextChanged">0.5</TextBox>
<Label HorizontalAlignment="Right">s/mm</Label>
</Grid>
</GroupBox>
<!-- Scroll acceleration -->
<GroupBox Header="Acceleration" Height="50" Width="120" HorizontalAlignment="Left">
<Grid>
<TextBox Name="textScrollAcceleration" TextChanged="TextChanged">1.0</TextBox>
</Grid>
</GroupBox>
<!-- Scroll stop cursor -->
<CheckBox Name="checkBoxScrollStopCursor"
Margin="7,5,0,0"
HorizontalAlignment="Left"
Checked="CheckboxChanged"
Unchecked="CheckboxChanged">
<TextBlock>Stop cursor</TextBlock>
</CheckBox>
<!-- Scroll drag -->
<CheckBox Name="checkBoxScrollDrag"
Margin="7,5,0,0"
HorizontalAlignment="Left"
Checked="CheckboxChanged"
Unchecked="CheckboxChanged">
<TextBlock>Drag scroll</TextBlock>
</CheckBox>
</StackPanel>
</GroupBox>
<!-- Windows Ink Pressure -->
<GroupBox Grid.Column="1" Grid.Row="0" Grid.RowSpan="2" Name="groupBoxWindowsInkSettings" Header="Windows Ink Settings">
<StackPanel Orientation="Vertical">
<!-- Tip Firmness -->
<GroupBox Header="Tip Firmness">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="40" FontWeight="DemiBold">Soft</Label>
<!-- Pressure slider -->
<Slider Grid.Column="1" Name="sliderPressureSensitivity"
IsSnapToTickEnabled="True"
TickFrequency="0.2"
TickPlacement="Both"
SmallChange="0.2"
LargeChange="0.2"
Value="0.0"
Minimum="-2"
Maximum="2"
IsDirectionReversed="True"
ValueChanged="SliderPressure_ValueChanged"
/>
<Label Grid.Column="2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="40" FontWeight="DemiBold">Hard</Label>
</Grid>
</GroupBox>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Pressure Low Deadzone -->
<GroupBox Header="Pressure Low Deadzone" Grid.Column="0">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="40" FontWeight="DemiBold">0%</Label>
<!-- Deadzone slider -->
<Slider Grid.Column="1" Name="sliderPressureDeadzoneLow"
IsSnapToTickEnabled="True"
TickFrequency="0.025"
TickPlacement="Both"
SmallChange="0.025"
LargeChange="0.025"
Value="0.0"
Minimum="0"
Maximum="0.5"
ToolTip="0%"
ValueChanged="SliderPressure_ValueChanged"
/>
<Label Grid.Column="2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="40" FontWeight="DemiBold">
50%
</Label>
</Grid>
</GroupBox>
<!-- Pressure High Deadzone -->
<GroupBox Header="Pressure High Deadzone" Grid.Column="1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
</Grid.ColumnDefinitions>
<Label Grid.Column="0" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="40" FontWeight="DemiBold">
50%
</Label>
<!-- Deadzone slider -->
<Slider Grid.Column="1" Name="sliderPressureDeadzoneHigh"
IsSnapToTickEnabled="True"
TickFrequency="0.025"
TickPlacement="Both"
SmallChange="0.025"
LargeChange="0.025"
Value="0.0"
Minimum="0"
Maximum="0.5"
ToolTip="0%"
IsDirectionReversed="True"
ValueChanged="SliderPressure_ValueChanged"
/>
<Label Grid.Column="2" VerticalContentAlignment="Center" HorizontalContentAlignment="Center" Width="40" FontWeight="DemiBold">0%</Label>
</Grid>
</GroupBox>
</Grid>
<!-- Pressure Tester -->
<GroupBox Header="Test" Padding="2">
<StackPanel Orientation="Vertical">
<Border BorderThickness="2" BorderBrush="#335">
<!-- Ink Canvas -->
<InkCanvas Width="470"
Height="250"
Name="inkCanvas"
Background="#f6f6f6"
StylusUp="InkCanvas_StylusUp"
StylusMove="InkCanvas_StylusMove"
KeyDown="InkCanvas_KeyDown"
/>
</Border>
<!-- Pressure Bar -->
<ProgressBar Name="progressPressure"
Minimum="0"
Value="0.0"
Maximum="1.0"
Height="10"
Background="#f6f6f6"
Foreground="#555"
/>
</StackPanel>
</GroupBox>
<!-- Ink canvas buttons -->
<Grid Margin="2,4,2,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- Clear Ink -->
<Button Name="buttonInkClear" Content="Clear"
Grid.Column="0"
HorizontalAlignment="Left"
Padding="5"
Width="100"
FontWeight="Bold"
Click="ButtonInkClear_Click" />
<!-- Undo -->
<Button Name="buttonInkUndo" Content="Undo"
Grid.Column="1"
Width="80"
Padding="5"
Margin="0,0,3,0"
FontWeight="Bold"
Click="ButtonInkUndo_Click" />
<!-- Redo -->
<Button Name="buttonInkRedo" Content="Redo"
Grid.Column="2"
Width="80"
Margin="3,0,0,0"
Padding="5"
FontWeight="Bold"
Click="ButtonInkRedo_Click" />
<!-- Save as PNG -->
<Button Name="buttonInkSave" Content="Save as PNG"
Grid.Column="3"
HorizontalAlignment="Right"
Width="100"
Padding="5"
FontWeight="Bold"
Click="ButtonInkSave_Click" />
</Grid>
</StackPanel>
</GroupBox>
</Grid>
<!-- Tablet buttons -->
<GroupBox Name="groupBoxTabletButtons" Header="Tablet Buttons"
Margin="0,5,0,5" Width="650">
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" FontSize="16">
Tablet Buttons
</TextBlock>
<TextBlock>
- You can disable a single button by clicking "Clear" in the mapping dialog.
<LineBreak/>
- The "Disable buttons" checkbox will disable all tablet buttons.
</TextBlock>
</StackPanel>
</GroupBox.ToolTip>
<WrapPanel Name="wrapPanelTabletButtons"></WrapPanel>
</GroupBox>
</StackPanel>
</ScrollViewer>
</TabItem>
<!-- Filters tab -->
<TabItem Name="tabFilters" Margin="10,0,-10,0" Padding="10,5">
<TabItem.Header>
<TextBlock FontSize="14" Foreground="#003399" FontWeight="Bold">
<AccessText Text="_Filters"/>
</TextBlock>
</TabItem.Header>
<StackPanel Orientation="Vertical" Margin="5,0,5,0" Width="650" HorizontalAlignment="Left">
<!-- Smoothing filter -->
<GroupBox Name="groupSmoothingFilter" Header="Smoothing Filter">
<GroupBox.ToolTip>
<StackPanel>
<TextBlock FontWeight="Bold" FontSize="16">
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 latency.
<LineBreak/>
Check the checkbox to enable the filter.
<LineBreak/>
"Only when buttons down" enables the filter only when pen buttons or tip are pressed down.
<LineBreak/>
<LineBreak/>
<TextBlock FontWeight="Bold">
Recommendations
</TextBlock>
<LineBreak/>
On Wacom tablets you can use latency value between 10 and 15 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 enabled -->
<CheckBox Name="checkBoxSmoothing"
VerticalAlignment="Center"
Margin="5,10,5,0"
Checked="CheckboxChanged" Unchecked="CheckboxChanged">
</CheckBox>
<!-- Filter Latency -->
<GroupBox Header="Latency"
IsEnabled="{Binding ElementName=checkBoxSmoothing, Path=IsChecked}"
Height="50" Width="80" Margin="0,0,0,0">
<Grid>
<TextBox Name="textSmoothingLatency" TextChanged="TextChanged">0</TextBox>
<Label HorizontalAlignment="Right">ms</Label>
</Grid>
</GroupBox>
<!-- Filter Rate -->
<GroupBox Header="Rate"
IsEnabled="{Binding ElementName=checkBoxSmoothing, Path=IsChecked}"
VerticalAlignment="Top" HorizontalAlignment="Left" Width="90" Height="50">