diff options
Diffstat (limited to 'editor/editor_log.h')
-rw-r--r-- | editor/editor_log.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/editor/editor_log.h b/editor/editor_log.h index de0368501c..43d7037414 100644 --- a/editor/editor_log.h +++ b/editor/editor_log.h @@ -41,6 +41,8 @@ #include "scene/gui/texture_button.h" #include "scene/gui/texture_rect.h" +class UndoRedo; + class EditorLog : public HBoxContainer { GDCLASS(EditorLog, HBoxContainer); @@ -48,6 +50,7 @@ public: enum MessageType { MSG_TYPE_STD, MSG_TYPE_ERROR, + MSG_TYPE_STD_RICH, MSG_TYPE_WARNING, MSG_TYPE_EDITOR, }; @@ -66,6 +69,16 @@ private: } }; + struct { + Color error_color; + Ref<Texture2D> error_icon; + + Color warning_color; + Ref<Texture2D> warning_icon; + + Color message_color; + } theme_cache; + // Encapsulates all data and functionality regarding filters. struct LogFilter { private: @@ -82,12 +95,12 @@ private: toggle_button->set_toggle_mode(true); toggle_button->set_pressed(true); toggle_button->set_text(itos(message_count)); - toggle_button->set_tooltip(TTR(p_tooltip)); + toggle_button->set_tooltip_text(TTR(p_tooltip)); // Don't tint the icon even when in "pressed" state. toggle_button->add_theme_color_override("icon_color_pressed", Color(1, 1, 1, 1)); toggle_button->set_focus_mode(FOCUS_NONE); // When toggled call the callback and pass the MessageType this button is for. - toggle_button->connect("toggled", p_toggled_callback, varray(type)); + toggle_button->connect("toggled", p_toggled_callback.bind(type)); } int get_message_count() { @@ -171,6 +184,7 @@ protected: public: void add_message(const String &p_msg, MessageType p_type = MSG_TYPE_STD); void set_tool_button(Button *p_tool_button); + void register_undo_redo(UndoRedo *p_undo_redo); void deinit(); void clear(); |