Simplify ResetInputChannels
This commit is contained in:
@@ -89,19 +89,11 @@ namespace AzFramework
|
||||
return;
|
||||
}
|
||||
|
||||
for (const auto priority : {
|
||||
ViewportControllerPriority::Highest,
|
||||
ViewportControllerPriority::High,
|
||||
ViewportControllerPriority::Normal,
|
||||
ViewportControllerPriority::Low,
|
||||
ViewportControllerPriority::Lowest })
|
||||
for (const auto& controllerList : m_controllers)
|
||||
{
|
||||
if (auto priorityListIt = m_controllers.find(priority); priorityListIt != m_controllers.end())
|
||||
for (const auto& controller : controllerList.second)
|
||||
{
|
||||
for (const auto& controller : priorityListIt->second)
|
||||
{
|
||||
controller->ResetInputChannels();
|
||||
}
|
||||
controller->ResetInputChannels();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace AzFramework
|
||||
//! InputChannelEvents are sent to controllers in priority order (from the lowest priority value to the highest).
|
||||
bool HandleInputChannelEvent(const AzFramework::ViewportControllerInputEvent& event) override;
|
||||
//! Dispatches a ResetInputChannels call to all controllers registered to this list.
|
||||
//! Calls to controllers are made in priority order (from the lowest priority value to the highest).
|
||||
//! Calls to controllers are made in an undefined order.
|
||||
void ResetInputChannels() override;
|
||||
//! Dispatches an update tick to all controllers registered to this list.
|
||||
//! This occurs in *reverse* priority order (i.e. from the highest priority value to the lowest) so that
|
||||
|
||||
Reference in New Issue
Block a user