mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 18:31:55 -04:00
*** empty log message ***
This commit is contained in:
parent
4a99983517
commit
a8c25410f2
@ -20,6 +20,7 @@
|
|||||||
TypeHandle MouseWatcher::_type_handle;
|
TypeHandle MouseWatcher::_type_handle;
|
||||||
|
|
||||||
TypeHandle MouseWatcher::_xyz_type;
|
TypeHandle MouseWatcher::_xyz_type;
|
||||||
|
TypeHandle MouseWatcher::_pixel_xyz_type;
|
||||||
TypeHandle MouseWatcher::_button_events_type;
|
TypeHandle MouseWatcher::_button_events_type;
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -282,19 +283,26 @@ transmit_data(NodeAttributes &data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool suppress_below = false;
|
||||||
|
|
||||||
if (_button_down_region != (MouseWatcherRegion *)NULL) {
|
if (_button_down_region != (MouseWatcherRegion *)NULL) {
|
||||||
// We're currently holding down a button. This is the effective
|
// We're currently holding down a button. This is the effective
|
||||||
// region that determines whether we suppress below.
|
// region that determines whether we suppress below.
|
||||||
if (_button_down_region->get_suppress_below()) {
|
suppress_below = _button_down_region->get_suppress_below();
|
||||||
data.clear();
|
|
||||||
}
|
|
||||||
|
|
||||||
} else if (_current_region != (MouseWatcherRegion *)NULL) {
|
} else if (_current_region != (MouseWatcherRegion *)NULL) {
|
||||||
// We're not holding down a button, but we are within a region.
|
// We're not holding down a button, but we are within a region.
|
||||||
// Use this region to determine whether we suppress below.
|
// Use this region to determine whether we suppress below.
|
||||||
if (_current_region->get_suppress_below()) {
|
suppress_below = _current_region->get_suppress_below();
|
||||||
data.clear();
|
}
|
||||||
}
|
|
||||||
|
if (suppress_below) {
|
||||||
|
// We used to suppress *everything* below, but on reflection we
|
||||||
|
// really only want to suppress the mouse position information.
|
||||||
|
// Button events must still get through.
|
||||||
|
|
||||||
|
data.clear_attribute(_xyz_type);
|
||||||
|
data.clear_attribute(_pixel_xyz_type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -313,6 +321,8 @@ init_type() {
|
|||||||
Vec3DataTransition::init_type();
|
Vec3DataTransition::init_type();
|
||||||
register_data_transition(_xyz_type, "XYZ",
|
register_data_transition(_xyz_type, "XYZ",
|
||||||
Vec3DataTransition::get_class_type());
|
Vec3DataTransition::get_class_type());
|
||||||
|
register_data_transition(_pixel_xyz_type, "PixelXYZ",
|
||||||
|
Vec3DataTransition::get_class_type());
|
||||||
ButtonEventDataTransition::init_type();
|
ButtonEventDataTransition::init_type();
|
||||||
register_data_transition(_button_events_type, "ButtonEvents",
|
register_data_transition(_button_events_type, "ButtonEvents",
|
||||||
ButtonEventDataTransition::get_class_type());
|
ButtonEventDataTransition::get_class_type());
|
||||||
|
@ -111,6 +111,7 @@ public:
|
|||||||
|
|
||||||
// inputs & outputs
|
// inputs & outputs
|
||||||
static TypeHandle _xyz_type;
|
static TypeHandle _xyz_type;
|
||||||
|
static TypeHandle _pixel_xyz_type;
|
||||||
static TypeHandle _button_events_type;
|
static TypeHandle _button_events_type;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user