#include <MouseEvent.h>

#include "DragElement.h"

using namespace Framework;

DragElement::DragElement()
	: ImageView()
{
	setStyle(ImageView::Style::Visible | ImageView::Style::Alpha | ImageView::Style::Scaled | ImageView::Style::Allowed | ImageView::Style::MEIgnoreProcessed | ImageView::Style::MEIgnoreInside | ImageView::Style::MEIgnoreParentInside);
	setSize(50, 50);
	setMouseEvent(_ret1ME);
}

void DragElement::doMouseEvent(Framework::MouseEvent& me, bool userRet)
{
	setPosition(pos.x + me.mx, pos.y + me.my);
}