|
|
@@ -10,12 +10,12 @@ class Object : public RefCounted
|
|
|
const String& GetCategory() const;
|
|
|
tolua_outside const char* ObjectGetCategory @ GetCategory() const;
|
|
|
|
|
|
+ // void SendEvent(StringHash eventType, VariantMap* eventData);
|
|
|
+ tolua_outside void ObjectSendEvent @ SendEvent(const char* eventName, VariantMap* eventData);
|
|
|
+
|
|
|
// void SendEvent(StringHash eventType);
|
|
|
tolua_outside void ObjectSendEvent @ SendEvent(const char* eventName);
|
|
|
-
|
|
|
- // void SendEvent(StringHash eventType, VariantMap& eventData);
|
|
|
- tolua_outside void ObjectSendEvent @ SendEvent(const char* eventName, VariantMap& eventData);
|
|
|
-
|
|
|
+
|
|
|
tolua_readonly tolua_property__get_set ShortStringHash type;
|
|
|
tolua_readonly tolua_property__get_set String& typeName;
|
|
|
tolua_readonly tolua_property__get_set String& category;
|
|
|
@@ -38,9 +38,12 @@ static void ObjectSendEvent(Object* object, const char* eventName)
|
|
|
object->SendEvent(StringHash(eventName));
|
|
|
}
|
|
|
|
|
|
-static void ObjectSendEvent(Object* object, const char* eventName, VariantMap& eventData)
|
|
|
+static void ObjectSendEvent(Object* object, const char* eventName, VariantMap* eventData)
|
|
|
{
|
|
|
- object->SendEvent(StringHash(eventName), eventData);
|
|
|
+ if (eventData)
|
|
|
+ object->SendEvent(StringHash(eventName), *eventData);
|
|
|
+ else
|
|
|
+ object->SendEvent(StringHash(eventName));
|
|
|
}
|
|
|
|
|
|
$}
|