|
|
|
|
@ -68,6 +68,7 @@ namespace AtomToolsFramework
|
|
|
|
|
{
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
const AzFramework::ViewportId newId = m_viewportContext->GetId();
|
|
|
|
|
|
|
|
|
|
SetControllerList(AZStd::make_shared<AzFramework::ViewportControllerList>());
|
|
|
|
|
|
|
|
|
|
@ -78,14 +79,14 @@ namespace AtomToolsFramework
|
|
|
|
|
m_viewportInteractionImpl = AZStd::make_unique<ViewportInteractionImpl>(m_defaultCamera);
|
|
|
|
|
m_viewportInteractionImpl->m_deviceScalingFactorFn = [this] { return aznumeric_cast<float>(devicePixelRatioF()); };
|
|
|
|
|
m_viewportInteractionImpl->m_screenSizeFn = [this] { return AzFramework::ScreenSize(width(), height()); };
|
|
|
|
|
m_viewportInteractionImpl->Connect(id);
|
|
|
|
|
m_viewportInteractionImpl->Connect(newId);
|
|
|
|
|
|
|
|
|
|
AzToolsFramework::ViewportInteraction::ViewportMouseCursorRequestBus::Handler::BusConnect(GetId());
|
|
|
|
|
AzFramework::InputChannelEventListener::Connect();
|
|
|
|
|
AZ::TickBus::Handler::BusConnect();
|
|
|
|
|
AzFramework::WindowRequestBus::Handler::BusConnect(params.windowHandle);
|
|
|
|
|
|
|
|
|
|
m_inputChannelMapper = new AzToolsFramework::QtEventToAzInputMapper(this, id);
|
|
|
|
|
m_inputChannelMapper = new AzToolsFramework::QtEventToAzInputMapper(this, newId);
|
|
|
|
|
|
|
|
|
|
// Forward input events to our controller list.
|
|
|
|
|
QObject::connect(m_inputChannelMapper, &AzToolsFramework::QtEventToAzInputMapper::InputChannelUpdated, this,
|
|
|
|
|
|