mirror of
https://github.com/aseprite/aseprite.git
synced 2024-09-02 13:09:27 +00:00
[lua] Dialog:canvas() will capture the mouse on mousedown/up by default
This commit is contained in:
parent
cdab75beed
commit
8eacee4c98
@ -70,6 +70,9 @@ bool Canvas::onProcessMessage(ui::Message* msg)
|
||||
}
|
||||
|
||||
case ui::kMouseDownMessage: {
|
||||
if (!hasCapture())
|
||||
captureMouse();
|
||||
|
||||
auto mouseMsg = static_cast<ui::MouseMessage*>(msg);
|
||||
MouseDown(mouseMsg);
|
||||
break;
|
||||
@ -78,6 +81,9 @@ bool Canvas::onProcessMessage(ui::Message* msg)
|
||||
case ui::kMouseUpMessage: {
|
||||
auto mouseMsg = static_cast<ui::MouseMessage*>(msg);
|
||||
MouseUp(mouseMsg);
|
||||
|
||||
if (hasCapture())
|
||||
releaseMouse();
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user