mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -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
|
||||
// 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.
|
||||
//
|
||||
// The event name will be based on the in_pattern
|
||||
|
@ -13,6 +13,7 @@
|
||||
#include <keyboardButton.h>
|
||||
#include <mouseButton.h>
|
||||
#include <throw_event.h>
|
||||
#include <eventParameter.h>
|
||||
#include <pruneTransition.h>
|
||||
#include <transformTransition.h>
|
||||
|
||||
@ -204,7 +205,7 @@ throw_event_pattern(const string &pattern, const MouseWatcherRegion *region,
|
||||
}
|
||||
|
||||
if (!event.empty()) {
|
||||
throw_event(event);
|
||||
throw_event(event, EventParameter(region), EventParameter(button_name));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -64,7 +64,7 @@ PUBLISHED:
|
||||
|
||||
INLINE void set_button_up_pattern(const string &pattern);
|
||||
INLINE const string &get_button_up_pattern() const;
|
||||
|
||||
|
||||
INLINE void set_enter_pattern(const string &pattern);
|
||||
INLINE const string &get_enter_pattern() const;
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <pandabase.h>
|
||||
|
||||
#include <namable.h>
|
||||
#include <referenceCount.h>
|
||||
#include <typedReferenceCount.h>
|
||||
#include <luse.h>
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
@ -17,7 +17,7 @@
|
||||
// Description : This is the class that defines a rectangular region
|
||||
// on the screen for the MouseWatcher.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
class EXPCL_PANDA MouseWatcherRegion : public ReferenceCount, public Namable {
|
||||
class EXPCL_PANDA MouseWatcherRegion : public TypedReferenceCount, public Namable {
|
||||
PUBLISHED:
|
||||
INLINE MouseWatcherRegion(const string &name, float left, float right,
|
||||
float bottom, float top);
|
||||
@ -49,12 +49,16 @@ public:
|
||||
return _type_handle;
|
||||
}
|
||||
static void init_type() {
|
||||
ReferenceCount::init_type();
|
||||
TypedReferenceCount::init_type();
|
||||
Namable::init_type();
|
||||
register_type(_type_handle, "MouseWatcherRegion",
|
||||
ReferenceCount::get_class_type(),
|
||||
TypedReferenceCount::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:
|
||||
static TypeHandle _type_handle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user