mirror of
https://github.com/wolfpld/tracy.git
synced 2025-03-20 07:40:02 +08:00
Add wrapper for ImGui mouse handling.
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
#include "TracyMouse.hpp"
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
bool IsMouseDown( ImGuiMouseButton button )
|
||||
{
|
||||
return ImGui::IsMouseDown( button );
|
||||
}
|
||||
|
||||
bool IsMouseClicked( ImGuiMouseButton button )
|
||||
{
|
||||
return ImGui::IsMouseClicked( button );
|
||||
}
|
||||
|
||||
bool IsMouseDragging( ImGuiMouseButton button, float lock_threshold )
|
||||
{
|
||||
return ImGui::IsMouseDragging( button, lock_threshold );
|
||||
}
|
||||
|
||||
ImVec2 GetMouseDragDelta( ImGuiMouseButton button, float lock_threshold )
|
||||
{
|
||||
return ImGui::GetMouseDragDelta( button, lock_threshold );
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
#ifndef __TRACYMOUSE_HPP__
|
||||
#define __TRACYMOUSE_HPP__
|
||||
|
||||
#include "../imgui/imgui.h"
|
||||
|
||||
namespace tracy
|
||||
{
|
||||
|
||||
bool IsMouseDown( ImGuiMouseButton button );
|
||||
bool IsMouseClicked( ImGuiMouseButton button );
|
||||
bool IsMouseDragging( ImGuiMouseButton button, float lock_threshold = -1.f );
|
||||
ImVec2 GetMouseDragDelta( ImGuiMouseButton button, float lock_threshold = -1.f );
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user