mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-22 17:29: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">
|
d:DesignHeight="450" d:DesignWidth="430">
|
||||||
<DockPanel LastChildFill="False">
|
<DockPanel LastChildFill="False">
|
||||||
<StackPanel Orientation="Horizontal" DockPanel.Dock="Top">
|
<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>
|
<Label.Background>
|
||||||
<SolidColorBrush x:Name="inpuDelayBackBrush" Color="Transparent" />
|
<SolidColorBrush x:Name="inpuDelayBackBrush" Color="Transparent" />
|
||||||
</Label.Background>
|
</Label.Background>
|
||||||
|
@ -30,6 +30,7 @@ namespace DS4WinWPF.DS4Forms
|
|||||||
}
|
}
|
||||||
|
|
||||||
private int deviceNum;
|
private int deviceNum;
|
||||||
|
private event EventHandler DeviceNumChanged;
|
||||||
private NonFormTimer readingTimer;
|
private NonFormTimer readingTimer;
|
||||||
private bool useTimer;
|
private bool useTimer;
|
||||||
private double lsDead;
|
private double lsDead;
|
||||||
@ -113,6 +114,7 @@ namespace DS4WinWPF.DS4Forms
|
|||||||
public ControllerReadingsControl()
|
public ControllerReadingsControl()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
InitializeComponent();
|
||||||
|
inputContNum.Content = $"#{deviceNum+1}";
|
||||||
|
|
||||||
readingTimer = new NonFormTimer();
|
readingTimer = new NonFormTimer();
|
||||||
readingTimer.Interval = 1000 / 60.0;
|
readingTimer.Interval = 1000 / 60.0;
|
||||||
@ -121,6 +123,12 @@ namespace DS4WinWPF.DS4Forms
|
|||||||
RsDeadChanged += ChangeRsDeadControls;
|
RsDeadChanged += ChangeRsDeadControls;
|
||||||
SixAxisDeadXChanged += ChangeSixAxisDeadControls;
|
SixAxisDeadXChanged += ChangeSixAxisDeadControls;
|
||||||
SixAxisDeadZChanged += 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)
|
private void ChangeSixAxisDeadControls(object sender, EventArgs e)
|
||||||
@ -150,6 +158,7 @@ namespace DS4WinWPF.DS4Forms
|
|||||||
public void UseDevice(int index)
|
public void UseDevice(int index)
|
||||||
{
|
{
|
||||||
deviceNum = index;
|
deviceNum = index;
|
||||||
|
DeviceNumChanged?.Invoke(this, EventArgs.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void EnableControl(bool state)
|
public void EnableControl(bool state)
|
||||||
|
Loading…
Reference in New Issue
Block a user