summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-12-18 00:56:33 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-12-18 00:56:33 -0300
commit9f5bbfc322640c33c4accde98ffaee92a7b62cab (patch)
tree6bf42041790f969e6804b542490d070385575c65 /core
parentbed3b7f092881223f7b58c26e65d03b052e5313f (diff)
-improved completion options for InputEvent, shows all event types now
Diffstat (limited to 'core')
-rw-r--r--core/object_type_db.cpp17
-rw-r--r--core/object_type_db.h2
2 files changed, 16 insertions, 3 deletions
diff --git a/core/object_type_db.cpp b/core/object_type_db.cpp
index 62244cbd4f..efd92542ce 100644
--- a/core/object_type_db.cpp
+++ b/core/object_type_db.cpp
@@ -805,12 +805,25 @@ void ObjectTypeDB::add_virtual_method(const StringName& p_type,const MethodInfo&
}
-void ObjectTypeDB::get_virtual_methods(const StringName& p_type,List<MethodInfo> * p_methods ) {
+void ObjectTypeDB::get_virtual_methods(const StringName& p_type, List<MethodInfo> * p_methods , bool p_no_inheritance) {
ERR_FAIL_COND(!types.has(p_type));
#ifdef DEBUG_METHODS_ENABLED
- *p_methods=types[p_type].virtual_methods;
+
+ TypeInfo *type=types.getptr(p_type);
+ TypeInfo *check=type;
+ while(check) {
+
+ for(List<MethodInfo>::Element *E=check->virtual_methods.front();E;E=E->next()) {
+ p_methods->push_back(E->get());
+ }
+
+ if (p_no_inheritance)
+ return;
+ check=check->inherits_ptr;
+ }
+
#endif
}
diff --git a/core/object_type_db.h b/core/object_type_db.h
index ae0644f9b3..f2ff194e28 100644
--- a/core/object_type_db.h
+++ b/core/object_type_db.h
@@ -468,7 +468,7 @@ public:
static MethodBind *get_method(StringName p_type, StringName p_name);
static void add_virtual_method(const StringName& p_type,const MethodInfo& p_method );
- static void get_virtual_methods(const StringName& p_type,List<MethodInfo> * p_methods );
+ static void get_virtual_methods(const StringName& p_type,List<MethodInfo> * p_methods,bool p_no_inheritance=false );
static void bind_integer_constant(const StringName& p_type, const StringName &p_name, int p_constant);
static void get_integer_constant_list(const StringName& p_type, List<String> *p_constants, bool p_no_inheritance=false);