consider hotspot of cursor for better loupe movement.
This commit is contained in:
@@ -464,4 +464,16 @@ int Cursor::GetPitch() const
|
||||
int Cursor::GetType() const
|
||||
{
|
||||
return shapeInfo_.Type;
|
||||
}
|
||||
|
||||
|
||||
int Cursor::GetHotSpotX() const
|
||||
{
|
||||
return shapeInfo_.HotSpot.x;
|
||||
}
|
||||
|
||||
|
||||
int Cursor::GetHotSpotY() const
|
||||
{
|
||||
return shapeInfo_.HotSpot.y;
|
||||
}
|
||||
@@ -30,6 +30,8 @@ public:
|
||||
int GetHeight() const;
|
||||
int GetPitch() const;
|
||||
int GetType() const;
|
||||
int GetHotSpotX() const;
|
||||
int GetHotSpotY() const;
|
||||
|
||||
private:
|
||||
bool isVisible_ = false;
|
||||
|
||||
@@ -340,6 +340,18 @@ extern "C"
|
||||
return g_manager->GetCursor()->GetType();
|
||||
}
|
||||
|
||||
UNITY_INTERFACE_EXPORT int UNITY_INTERFACE_API GetCursorHotSpotX()
|
||||
{
|
||||
if (!g_manager) return -1;
|
||||
return g_manager->GetCursor()->GetHotSpotX();
|
||||
}
|
||||
|
||||
UNITY_INTERFACE_EXPORT int UNITY_INTERFACE_API GetCursorHotSpotY()
|
||||
{
|
||||
if (!g_manager) return -1;
|
||||
return g_manager->GetCursor()->GetHotSpotY();
|
||||
}
|
||||
|
||||
UNITY_INTERFACE_EXPORT void UNITY_INTERFACE_API GetCursorTexture(ID3D11Texture2D* texture)
|
||||
{
|
||||
if (!g_manager) return;
|
||||
|
||||
Reference in New Issue
Block a user