summaryrefslogtreecommitdiff
path: root/tools/editor/call_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/call_dialog.cpp')
-rw-r--r--tools/editor/call_dialog.cpp33
1 files changed, 17 insertions, 16 deletions
diff --git a/tools/editor/call_dialog.cpp b/tools/editor/call_dialog.cpp
index 0c6c64a33b..6dfeb87dfd 100644
--- a/tools/editor/call_dialog.cpp
+++ b/tools/editor/call_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -28,14 +28,15 @@
/*************************************************************************/
#include "call_dialog.h"
+#if 0
#include "scene/gui/label.h"
-#include "object_type_db.h"
+#include "class_db.h"
#include "print_string.h"
class CallDialogParams : public Object {
- OBJ_TYPE( CallDialogParams, Object );
+ GDCLASS( CallDialogParams, Object );
public:
bool _set(const StringName& p_name, const Variant& p_value) {
@@ -170,11 +171,11 @@ void CallDialog::_update_method_list() {
List<String> inheritance_list;
- String type = object->get_type();
+ String type = object->get_class();
while(type!="") {
inheritance_list.push_back( type );
- type=ObjectTypeDB::type_inherits_from(type);
+ type=ClassDB::get_parent_class(type);
}
TreeItem *selected_item=NULL;
@@ -182,7 +183,7 @@ void CallDialog::_update_method_list() {
for(int i=0;i<inheritance_list.size();i++) {
String type=inheritance_list[i];
- String parent_type=ObjectTypeDB::type_inherits_from(type);
+ String parent_type=ClassDB::get_parent_class(type);
TreeItem *type_item=NULL;
@@ -192,7 +193,7 @@ void CallDialog::_update_method_list() {
N=E->next();
- if (parent_type!="" && ObjectTypeDB::get_method(parent_type,E->get().name)!=NULL) {
+ if (parent_type!="" && ClassDB::get_method(parent_type,E->get().name)!=NULL) {
E=N;
continue;
}
@@ -224,9 +225,9 @@ void CallDialog::_update_method_list() {
void CallDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_call",&CallDialog::_call);
- ObjectTypeDB::bind_method("_cancel",&CallDialog::_cancel);
- ObjectTypeDB::bind_method("_item_selected", &CallDialog::_item_selected);
+ ClassDB::bind_method("_call",&CallDialog::_call);
+ ClassDB::bind_method("_cancel",&CallDialog::_cancel);
+ ClassDB::bind_method("_item_selected", &CallDialog::_item_selected);
}
@@ -239,7 +240,7 @@ void CallDialog::set_object(Object *p_object,StringName p_selected) {
return_value->clear();
_update_method_list();
- method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_type()));
+ method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_class()));
}
CallDialog::CallDialog() {
@@ -268,7 +269,6 @@ CallDialog::CallDialog() {
tree = memnew( Tree );
- tree->set_anchor( MARGIN_RIGHT, ANCHOR_RATIO );
tree->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
tree->set_begin( Point2( 20,50 ) );
tree->set_margin(MARGIN_BOTTOM, 44 );
@@ -283,7 +283,7 @@ CallDialog::CallDialog() {
property_editor->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 );
property_editor->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 50 );
- property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
+ //property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
property_editor->set_anchor_and_margin( MARGIN_BOTTOM, ANCHOR_END, 90 );
property_editor->get_scene_tree()->set_hide_root( true );
property_editor->hide_top_label();
@@ -296,21 +296,21 @@ CallDialog::CallDialog() {
add_child(method_label);
Label *label = memnew( Label );
- label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
+ //label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 25 );
label->set_text(TTR("Arguments:"));
add_child(label);
return_label = memnew( Label );
- return_label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
+ //return_label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
return_label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 85 );
return_label->set_text(TTR("Return:"));
add_child(return_label);
return_value = memnew( LineEdit );
- return_value->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
+ //return_value->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
return_value->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 );
return_value->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 65 );
@@ -338,3 +338,4 @@ CallDialog::~CallDialog()
{
memdelete(call_params);
}
+#endif