Add win32 mouse button events.

This commit is contained in:
jmsgrogan 2023-01-17 08:34:48 +00:00
parent 2bc53186bc
commit 78a4fa99ff
20 changed files with 141 additions and 53 deletions

View file

@ -6,8 +6,6 @@
#include "TransformNode.h"
#include "CircleNode.h"
#include <iostream>
CanvasDrawingArea::~CanvasDrawingArea()
{
@ -40,14 +38,14 @@ void CanvasDrawingArea::doPaint(const PaintEvent* event)
void CanvasDrawingArea::onMyMouseEvent(const MouseEvent* event)
{
if(event->GetAction() == MouseEvent::Action::Pressed)
if(event->getAction() == MouseEvent::Action::Pressed)
{
}
else if(event->GetAction() == MouseEvent::Action::Released)
else if(event->getAction() == MouseEvent::Action::Released)
{
auto client_loc = event->GetClientLocation();
auto screen_loc = event->GetScreenLocation();
auto client_loc = event->getClientLocation();
auto screen_loc = event->getScreenLocation();
addShapeAt(client_loc.getX(), client_loc.getY());
}