summaryrefslogtreecommitdiff
path: root/tools/editor/editor_log.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor/editor_log.cpp')
-rw-r--r--tools/editor/editor_log.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/tools/editor/editor_log.cpp b/tools/editor/editor_log.cpp
index 02af9712a8..6b6a1b9988 100644
--- a/tools/editor/editor_log.cpp
+++ b/tools/editor/editor_log.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 */
@@ -26,8 +26,9 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
-#include "version.h"
#include "editor_log.h"
+
+#include "version.h"
#include "scene/gui/center_container.h"
#include "editor_node.h"
@@ -44,8 +45,10 @@ void EditorLog::_error_handler(void *p_self, const char*p_func, const char*p_fil
err_str=String(p_file)+":"+itos(p_line)+" - "+String(p_error);
}
-// if (!self->is_visible())
-// self->emit_signal("show_request");
+ /*
+ if (!self->is_visible_in_tree())
+ self->emit_signal("show_request");
+ */
err_str=" "+err_str;
self->log->add_newline();
@@ -67,6 +70,10 @@ void EditorLog::_error_handler(void *p_self, const char*p_func, const char*p_fil
icon = self->get_icon("ScriptError","EditorIcons");
} break;
+ case ERR_HANDLER_SHADER: {
+
+ icon = self->get_icon("Shader","EditorIcons");
+ } break;
}
@@ -125,7 +132,7 @@ void EditorLog::add_message(const String& p_msg,bool p_error) {
log->add_newline();
log->add_text(p_msg);
-// button->set_text(p_msg);
+ //button->set_text(p_msg);
if (p_error)
log->pop();
@@ -160,9 +167,9 @@ void EditorLog::_undo_redo_cbk(void *p_self,const String& p_name) {
void EditorLog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
- ObjectTypeDB::bind_method("_override_logger_styles",&EditorLog::_override_logger_styles );
- //ObjectTypeDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
+ ClassDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
+ ClassDB::bind_method("_override_logger_styles",&EditorLog::_override_logger_styles );
+ //ClassDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
ADD_SIGNAL( MethodInfo("clear_request"));
}
@@ -196,14 +203,14 @@ EditorLog::EditorLog() {
pc = memnew( PanelContainer );
ec->add_child(pc);
pc->set_area_as_parent_rect();
- pc->connect("enter_tree", this, "_override_logger_styles");
+ pc->connect("tree_entered", this, "_override_logger_styles");
log = memnew( RichTextLabel );
log->set_scroll_follow(true);
log->set_selection_enabled(true);
log->set_focus_mode(FOCUS_CLICK);
pc->add_child(log);
- add_message(VERSION_FULL_NAME" (c) 2008-2016 Juan Linietsky, Ariel Manzur.");
+ add_message(VERSION_FULL_NAME" (c) 2008-2017 Juan Linietsky, Ariel Manzur.");
//log->add_text("Initialization Complete.\n"); //because it looks cool.
eh.errfunc=_error_handler;