Skip to content

Commit

Permalink
improve gamepad navigation experience with tooltip display on sliders
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkirie committed Oct 31, 2023
1 parent dd97e0b commit 9a3e78e
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 1 deletion.
9 changes: 9 additions & 0 deletions HandheldCompanion/Controls/Mapping/AxisMapping.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="90"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis_Rotation_Slider_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -186,6 +187,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis_InnerDeadzone_Slider_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -222,6 +224,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis_OuterDeadzone_Slider_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -257,6 +260,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis_AntiDeadZone_Slider_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -333,6 +337,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="90"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MouseRotation_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -368,6 +373,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MousePointerSpeed_ValueChanged"
Value="33" />
</ui:SimpleStackPanel>
Expand Down Expand Up @@ -405,6 +411,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="0.05"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MouseAcceleration_ValueChanged"
Value="1.00" />
</ui:SimpleStackPanel>
Expand Down Expand Up @@ -468,6 +475,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="0.005"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MouseFilterCutoff_ValueChanged"
Value="0.05" />

Expand Down Expand Up @@ -505,6 +513,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MouseDeadzone_ValueChanged"
Value="10" />
</ui:SimpleStackPanel>
Expand Down
2 changes: 2 additions & 0 deletions HandheldCompanion/Controls/Mapping/ButtonMapping.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="50"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="LongPressDelaySlider_ValueChanged"
Value="450" />

Expand Down Expand Up @@ -228,6 +229,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="5"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Turbo_Slider_ValueChanged"
Value="30" />

Expand Down
9 changes: 9 additions & 0 deletions HandheldCompanion/Controls/Mapping/GyroMapping.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="0.1"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Slider_GyroWeight_ValueChanged" />
</DockPanel>
</Grid>
Expand Down Expand Up @@ -291,6 +292,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="90"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis_Rotation_Slider_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -327,6 +329,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis_InnerDeadzone_Slider_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -363,6 +366,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis_OuterDeadzone_Slider_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -398,6 +402,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis_AntiDeadZone_Slider_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -474,6 +479,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="90"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MouseRotation_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -509,6 +515,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MousePointerSpeed_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -545,6 +552,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="0.05"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MouseAcceleration_ValueChanged"
Value="1.00" />
</ui:SimpleStackPanel>
Expand Down Expand Up @@ -581,6 +589,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Axis2MouseDeadzone_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down
3 changes: 3 additions & 0 deletions HandheldCompanion/Controls/Mapping/TriggerMapping.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Trigger2TriggerInnerDeadzone_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -134,6 +135,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Trigger2TriggerOuterDeadzone_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down Expand Up @@ -169,6 +171,7 @@
ScrollViewer.PanningMode="HorizontalOnly"
Style="{DynamicResource SliderStyle1}"
TickFrequency="1"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Trigger2TriggerAntiDeadzone_ValueChanged" />
</ui:SimpleStackPanel>
</Grid>
Expand Down
1 change: 1 addition & 0 deletions HandheldCompanion/Views/Pages/ControllerPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="5"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="SliderStrength_ValueChanged"
Value="100" />
</DockPanel>
Expand Down
2 changes: 2 additions & 0 deletions HandheldCompanion/Views/Pages/DevicePage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="5"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="SliderLEDBrightness_ValueChanged"
Value="100" />
</DockPanel>
Expand Down Expand Up @@ -366,6 +367,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="5"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="SliderLEDSpeed_ValueChanged"
Value="100" />
</DockPanel>
Expand Down
7 changes: 7 additions & 0 deletions HandheldCompanion/Views/Pages/OverlayPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="100"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="SliderOnScreenUpdateRate_ValueChanged" />
</DockPanel>
</Grid>
Expand Down Expand Up @@ -315,6 +316,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="50"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="SliderControllerSize_ValueChanged" />
</DockPanel>
</Grid>
Expand Down Expand Up @@ -369,6 +371,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="0.1"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N1, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="SliderControllerOpacity_ValueChanged" />
</DockPanel>
</Grid>
Expand Down Expand Up @@ -548,6 +551,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="5"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Slider_Framerate_ValueChanged" />
</DockPanel>
</Grid>
Expand Down Expand Up @@ -679,6 +683,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="5"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N1, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="Slider_RestingPitch_ValueChanged" />
</DockPanel>
</Grid>
Expand Down Expand Up @@ -794,6 +799,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="50"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N0, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="SliderTrackpadsSize_ValueChanged" />
</DockPanel>
</Grid>
Expand Down Expand Up @@ -848,6 +854,7 @@
Style="{DynamicResource SliderStyle1}"
TickFrequency="0.01"
TickPlacement="BottomRight"
ToolTip="{Binding Value, StringFormat=N2, RelativeSource={RelativeSource Self}, Mode=OneWay}"
ValueChanged="SliderTrackpadsOpacity_ValueChanged" />
</DockPanel>
</Grid>
Expand Down
Loading

0 comments on commit 9a3e78e

Please sign in to comment.