Skip to content

Commit 85ac467

Browse files
committed
Add button to launch the SteamVR bindings interface for the application
1 parent 4d33691 commit 85ac467

4 files changed

Lines changed: 14 additions & 2 deletions

File tree

OpenVR2Key/MainController.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,5 +343,10 @@ private void SimulateKeyPress(InputDigitalActionData_t data, Tuple<Key[], Virtua
343343
}
344344
}
345345
#endregion
346+
347+
public void LaunchBindings()
348+
{
349+
OpenVR.Input.OpenBindingUI("", 0, 0, true);
350+
}
346351
}
347352
}

OpenVR2Key/MainWindow.xaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
<WrapPanel Orientation="Horizontal" Margin="5">
5555
<Button x:Name="ButtonAppBinding" Margin="5,0,5,5" Focusable="False" Content="Add/remove app specific config" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="5" Click="Button_AppBinding_Click" />
5656
<Button x:Name="ButtonClearAll" Margin="5,0,5,5" Focusable="False" Content="Clear all current mappings" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="5" Click="Button_ClearAll_Click"/>
57-
<Button x:Name="ButtonFolder" Visibility="Hidden" Margin="5,0,5,5" Focusable="False" Content="Open config folder" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="5" Click="Button_Folder_Click"/>
57+
<Button x:Name="ButtonLaunchBindings" Margin="5, 0, 5, 5" Focusable="False" Content="Launch bindings editor" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="5" Click="Button_LaunchBindings_Click" IsEnabled="False"/>
58+
<Button x:Name="ButtonFolder" Visibility="Collapsed" Margin="5,0,5,5" Focusable="False" Content="Open config folder" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="5" Click="Button_Folder_Click"/>
5859
</WrapPanel>
5960
</GroupBox>
6061
<GroupBox Header="Mapping" Margin="10 0 10 10" HorizontalAlignment="Stretch" Background="MintCream">

OpenVR2Key/MainWindow.xaml.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ public MainWindow()
5353
{
5454
LabelOpenVr.Content = message;
5555
LabelOpenVr.Background = color;
56+
ButtonLaunchBindings.IsEnabled = connected;
5657
if (!connected && _initDone && MainModel.LoadSetting(MainModel.Setting.ExitWithSteam)) {
5758
WindowUtils.DestroyTrayIcon();
5859
Application.Current.Shutdown();
@@ -327,6 +328,11 @@ private void Button_Folder_Click(object sender, RoutedEventArgs e)
327328
{
328329
_controller.OpenConfigFolder();
329330
}
331+
332+
private void Button_LaunchBindings_Click(object sender, RoutedEventArgs e)
333+
{
334+
_controller.LaunchBindings();
335+
}
330336
#endregion
331337

332338
#region bindings

OpenVR2Key/Properties/Resources.resx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,6 @@
128128
<value>..\resources\logo.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
129129
</data>
130130
<data name="Version" xml:space="preserve">
131-
<value>v2.0.3</value>
131+
<value>v2.1.0</value>
132132
</data>
133133
</root>

0 commit comments

Comments
 (0)