Skip to content

Commit

Permalink
Add a "C3" sensor button as windows touchscreen touches inbetween C1 …
Browse files Browse the repository at this point in the history
…and C2 if you hit a center not perfectly.
  • Loading branch information
Leapward-Koex committed Feb 8, 2024
1 parent 7ef849b commit a377a27
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions MaiTouchSensorButtonStateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ enum TouchValue: long
B8 = 1 << 15, // 2^15
C1 = 1 << 16, // 2^16
C2 = 1 << 17, // 2^17
C3 = C1 | C2, // A special sensor used because center notes are hard to press using a windows touchscreen
D1 = 1 << 18, // 2^18
D2 = 1 << 19, // 2^19
D3 = 1 << 20, // 2^20
Expand Down
1 change: 1 addition & 0 deletions TouchPanel.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
<Image Source="C:\Dev\WpfMaiTouchEmulator\assets\B8.png" Canvas.Left="178" HorizontalAlignment="Left" VerticalAlignment="Top" PreviewTouchDown="Element_TouchDown" PreviewTouchMove="Element_TouchMove" PreviewTouchUp="Element_TouchUp" Tag="{x:Static local:TouchValue.B8}" Canvas.Top="120"/>
<Image Source="C:\Dev\WpfMaiTouchEmulator\assets\C1.png" Canvas.Left="254" HorizontalAlignment="Left" VerticalAlignment="Center" PreviewTouchDown="Element_TouchDown" PreviewTouchMove="Element_TouchMove" PreviewTouchUp="Element_TouchUp" Tag="{x:Static local:TouchValue.C1}" Canvas.Top="203"/>
<Image Source="C:\Dev\WpfMaiTouchEmulator\assets\C2.png" Canvas.Left="203" HorizontalAlignment="Left" VerticalAlignment="Center" PreviewTouchDown="Element_TouchDown" PreviewTouchMove="Element_TouchMove" PreviewTouchUp="Element_TouchUp" Tag="{x:Static local:TouchValue.C2}" Canvas.Top="203"/>
<Image Source="C:\Dev\WpfMaiTouchEmulator\assets\C1+C2.png" Canvas.Left="249" HorizontalAlignment="Center" VerticalAlignment="Top" PreviewTouchDown="Element_TouchDown" PreviewTouchMove="Element_TouchMove" PreviewTouchUp="Element_TouchUp" Tag="{x:Static local:TouchValue.C3}" Canvas.Top="203"/>
<Image Source="C:\Dev\WpfMaiTouchEmulator\assets\D1.png" Canvas.Left="219" HorizontalAlignment="Left" VerticalAlignment="Center" PreviewTouchDown="Element_TouchDown" PreviewTouchMove="Element_TouchMove" PreviewTouchUp="Element_TouchUp" Tag="{x:Static local:TouchValue.D1}"/>
<Image Source="C:\Dev\WpfMaiTouchEmulator\assets\D2.png" Canvas.Left="354" HorizontalAlignment="Left" VerticalAlignment="Top" PreviewTouchDown="Element_TouchDown" PreviewTouchMove="Element_TouchMove" PreviewTouchUp="Element_TouchUp" Tag="{x:Static local:TouchValue.D2}" Canvas.Top="52"/>
<Image Source="C:\Dev\WpfMaiTouchEmulator\assets\D3.png" Canvas.Left="417" HorizontalAlignment="Center" VerticalAlignment="Top" PreviewTouchDown="Element_TouchDown" PreviewTouchMove="Element_TouchMove" PreviewTouchUp="Element_TouchUp" Tag="{x:Static local:TouchValue.D3}" Canvas.Top="219"/>
Expand Down
Binary file added assets/C1+C2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a377a27

Please sign in to comment.