Skip to content

Commit

Permalink
Improve face camera functionality. (#178)
Browse files Browse the repository at this point in the history
  • Loading branch information
CasperH2O authored Jun 22, 2022
1 parent 2a4e448 commit c0aa287
Show file tree
Hide file tree
Showing 10 changed files with 126 additions and 126 deletions.
48 changes: 15 additions & 33 deletions HandheldCompanion/Properties/Resources.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions HandheldCompanion/Properties/Resources.fr.resx
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,24 @@
<data name="OverlayPage_BackButton" xml:space="preserve">
<value>Retour</value>
</data>
<data name="OverlayPage_CameraAnglePitch" xml:space="preserve">
<value>Stationary pitch</value>
</data>
<data name="OverlayPage_CameraAnglePitchDesc" xml:space="preserve">
<value>Change the angle, in degree</value>
</data>
<data name="OverlayPage_ControllerOptions" xml:space="preserve">
<value>Options du contrôleur</value>
</data>
<data name="OverlayPage_EmulatedController" xml:space="preserve">
<value>Contrôleur émulé</value>
</data>
<data name="OverlayPage_FaceCamera" xml:space="preserve">
<value>Face camera</value>
</data>
<data name="OverlayPage_FaceCameraDesc" xml:space="preserve">
<value>3D Model slowly rotates to face camera as default position</value>
</data>
<data name="OverlayPage_MainTrigger" xml:space="preserve">
<value>Déclencheur principal</value>
</data>
Expand Down
24 changes: 9 additions & 15 deletions HandheldCompanion/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -267,35 +267,29 @@
<value>Back</value>
</data>
<data name="OverlayPage_CameraAngle" xml:space="preserve">
<value>Stationary angles</value>
<value>Face camera</value>
</data>
<data name="OverlayPage_CameraAngleDesc" xml:space="preserve">
<value>Change the respective roll, pitch and yaw angles of your stationary 3D overlay controller model</value>
<value>Change 3D overlay controller model behaviour for facing the camera</value>
</data>
<data name="OverlayPage_CameraAnglePitch" xml:space="preserve">
<value>Pitch</value>
<value>Stationary pitch</value>
</data>
<data name="OverlayPage_CameraAnglePitchDesc" xml:space="preserve">
<value>Change the angle, in degree</value>
</data>
<data name="OverlayPage_CameraAngleRoll" xml:space="preserve">
<value>Roll</value>
</data>
<data name="OverlayPage_CameraAngleRollDesc" xml:space="preserve">
<value>Change the angle, in degree</value>
</data>
<data name="OverlayPage_CameraAngleYaw" xml:space="preserve">
<value>Yaw</value>
</data>
<data name="OverlayPage_CameraAngleYawDesc" xml:space="preserve">
<value>Change the angle, in degree</value>
</data>
<data name="OverlayPage_ControllerOptions" xml:space="preserve">
<value>Controller options</value>
</data>
<data name="OverlayPage_EmulatedController" xml:space="preserve">
<value>Emulated controller</value>
</data>
<data name="OverlayPage_FaceCamera" xml:space="preserve">
<value>Face camera</value>
</data>
<data name="OverlayPage_FaceCameraDesc" xml:space="preserve">
<value>3D Model slowly rotates to face camera as default position</value>
</data>
<data name="OverlayPage_Listening" xml:space="preserve">
<value>Listening...</value>
</data>
Expand Down
12 changes: 12 additions & 0 deletions HandheldCompanion/Properties/Resources.zh-CN.resx
Original file line number Diff line number Diff line change
Expand Up @@ -259,12 +259,24 @@
<data name="OverlayPage_BackButton" xml:space="preserve">
<value>Back</value>
</data>
<data name="OverlayPage_CameraAnglePitch" xml:space="preserve">
<value>Stationary pitch</value>
</data>
<data name="OverlayPage_CameraAnglePitchDesc" xml:space="preserve">
<value>Change the angle, in degree</value>
</data>
<data name="OverlayPage_ControllerOptions" xml:space="preserve">
<value>手柄选项</value>
</data>
<data name="OverlayPage_EmulatedController" xml:space="preserve">
<value>模拟手柄</value>
</data>
<data name="OverlayPage_FaceCamera" xml:space="preserve">
<value>Face camera</value>
</data>
<data name="OverlayPage_FaceCameraDesc" xml:space="preserve">
<value>3D Model slowly rotates to face camera as default position</value>
</data>
<data name="OverlayPage_Listening" xml:space="preserve">
<value>侦听中...</value>
</data>
Expand Down
12 changes: 12 additions & 0 deletions HandheldCompanion/Properties/Resources.zh-Hant.resx
Original file line number Diff line number Diff line change
Expand Up @@ -258,12 +258,24 @@
<data name="OverlayPage_BackButton" xml:space="preserve">
<value>Back</value>
</data>
<data name="OverlayPage_CameraAnglePitch" xml:space="preserve">
<value>Stationary pitch</value>
</data>
<data name="OverlayPage_CameraAnglePitchDesc" xml:space="preserve">
<value>Change the angle, in degree</value>
</data>
<data name="OverlayPage_ControllerOptions" xml:space="preserve">
<value>手柄選項</value>
</data>
<data name="OverlayPage_EmulatedController" xml:space="preserve">
<value>模擬手柄</value>
</data>
<data name="OverlayPage_FaceCamera" xml:space="preserve">
<value>Face camera</value>
</data>
<data name="OverlayPage_FaceCameraDesc" xml:space="preserve">
<value>3D Model slowly rotates to face camera as default position</value>
</data>
<data name="OverlayPage_Listening" xml:space="preserve">
<value>偵聽中...</value>
</data>
Expand Down
14 changes: 13 additions & 1 deletion HandheldCompanion/Properties/Settings.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions HandheldCompanion/Properties/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -110,5 +110,8 @@
<Setting Name="SuspenderTriggerType" Type="System.Int32" Scope="User">
<Value Profile="(Default)">0</Value>
</Setting>
<Setting Name="OverlayFaceCamera" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">True</Value>
</Setting>
</Settings>
</SettingsFile>
53 changes: 15 additions & 38 deletions HandheldCompanion/Views/Pages/OverlayPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
<Expander Expanded="Expander_Expanded" HorizontalAlignment="Stretch">
<Expander.Header>
<DockPanel Margin="0,12,12,12">
<ui:FontIcon FontFamily="{DynamicResource SymbolThemeFontFamily}" Glyph="&#xE8B4;" Height="40" HorizontalAlignment="Center"/>
<ui:FontIcon FontFamily="{DynamicResource SymbolThemeFontFamily}" Glyph="&#xF617;" Height="40" HorizontalAlignment="Center"/>

<ui:SimpleStackPanel Margin="12,0,0,0" VerticalAlignment="Center">
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAngle}" FontSize="14"/>
Expand All @@ -271,71 +271,48 @@
<Expander.Content>
<ui:SimpleStackPanel Spacing="12" Margin="30,0,0,0">

<!-- Resting pitch -->
<!-- Face camera -->

<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*" MinWidth="200"></ColumnDefinition>
<ColumnDefinition Width="3*" MinWidth="120"></ColumnDefinition>
</Grid.ColumnDefinitions>

<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAnglePitch}" FontSize="14"/>
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAnglePitchDesc}" Foreground="{DynamicResource SystemControlForegroundBaseMediumBrush}" FontSize="12" TextWrapping="Wrap"/>
<TextBlock Text="{x:Static resx:Resources.OverlayPage_FaceCamera}" FontSize="14"/>
<TextBlock Text="{x:Static resx:Resources.OverlayPage_FaceCameraDesc}" Foreground="{DynamicResource SystemControlForegroundBaseMediumBrush}" FontSize="12" TextWrapping="Wrap"/>
</StackPanel>

<DockPanel Grid.Column="1" Margin="12,0,0,0">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Value, StringFormat=N1, ElementName=Slider_RestingPitch, Mode=OneWay}" />
<Slider Margin="6,0,0,0" Name="Slider_RestingPitch" VerticalAlignment="Center" AutoToolTipPlacement="TopLeft" Maximum="90" TickFrequency="5" TickPlacement="BottomRight" Minimum="-90" AutoToolTipPrecision="1" IsSnapToTickEnabled="True"
MouseEnter="Scrolllock_MouseEnter"
MouseLeave="Scrolllock_MouseLeave" LargeChange="10" SmallChange="5" ValueChanged="Slider_RestingPitch_ValueChanged"/>
</DockPanel>
</Grid>

<!-- Separator -->
<Separator BorderBrush="{DynamicResource SystemControlBackgroundChromeMediumBrush}" BorderThickness="0 1 0 0" Margin="-60,0,-60,0" />


<!-- Resting yaw -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*" MinWidth="200"></ColumnDefinition>
<ColumnDefinition Width="3*" MinWidth="120"></ColumnDefinition>
</Grid.ColumnDefinitions>

<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAngleYaw}" FontSize="14"/>
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAngleYawDesc}" Foreground="{DynamicResource SystemControlForegroundBaseMediumBrush}" FontSize="12" TextWrapping="Wrap"/>
</StackPanel>

<DockPanel Grid.Column="1" Margin="12,0,0,0">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Value, StringFormat=N1, ElementName=Slider_RestingYaw, Mode=OneWay}" />
<Slider Margin="6,0,0,0" Name="Slider_RestingYaw" VerticalAlignment="Center" AutoToolTipPlacement="TopLeft" Maximum="90" TickFrequency="5" TickPlacement="BottomRight" Minimum="-90" AutoToolTipPrecision="1" IsSnapToTickEnabled="True"
MouseEnter="Scrolllock_MouseEnter"
MouseLeave="Scrolllock_MouseLeave" LargeChange="10" SmallChange="5" ValueChanged="Slider_RestingYaw_ValueChanged"/>
</DockPanel>
<ui:ToggleSwitch Grid.Column="1" Width="40" HorizontalAlignment="Right" Name="Toggle_FaceCamera" Toggled="Toggle_FaceCamera_Toggled"/>
</Grid>

<!-- Separator -->
<Separator BorderBrush="{DynamicResource SystemControlBackgroundChromeMediumBrush}" BorderThickness="0 1 0 0" Margin="-60,0,-60,0" />

<!-- Resting roll -->

<!-- Resting pitch -->
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="5*" MinWidth="200"></ColumnDefinition>
<ColumnDefinition Width="3*" MinWidth="120"></ColumnDefinition>
</Grid.ColumnDefinitions>

<StackPanel Orientation="Vertical" VerticalAlignment="Center">
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAngleRoll}" FontSize="14"/>
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAngleRollDesc}" Foreground="{DynamicResource SystemControlForegroundBaseMediumBrush}" FontSize="12" TextWrapping="Wrap"/>
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAnglePitch}" FontSize="14"/>
<TextBlock Text="{x:Static resx:Resources.OverlayPage_CameraAnglePitchDesc}" Foreground="{DynamicResource SystemControlForegroundBaseMediumBrush}" FontSize="12" TextWrapping="Wrap"/>
</StackPanel>

<DockPanel Grid.Column="1" Margin="12,0,0,0">
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Value, StringFormat=N1, ElementName=Slider_RestingRoll, Mode=OneWay}" />
<Slider Margin="6,0,0,0" Name="Slider_RestingRoll" VerticalAlignment="Center" AutoToolTipPlacement="TopLeft" Maximum="90" TickFrequency="5" TickPlacement="BottomRight" Minimum="-90" AutoToolTipPrecision="1" IsSnapToTickEnabled="True"
<TextBlock VerticalAlignment="Center" HorizontalAlignment="Center" Text="{Binding Value, StringFormat=N1, ElementName=Slider_RestingPitch, Mode=OneWay}" />
<Slider Margin="6,0,0,0" Name="Slider_RestingPitch" VerticalAlignment="Center" AutoToolTipPlacement="TopLeft" Maximum="90" TickFrequency="5" TickPlacement="BottomRight" Minimum="0" AutoToolTipPrecision="1" IsSnapToTickEnabled="True"
MouseEnter="Scrolllock_MouseEnter"
MouseLeave="Scrolllock_MouseLeave" LargeChange="10" SmallChange="5" ValueChanged="Slider_RestingRoll_ValueChanged"/>
MouseLeave="Scrolllock_MouseLeave" LargeChange="10" SmallChange="5" ValueChanged="Slider_RestingPitch_ValueChanged" IsEnabled="False"/>
</DockPanel>
</Grid>

</ui:SimpleStackPanel>
</Expander.Content>
</Expander>
Expand Down
Loading

0 comments on commit c0aa287

Please sign in to comment.