Show error icon at "Output" in case of errors

This commit is contained in:
Bernhard Liebl
2018-03-11 14:20:32 +01:00
parent 47addcf9d0
commit 5120690013
3 changed files with 10 additions and 4 deletions

View File

@ -88,6 +88,7 @@ void EditorLog::_notification(int p_what) {
void EditorLog::_clear_request() {
log->clear();
tool_button->set_icon(Ref<Texture>());
}
void EditorLog::clear() {
@ -103,9 +104,7 @@ void EditorLog::add_message(const String &p_msg, bool p_error) {
Ref<Texture> icon = get_icon("Error", "EditorIcons");
log->add_image(icon);
log->add_text(" ");
//button->set_icon(icon);
} else {
//button->set_icon(Ref<Texture>());
tool_button->set_icon(icon);
}
log->add_text(p_msg);
@ -115,6 +114,10 @@ void EditorLog::add_message(const String &p_msg, bool p_error) {
log->pop();
}
void EditorLog::set_tool_button(ToolButton *p_tool_button) {
tool_button = p_tool_button;
}
/*
void EditorLog::_dragged(const Point2& p_ofs) {