Skip to content

Commit

Permalink
misc UI improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
Valkirie committed Jun 24, 2023
1 parent b2cf4d3 commit 27f4b72
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 9 deletions.
12 changes: 12 additions & 0 deletions HandheldCompanion/Managers/GamepadFocusManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,18 @@ private void InputsUpdated(ControllerState controllerState)
}
break;

case "ComboBox":
{
ComboBox comboBox = (ComboBox)focusedElement;
switch(comboBox.IsDropDownOpen)
{
case true:
comboBox.IsDropDownOpen = false;
break;
}
}
return;

case "ComboBoxItem":
{
ComboBox comboBox = ItemsControl.ItemsControlFromItemContainer(focusedElement) as ComboBox;
Expand Down
19 changes: 10 additions & 9 deletions HandheldCompanion/Views/Pages/LayoutPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
d:Visibility="Visible"
Spacing="12">

<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="Layout picker" />
<TextBlock Style="{StaticResource BaseTextBlockStyle}" Text="Layout template picker" />
<ComboBox
Name="cB_Layouts"
HorizontalAlignment="Stretch"
Expand All @@ -115,21 +115,21 @@
Checked="CheckBoxDeviceLayouts_Checked"
IsChecked="True"
Unchecked="CheckBoxDeviceLayouts_Checked">
Show current controller layouts only
Show current controller templates only
</CheckBox>

<ui:SimpleStackPanel
HorizontalAlignment="Right"
Orientation="Horizontal"
Spacing="6">

<!-- Apply layout -->
<!-- Apply template -->
<Button
Name="ButtonApplyLayout"
Click="ButtonApplyLayout_Click"
IsEnabled="False"
Style="{DynamicResource AccentButtonStyle}">
Apply layout
Apply template
</Button>

<!-- Export layout -->
Expand All @@ -156,11 +156,12 @@
Name="LayoutAuthor"
HorizontalAlignment="Stretch"
ui:ControlHelper.Header="Layout author" />
<CheckBox x:Name="ExportForCurrent"
Content="Export for current controller" />
<CheckBox x:Name="SaveGameInfo"
Content="Save game information with the layout"
IsChecked="True" Click="SaveGameInfo_Toggled" />
<CheckBox x:Name="ExportForCurrent" Content="Export for current controller" />
<CheckBox
x:Name="SaveGameInfo"
Click="SaveGameInfo_Toggled"
Content="Save game information with the layout"
IsChecked="True" />

<!-- Separator -->
<Separator
Expand Down
Binary file modified Resources/Inkore.UI.WPF.Modern.dll
Binary file not shown.

0 comments on commit 27f4b72

Please sign in to comment.