1
0
Fork 0
mirror of https://github.com/hawkeye-stan/msfs-popout-panel-manager.git synced 2024-11-23 22:30:09 +00:00

Update camera logic

This commit is contained in:
hawkeye 2023-09-08 11:12:47 -04:00
parent c43c520b19
commit 65f32c1ccc
12 changed files with 52 additions and 39 deletions

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.DomainModel</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.6</Version>
<AssemblyVersion>4.0.2.6</AssemblyVersion>
<FileVersion>4.0.2.6</FileVersion>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>

View file

@ -14,9 +14,9 @@
<RootNamespace>MSFSPopoutPanelManager.MainApp</RootNamespace>
<ApplicationIcon>logo.ico</ApplicationIcon>
<Platforms>x64</Platforms>
<Version>4.0.2.6</Version>
<AssemblyVersion>4.0.2.6</AssemblyVersion>
<FileVersion>4.0.2.6</FileVersion>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<DebugType>embedded</DebugType>
<SatelliteResourceLanguages>en</SatelliteResourceLanguages>
<!-- Publishing options -->

View file

@ -381,7 +381,7 @@
</WrapPanel>
<WrapPanel Margin="0,20,20,0" Orientation="Vertical">
<TextBlock Style="{StaticResource TextBlockHeading}">Enable Panel Reset When Profile Is Locked</TextBlock>
<TextBlock Style="{StaticResource TextBlockHeading}">Enable Tracking of Panels When Profile Is Locked</TextBlock>
<Line
Stretch="Fill"
Stroke="Gray"
@ -389,7 +389,7 @@
<WrapPanel>
<ToggleButton IsChecked="{Binding AppSettingData.ApplicationSetting.PopOutSetting.EnablePanelResetWhenLocked, Mode=TwoWay}" Style="{StaticResource ToggleButton}" />
<TextBlock Style="{StaticResource TextBlockLabel}">
Enable panel to go back to its original location when move if the profile is locked. Disable this setting will allow panel to be moved when profile is locked
Enable tracking of panels to allow panel to go back to its original location when move if the profile is locked. Disable this setting will allow panel to be moved when profile is locked
but the profile setting will be unchanged. With this setting disable, Pop Out Panel Manager will no longer detect pop out panel's movement when profile is locked which may save some CPU cycles.
</TextBlock>
</WrapPanel>

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.Orchestration</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.6</Version>
<AssemblyVersion>4.0.2.6</AssemblyVersion>
<FileVersion>4.0.2.6</FileVersion>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>

View file

@ -21,7 +21,6 @@ namespace MSFSPopoutPanelManager.Orchestration
private ProfileData _profileData;
private AppSettingData _appSettingData;
private FlightSimData _flightSimData;
private int _prePopOutCockpitZoomLevel = 50;
public PanelPopOutOrchestrator(ProfileData profileData, AppSettingData appSettingData, FlightSimData flightSimData)
{
@ -207,9 +206,6 @@ namespace MSFSPopoutPanelManager.Orchestration
}
else
{
// Remember current game's zoom level to be recall after pop out
_prePopOutCockpitZoomLevel = _flightSimData.CockpitCameraZoom;
WorkflowStepWithMessage.Execute("Resetting camera view", () =>
{
ResetCockpitView();
@ -553,11 +549,6 @@ namespace MSFSPopoutPanelManager.Orchestration
ResetCockpitView();
}, true);
WorkflowStepWithMessage.Execute("Setting camera zoom level", () =>
{
SetCockpitZoomLevel(_prePopOutCockpitZoomLevel);
}, true);
break;
case AfterPopOutCameraViewType.CustomCameraView:
WorkflowStepWithMessage.Execute("Resetting camera view", () =>
@ -570,11 +561,6 @@ namespace MSFSPopoutPanelManager.Orchestration
return LoadCustomView(AppSetting.PopOutSetting.AfterPopOutCameraView.KeyBinding);
}, true);
WorkflowStepWithMessage.Execute("Setting camera zoom level", () =>
{
SetCockpitZoomLevel(_prePopOutCockpitZoomLevel);
}, true);
break;
}
}

View file

@ -129,7 +129,6 @@ namespace MSFSPopoutPanelManager.Orchestration
{
Thread.Sleep(500); // wait for custom view save to be completed
FlightSimOrchestrator.ResetCameraView();
WindowActionManager.BringWindowToForeground(ApplicationHandle);
// Turn TrackIR back on

View file

@ -1,7 +1,7 @@
## Version 4.0.2
* Added new logic (not based on timing) to detect when flight session is ready to initiate pop out process for auto pop out panel. You can also set Auto Pop Out Panel Delay in preferences to 0 seconds if you have a fast PC.
* Fixed camera logic to save and load custom camera view used by Pop Out Panel Manager. This is to work around camera issue since AAU2. Also, pop out progress messages will now show steps being taken when adjusting camera view.
* Added failure state when custom camera view fails to load. Pop Out Panel Manager will try to load the user specified custom camera (Ctrl-Alt-X/Alt-X where X is the camera defined in preference setting) for 10 seconds and when it fails, POPM will no longer try to pop out panels.
* Added workaround for MSFS bug when using cockpit camera zoom setting (POV) is set to value other than 50 in MSFS general options. Now, camera POV (zoom, height, horizontal position) can be freely adjusted without affecting how panel source definitions are configured.
@ -11,4 +11,10 @@
* Added configurable keyboard shortcut to initiate pop out process (default is Ctrl-Shift-O). This keyboard shortcut can be configured in preference setting. This setting can be disabled to improve computing resource needed to constantly detect keyboard inputs.
* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration.
* Updated camera logic to save and load custom camera view used by Pop Out Panel Manager. This is to work around camera issue since AAU2. Also, pop out progress messages will now show steps being taken when adjusting camera view.
* Fixed an issue where full screen mode for pop out panel does not work on certain aircraft configuration.
* Fixed an issue when manually closing pop out will reset profile panel configuration's width and height to 0 when the profile is unlocked.
* Fixed logic where after panel source selection is completed, Pop Out Panel Manager will no longer recenter camera view. This is to remove confusion since Pop Out Manager has no way to tell the previous camera view you're on when panel source selection started.

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.Shared</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.6</Version>
<AssemblyVersion>4.0.2.6</AssemblyVersion>
<FileVersion>4.0.2.6</FileVersion>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.SimConnectAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.6</Version>
<AssemblyVersion>4.0.2.6</AssemblyVersion>
<FileVersion>4.0.2.6</FileVersion>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>

View file

@ -4,7 +4,7 @@
## Version 4.0.2
* Added new logic (not based on timing) to detect when flight session is ready to initiate pop out process for auto pop out panel. You can also set Auto Pop Out Panel Delay in preferences to 0 seconds if you have a fast PC.
* Fixed camera logic to save and load custom camera view used by Pop Out Panel Manager. This is to work around camera issue since AAU2. Also, pop out progress messages will now show steps being taken when adjusting camera view.
* Added failure state when custom camera view fails to load. Pop Out Panel Manager will try to load the user specified custom camera (Ctrl-Alt-X/Alt-X where X is the camera defined in preference setting) for 10 seconds and when it fails, POPM will no longer try to pop out panels.
* Added workaround for MSFS bug when using cockpit camera zoom setting (POV) is set to value other than 50 in MSFS general options. Now, camera POV (zoom, height, horizontal position) can be freely adjusted without affecting how panel source definitions are configured.
@ -14,7 +14,13 @@
* Added configurable keyboard shortcut to initiate pop out process (default is Ctrl-Shift-O). This keyboard shortcut can be configured in preference setting. This setting can be disabled to improve computing resource needed to constantly detect keyboard inputs.
* Fixed issue where full screen mode for pop out panel does not work on certain aircraft configuration.
* Updated camera logic to save and load custom camera view used by Pop Out Panel Manager. This is to work around camera issue since AAU2. Also, pop out progress messages will now show steps being taken when adjusting camera view.
* Fixed an issue where full screen mode for pop out panel does not work on certain aircraft configuration.
* Fixed an issue when manually closing pop out will reset profile panel configuration's width and height to 0 when the profile is unlocked.
* Fixed logic where after panel source selection is completed, Pop Out Panel Manager will no longer recenter camera view. This is to remove confusion since Pop Out Manager has no way to tell the previous camera view you're on when panel source selection started.
## Version 4.0.1.2
* Hotfix - Fixed issue where using touch panel feature may freeze computer and the application.

View file

@ -117,6 +117,15 @@ namespace MSFSPopoutPanelManager.WindowsAgent
}
else
{
// Pop out is closed
var rect = WindowActionManager.GetWindowRectangle(panelConfig.PanelHandle);
if (rect.Width == 0 && rect.Height == 0)
{
panelConfig.PanelHandle = IntPtr.MaxValue;
_prevShowWinCmd = null;
return;
}
WINDOWPLACEMENT wp = new WINDOWPLACEMENT();
wp.length = System.Runtime.InteropServices.Marshal.SizeOf(wp);
PInvoke.GetWindowPlacement(hwnd, ref wp);
@ -164,6 +173,13 @@ namespace MSFSPopoutPanelManager.WindowsAgent
private static void UpdatePanelCoordinates(PanelConfig panelConfig)
{
var rect = WindowActionManager.GetWindowRectangle(panelConfig.PanelHandle);
if (rect.Width == 0 && rect.Height == 0) // don't set if width and height = 0
{
panelConfig.PanelHandle = IntPtr.MaxValue;
return;
}
panelConfig.Left = rect.Left;
panelConfig.Top = rect.Top;

View file

@ -11,9 +11,9 @@
<PackageProjectUrl>https://github.com/hawkeye-stan/msfs-popout-panel-manager</PackageProjectUrl>
<RootNamespace>MSFSPopoutPanelManager.WindowsAgent</RootNamespace>
<Platforms>x64</Platforms>
<Version>4.0.2.6</Version>
<AssemblyVersion>4.0.2.6</AssemblyVersion>
<FileVersion>4.0.2.6</FileVersion>
<Version>4.0.2.7</Version>
<AssemblyVersion>4.0.2.7</AssemblyVersion>
<FileVersion>4.0.2.7</FileVersion>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<DebugType>Embedded</DebugType>
<Configurations>Debug;Release;Local</Configurations>