Add EntityContextId argument to focus interface functions that don't deal with entityIds.

Signed-off-by: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com>
This commit is contained in:
Danilo Aimini
2021-09-28 18:41:46 -07:00
parent c204aa1abe
commit 9a325c657d
8 changed files with 36 additions and 30 deletions
@@ -26,11 +26,11 @@ namespace AzToolsFramework
virtual void SetFocusRoot(AZ::EntityId entityId) = 0;
//! Clears the Editor focus, allowing the user to select the whole level again.
virtual void ClearFocusRoot() = 0;
virtual void ClearFocusRoot(AzFramework::EntityContextId entityContextId) = 0;
//! Returns the entity id of the root of the current Editor focus.
//! @return The entity id of the root of the Editor focus, or an invalid entity id if no focus is set.
virtual AZ::EntityId GetFocusRoot() = 0;
virtual AZ::EntityId GetFocusRoot(AzFramework::EntityContextId entityContextId) = 0;
//! Returns whether the entity id provided is part of the focused sub-tree.
virtual bool IsInFocusSubTree(AZ::EntityId entityId) const = 0;
@@ -76,12 +76,12 @@ namespace AzToolsFramework
// TODO - If m_focusRoot != AZ::EntityId(), activate focus mode via ViewportEditorModeTrackerInterface; else, deactivate focus mode
}
void FocusModeSystemComponent::ClearFocusRoot()
void FocusModeSystemComponent::ClearFocusRoot([[maybe_unused]] AzFramework::EntityContextId entityContextId)
{
SetFocusRoot(AZ::EntityId());
}
AZ::EntityId FocusModeSystemComponent::GetFocusRoot()
AZ::EntityId FocusModeSystemComponent::GetFocusRoot([[maybe_unused]] AzFramework::EntityContextId entityContextId)
{
return m_focusRoot;
}
@@ -40,8 +40,8 @@ namespace AzToolsFramework
// FocusModeInterface overrides ...
void SetFocusRoot(AZ::EntityId entityId) override;
void ClearFocusRoot() override;
AZ::EntityId GetFocusRoot() override;
void ClearFocusRoot(AzFramework::EntityContextId entityContextId) override;
AZ::EntityId GetFocusRoot(AzFramework::EntityContextId entityContextId) override;
bool IsInFocusSubTree(AZ::EntityId entityId) const override;
private: