Skip to content

Commit 5bc7533

Browse files
author
Sebastian Pape
committed
Adjusting to new DasherCore and fixing the coordinate input
1 parent 5092611 commit 5bc7533

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DasherCore

src/DasherUIScreen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ bool DasherUIScreen::SetCanvasSize(const ImVec2 position, const ImVec2 size)
110110
bool DasherUIScreen::GetScreenCoords(Dasher::screenint& iX, Dasher::screenint& iY, Dasher::CDasherView* pView)
111111
{
112112
const ImVec2 MousePos = ImGui::GetMousePos();
113-
if (MousePos.x < 0 || MousePos.y < 0) return false;
113+
if(!ImGui::IsMousePosValid(&MousePos)) return false;
114114
iX = static_cast<Dasher::screenint>(MousePos.x - CanvasPos.x);
115115
iY = static_cast<Dasher::screenint>(MousePos.y - CanvasPos.y);
116116
return true;

0 commit comments

Comments
 (0)