mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-22 09:19:18 +01:00
Added minor input slot display to Controller Readings
This commit is contained in:
parent
08018d27a1
commit
942342d3f9
@ -12,7 +12,8 @@
|
||||
d:DesignHeight="450" d:DesignWidth="430">
|
||||
<DockPanel LastChildFill="False">
|
||||
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
|
||||
<Label x:Name="inputDelayLb" Content="Input Delay: N/A">
|
||||
<Label x:Name="inputContNum" Content="#" FontWeight="Bold"/>
|
||||
<Label x:Name="inputDelayLb" Content="Input Delay: N/A" Margin="8,0,0,0">
|
||||
<Label.Background>
|
||||
<SolidColorBrush x:Name="inpuDelayBackBrush" Color="Transparent" />
|
||||
</Label.Background>
|
||||
|
@ -30,6 +30,7 @@ namespace DS4WinWPF.DS4Forms
|
||||
}
|
||||
|
||||
private int deviceNum;
|
||||
private event EventHandler DeviceNumChanged;
|
||||
private NonFormTimer readingTimer;
|
||||
private bool useTimer;
|
||||
private double lsDead;
|
||||
@ -113,6 +114,7 @@ namespace DS4WinWPF.DS4Forms
|
||||
public ControllerReadingsControl()
|
||||
{
|
||||
InitializeComponent();
|
||||
inputContNum.Content = $"#{deviceNum+1}";
|
||||
|
||||
readingTimer = new NonFormTimer();
|
||||
readingTimer.Interval = 1000 / 60.0;
|
||||
@ -121,6 +123,12 @@ namespace DS4WinWPF.DS4Forms
|
||||
RsDeadChanged += ChangeRsDeadControls;
|
||||
SixAxisDeadXChanged += ChangeSixAxisDeadControls;
|
||||
SixAxisDeadZChanged += ChangeSixAxisDeadControls;
|
||||
DeviceNumChanged += ControllerReadingsControl_DeviceNumChanged;
|
||||
}
|
||||
|
||||
private void ControllerReadingsControl_DeviceNumChanged(object sender, EventArgs e)
|
||||
{
|
||||
inputContNum.Content = $"#{deviceNum+1}";
|
||||
}
|
||||
|
||||
private void ChangeSixAxisDeadControls(object sender, EventArgs e)
|
||||
@ -150,6 +158,7 @@ namespace DS4WinWPF.DS4Forms
|
||||
public void UseDevice(int index)
|
||||
{
|
||||
deviceNum = index;
|
||||
DeviceNumChanged?.Invoke(this, EventArgs.Empty);
|
||||
}
|
||||
|
||||
public void EnableControl(bool state)
|
||||
|
Loading…
Reference in New Issue
Block a user