mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-26 11:04:21 +01:00
Make Tilt Controls buttons work
This commit is contained in:
parent
e69816b290
commit
b5ff9c65b8
@ -673,23 +673,23 @@
|
|||||||
|
|
||||||
<StackPanel x:Name="gyroControlsPanel" Visibility="Visible">
|
<StackPanel x:Name="gyroControlsPanel" Visibility="Visible">
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||||
<Button x:Name="gyroZNBtn" Content="Tilt Up" Width="100"/>
|
<Button x:Name="gyroZNBtn" Content="Tilt Up" Width="100" Tag="33" Click="TiltControlsButton_Click" />
|
||||||
<Label x:Name="gyroZNLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
|
<Label x:Name="gyroZNLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||||
<Button x:Name="gyroZPBtn" Content="Tilt Down" Width="100"/>
|
<Button x:Name="gyroZPBtn" Content="Tilt Down" Width="100" Tag="32" Click="TiltControlsButton_Click" />
|
||||||
<Label x:Name="gyroZPLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
|
<Label x:Name="gyroZPLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||||
<Button x:Name="gyroXNBtn" Content="Tilt Left" Width="100"/>
|
<Button x:Name="gyroXPBtn" Content="Tilt Left" Width="100" Tag="30" Click="TiltControlsButton_Click" />
|
||||||
<Label x:Name="gyroXNLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
|
<Label x:Name="gyroXLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||||
<Button x:Name="gyroXPBtn" Content="Tilt Right" Width="100"/>
|
<Button x:Name="gyroXNBtn" Content="Tilt Right" Width="100" Tag="31" Click="TiltControlsButton_Click" />
|
||||||
<Label x:Name="gyroXLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
|
<Label x:Name="gyroXNLb" Content="{Binding MappingName,FallbackValue=Unassigned}" />
|
||||||
</StackPanel>
|
</StackPanel>
|
||||||
|
|
||||||
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
<StackPanel Orientation="Horizontal" Margin="0,0,0,8">
|
||||||
|
@ -1243,5 +1243,17 @@ namespace DS4WinWPF.DS4Forms
|
|||||||
conReadingsUserCon.EnableControl(false);
|
conReadingsUserCon.EnableControl(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void TiltControlsButton_Click(object sender, RoutedEventArgs e)
|
||||||
|
{
|
||||||
|
Button btn = sender as Button;
|
||||||
|
DS4Controls control = (DS4Controls)Convert.ToInt32(btn.Tag);
|
||||||
|
MappedControl mpControl = mappingListVM.ControlMap[control];
|
||||||
|
BindingWindow window = new BindingWindow(deviceNum, mpControl.Setting);
|
||||||
|
window.Owner = App.Current.MainWindow;
|
||||||
|
window.ShowDialog();
|
||||||
|
mpControl.UpdateMappingName();
|
||||||
|
UpdateHighlightLabel(mpControl);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -67,8 +67,8 @@ namespace DS4WinWPF.DS4Forms.ViewModels
|
|||||||
|
|
||||||
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroZNeg, "Tilt Up", devType));
|
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroZNeg, "Tilt Up", devType));
|
||||||
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroZPos, "Tilt Down", devType));
|
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroZPos, "Tilt Down", devType));
|
||||||
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroXNeg, "Tilt Left", devType));
|
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroXPos, "Tilt Left", devType));
|
||||||
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroXPos, "Tilt Right", devType));
|
mappings.Add(new MappedControl(devIndex, DS4Controls.GyroXNeg, "Tilt Right", devType));
|
||||||
|
|
||||||
mappings.Add(new MappedControl(devIndex, DS4Controls.SwipeUp, "Swipe Up", devType));
|
mappings.Add(new MappedControl(devIndex, DS4Controls.SwipeUp, "Swipe Up", devType));
|
||||||
mappings.Add(new MappedControl(devIndex, DS4Controls.SwipeDown, "Swipe Down", devType));
|
mappings.Add(new MappedControl(devIndex, DS4Controls.SwipeDown, "Swipe Down", devType));
|
||||||
|
Loading…
Reference in New Issue
Block a user