Improvement for click detection when clicking quickly between mouse moves (#5786)
* improvement for click detection when clicking quickly between mouse moves Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * remove magic number and introduce constant Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com> * add missing update from camera test Signed-off-by: Tom Hulton-Harrop <82228511+hultonha@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
11f41a4467
commit
ebb24d2285
@@ -39,8 +39,16 @@ namespace SandboxEditor
|
||||
static bool IsMouseMove(const AzFramework::InputChannel& inputChannel);
|
||||
static AzToolsFramework::ViewportInteraction::KeyboardModifier GetKeyboardModifier(const AzFramework::InputChannel& inputChannel);
|
||||
|
||||
//! Represents the time and location of a click.
|
||||
struct ClickEvent
|
||||
{
|
||||
AZ::ScriptTimePoint m_time;
|
||||
AzFramework::ScreenPoint m_position;
|
||||
};
|
||||
|
||||
AzToolsFramework::ViewportInteraction::MouseInteraction m_mouseInteraction;
|
||||
AZStd::unordered_map<AzToolsFramework::ViewportInteraction::MouseButton, AZ::ScriptTimePoint> m_pendingDoubleClicks;
|
||||
AZ::ScriptTimePoint m_curTime;
|
||||
AZStd::unordered_map<AzToolsFramework::ViewportInteraction::MouseButton, ClickEvent> m_pendingDoubleClicks;
|
||||
|
||||
AZ::ScriptTimePoint m_currentTime;
|
||||
};
|
||||
} // namespace SandboxEditor
|
||||
|
||||
Reference in New Issue
Block a user