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

@ -11,6 +11,7 @@
#include "RootNode.h"
#include "Window.h"
#include "FileLogger.h"
#include <algorithm>
#include <iterator>
@ -293,7 +294,7 @@ bool Widget::onMouseEvent(const MouseEvent* event)
}
if(!inChild)
{
if(mVisible && contains(event->GetClientLocation()))
if(mVisible && contains(event->getClientLocation()))
{
onMyMouseEvent(event);
return true;
@ -308,13 +309,13 @@ bool Widget::onMouseEvent(const MouseEvent* event)
void Widget::onMyMouseEvent(const MouseEvent* event)
{
MLOG_INFO("Widget mouse event");
}
void Widget::updateBackground(const PaintEvent* event)
{
unsigned locX = mLocation.getX() + mMargin.mLeft;
unsigned locY = mLocation.getX() + mMargin.mTop;
unsigned locY = mLocation.getY() + mMargin.mTop;
unsigned deltaX = mSize.mWidth - mMargin.mLeft - mMargin.mRight;
unsigned deltaY = mSize.mHeight - mMargin.mTop - mMargin.mBottom;
@ -335,6 +336,8 @@ void Widget::updateBackground(const PaintEvent* event)
if (mMaterialDirty)
{
mBackgroundNode->setFillColor(mBackgroundColor);
mBackgroundNode->setStrokeColor(mBorderColor);
mBackgroundNode->setStrokeThickness(mBorderThickness);
}
if (mVisibilityDirty)