Integrating github/staging through commit ab87ed9
This commit is contained in:
@@ -692,7 +692,6 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event)
|
||||
m_previousContext = SetCurrentContext();
|
||||
}
|
||||
SetCurrentCursor(STD_CURSOR_GAME);
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -700,7 +699,6 @@ void EditorViewportWidget::OnEditorNotifyEvent(EEditorNotifyEvent event)
|
||||
case eNotify_OnEndGameMode:
|
||||
if (GetIEditor()->GetViewManager()->GetGameViewport() == this)
|
||||
{
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect();
|
||||
SetCurrentCursor(STD_CURSOR_DEFAULT);
|
||||
if (gSettings.bEnableGameModeVR)
|
||||
{
|
||||
@@ -894,10 +892,6 @@ void EditorViewportWidget::OnBeginPrepareRender()
|
||||
|
||||
GetIEditor()->GetSystem()->SetViewCamera(m_Camera);
|
||||
|
||||
CGameEngine* ge = GetIEditor()->GetGameEngine();
|
||||
|
||||
bool levelIsDisplayable = (ge && ge->IsLevelLoaded() && GetIEditor()->GetDocument() && GetIEditor()->GetDocument()->IsDocumentReady());
|
||||
|
||||
PreWidgetRendering();
|
||||
|
||||
RenderAll();
|
||||
@@ -1251,10 +1245,14 @@ void EditorViewportWidget::ConnectViewportInteractionRequestBus()
|
||||
AzToolsFramework::ViewportInteraction::ViewportFreezeRequestBus::Handler::BusConnect(GetViewportId());
|
||||
AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusConnect(GetViewportId());
|
||||
m_viewportUi.ConnectViewportUiBus(GetViewportId());
|
||||
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusConnect();
|
||||
}
|
||||
|
||||
void EditorViewportWidget::DisconnectViewportInteractionRequestBus()
|
||||
{
|
||||
AzFramework::InputSystemCursorConstraintRequestBus::Handler::BusDisconnect();
|
||||
|
||||
m_viewportUi.DisconnectViewportUiBus();
|
||||
AzToolsFramework::ViewportInteraction::MainEditorViewportInteractionRequestBus::Handler::BusDisconnect();
|
||||
AzToolsFramework::ViewportInteraction::ViewportFreezeRequestBus::Handler::BusDisconnect();
|
||||
@@ -2799,6 +2797,20 @@ void EditorViewportWidget::UpdateCurrentMousePos(const QPoint& newPosition)
|
||||
m_mousePos = newPosition;
|
||||
}
|
||||
|
||||
void* EditorViewportWidget::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 EditorViewportWidget::BuildDragDropContext(AzQtComponents::ViewportDragContext& context, const QPoint& pt)
|
||||
{
|
||||
const auto scaledPoint = WidgetToViewport(pt);
|
||||
|
||||
Reference in New Issue
Block a user