Integrating github/staging through commit ab87ed9

This commit is contained in:
alexpete
2021-04-09 11:27:37 -07:00
parent ae62a97894
commit 1044dc3da1
1582 changed files with 29374 additions and 519051 deletions
+21 -5
View File
@@ -1556,7 +1556,6 @@ void CRenderViewport::OnEditorNotifyEvent(EEditorNotifyEvent event)
m_previousContext = SetCurrentContext();
}
SetCurrentCursor(STD_CURSOR_GAME);
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect();
}
}
break;
@@ -1564,7 +1563,6 @@ void CRenderViewport::OnEditorNotifyEvent(EEditorNotifyEvent event)
case eNotify_OnEndGameMode:
if (GetIEditor()->GetViewManager()->GetGameViewport() == this)
{
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect();
SetCurrentCursor(STD_CURSOR_DEFAULT);
if (m_renderer->GetCurrentContextHWND() != renderOverlayHWND())
{
@@ -2422,9 +2420,7 @@ void CRenderViewport::SetWindowTitle(const AZStd::string& title)
AzFramework::WindowSize CRenderViewport::GetClientAreaSize() const
{
const QWidget* window = this->window();
QSize windowSize = window->size();
return AzFramework::WindowSize(windowSize.width(), windowSize.height());
return AzFramework::WindowSize(m_rcClient.width(), m_rcClient.height());
}
@@ -2462,10 +2458,14 @@ void CRenderViewport::ConnectViewportInteractionRequestBus()
AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusConnect(GetViewportId());
AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusConnect(GetViewportId());
m_viewportUi.ConnectViewportUiBus(GetViewportId());
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect();
}
void CRenderViewport::DisconnectViewportInteractionRequestBus()
{
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect();
m_viewportUi.DisconnectViewportUiBus();
AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusDisconnect();
AzToolsFramework::ViewportInteraction::ViewportInteractionRequestBus::Handler::BusDisconnect();
@@ -4617,6 +4617,22 @@ void CRenderViewport::BuildDragDropContext(AzQtComponents::ViewportDragContext&
QtViewport::BuildDragDropContext(context, scaledPoint);
}
void* CRenderViewport::GetSystemCursorConstraintWindow() const
{
AzFramework::SystemCursorState systemCursorState = AzFramework::SystemCursorState::Unknown;
AzFramework::InputSystemCursorRequestBus::EventResult(
systemCursorState,
AzFramework::InputDeviceMouse::Id,
&AzFramework::InputSystemCursorRequests::GetSystemCursorState);
const bool systemCursorConstrained =
(systemCursorState == AzFramework::SystemCursorState::ConstrainedAndHidden ||
systemCursorState == AzFramework::SystemCursorState::ConstrainedAndVisible);
return systemCursorConstrained ? renderOverlayHWND() : nullptr;
}
void CRenderViewport::RestoreViewportAfterGameMode()
{
Matrix34 preGameModeViewTM = m_preGameModeViewTM;