|
|
@@ -27,10 +27,12 @@ VirtualMouse(const string &name) :
|
|
|
DataNode(name)
|
|
|
{
|
|
|
_pixel_xy_output = define_output("pixel_xy", EventStoreVec2::get_class_type());
|
|
|
+ _pixel_size_output = define_output("pixel_size", EventStoreVec2::get_class_type());
|
|
|
_xy_output = define_output("xy", EventStoreVec2::get_class_type());
|
|
|
_button_events_output = define_output("button_events", ButtonEventList::get_class_type());
|
|
|
|
|
|
_pixel_xy = new EventStoreVec2(LPoint2f(0.0f, 0.0f));
|
|
|
+ _pixel_size = new EventStoreVec2(LPoint2f(0.0f, 0.0f));
|
|
|
_xy = new EventStoreVec2(LPoint2f(0.0f, 0.0f));
|
|
|
_button_events = new ButtonEventList;
|
|
|
_next_button_events = new ButtonEventList;
|
|
|
@@ -128,6 +130,9 @@ do_transmit_data(DataGraphTraverser *, const DataNodeTransmit &,
|
|
|
_next_button_events->clear();
|
|
|
output.set_data(_button_events_output, EventParameter(_button_events));
|
|
|
|
|
|
+ _pixel_size->set_value(LPoint2f(_win_width, _win_height));
|
|
|
+ output.set_data(_pixel_size_output, EventParameter(_pixel_size));
|
|
|
+
|
|
|
if (_mouse_on) {
|
|
|
// The mouse is within the window.
|
|
|
_pixel_xy->set_value(LPoint2f(_mouse_x, _mouse_y));
|