mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
*** empty log message ***
This commit is contained in:
parent
efcea28d02
commit
3c77f79fb3
@ -119,7 +119,7 @@ get_over_region(float x, float y) const {
|
|||||||
// names are generated when a button is depressed. This
|
// names are generated when a button is depressed. This
|
||||||
// is a string that may contain any of the following:
|
// is a string that may contain any of the following:
|
||||||
//
|
//
|
||||||
// %n - the name of the region the mouse is over
|
// %r - the name of the region the mouse is over
|
||||||
// %b - the name of the button pressed.
|
// %b - the name of the button pressed.
|
||||||
//
|
//
|
||||||
// The event name will be based on the in_pattern
|
// The event name will be based on the in_pattern
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#include <keyboardButton.h>
|
#include <keyboardButton.h>
|
||||||
#include <mouseButton.h>
|
#include <mouseButton.h>
|
||||||
#include <throw_event.h>
|
#include <throw_event.h>
|
||||||
|
#include <eventParameter.h>
|
||||||
#include <pruneTransition.h>
|
#include <pruneTransition.h>
|
||||||
#include <transformTransition.h>
|
#include <transformTransition.h>
|
||||||
|
|
||||||
@ -204,7 +205,7 @@ throw_event_pattern(const string &pattern, const MouseWatcherRegion *region,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!event.empty()) {
|
if (!event.empty()) {
|
||||||
throw_event(event);
|
throw_event(event, EventParameter(region), EventParameter(button_name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include <pandabase.h>
|
#include <pandabase.h>
|
||||||
|
|
||||||
#include <namable.h>
|
#include <namable.h>
|
||||||
#include <referenceCount.h>
|
#include <typedReferenceCount.h>
|
||||||
#include <luse.h>
|
#include <luse.h>
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
@ -17,7 +17,7 @@
|
|||||||
// Description : This is the class that defines a rectangular region
|
// Description : This is the class that defines a rectangular region
|
||||||
// on the screen for the MouseWatcher.
|
// on the screen for the MouseWatcher.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
class EXPCL_PANDA MouseWatcherRegion : public ReferenceCount, public Namable {
|
class EXPCL_PANDA MouseWatcherRegion : public TypedReferenceCount, public Namable {
|
||||||
PUBLISHED:
|
PUBLISHED:
|
||||||
INLINE MouseWatcherRegion(const string &name, float left, float right,
|
INLINE MouseWatcherRegion(const string &name, float left, float right,
|
||||||
float bottom, float top);
|
float bottom, float top);
|
||||||
@ -49,12 +49,16 @@ public:
|
|||||||
return _type_handle;
|
return _type_handle;
|
||||||
}
|
}
|
||||||
static void init_type() {
|
static void init_type() {
|
||||||
ReferenceCount::init_type();
|
TypedReferenceCount::init_type();
|
||||||
Namable::init_type();
|
Namable::init_type();
|
||||||
register_type(_type_handle, "MouseWatcherRegion",
|
register_type(_type_handle, "MouseWatcherRegion",
|
||||||
ReferenceCount::get_class_type(),
|
TypedReferenceCount::get_class_type(),
|
||||||
Namable::get_class_type());
|
Namable::get_class_type());
|
||||||
}
|
}
|
||||||
|
virtual TypeHandle get_type() const {
|
||||||
|
return get_class_type();
|
||||||
|
}
|
||||||
|
virtual TypeHandle force_init_type() {init_type(); return get_class_type();}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static TypeHandle _type_handle;
|
static TypeHandle _type_handle;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user