Canvas Event System: add missing currentTarget field.
This commit is contained in:
@@ -62,6 +62,12 @@ namespace canvas
|
||||
return target;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
ElementWeakPtr Event::getCurrentTarget() const
|
||||
{
|
||||
return current_target;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
double Event::getTime() const
|
||||
{
|
||||
|
||||
@@ -41,7 +41,8 @@ namespace canvas
|
||||
};
|
||||
|
||||
Type type;
|
||||
ElementWeakPtr target;
|
||||
ElementWeakPtr target,
|
||||
current_target;
|
||||
double time;
|
||||
bool propagation_stopped;
|
||||
|
||||
@@ -55,6 +56,7 @@ namespace canvas
|
||||
std::string getTypeString() const;
|
||||
|
||||
ElementWeakPtr getTarget() const;
|
||||
ElementWeakPtr getCurrentTarget() const;
|
||||
|
||||
double getTime() const;
|
||||
|
||||
|
||||
@@ -299,6 +299,7 @@ namespace canvas
|
||||
//mouse_event->delta = it->local_delta;
|
||||
}
|
||||
|
||||
event->current_target = el;
|
||||
el->handleEvent(event);
|
||||
|
||||
if( event->propagation_stopped || !do_bubble )
|
||||
|
||||
Reference in New Issue
Block a user