diff options
| author | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
|---|---|---|
| committer | Rémi Verschelde | 2017-03-05 16:44:50 +0100 |
| commit | 5dbf1809c6e3e905b94b8764e99491e608122261 (patch) | |
| tree | 5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /editor/output_strings.h | |
| parent | 45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff) | |
| download | godot-5dbf1809c6e3e905b94b8764e99491e608122261.tar.gz godot-5dbf1809c6e3e905b94b8764e99491e608122261.tar.zst godot-5dbf1809c6e3e905b94b8764e99491e608122261.zip | |
Diffstat (limited to 'editor/output_strings.h')
| -rw-r--r-- | editor/output_strings.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/editor/output_strings.h b/editor/output_strings.h index cc721ef65..392b1d4dc 100644 --- a/editor/output_strings.h +++ b/editor/output_strings.h @@ -29,16 +29,15 @@ #ifndef OUTPUT_STRINGS_H #define OUTPUT_STRINGS_H - +#include "map.h" #include "scene/gui/control.h" #include "scene/gui/scroll_bar.h" -#include "map.h" class OutputStrings : public Control { - GDCLASS( OutputStrings, Control ); -public: + GDCLASS(OutputStrings, Control); +public: enum LineType { LINE_NORMAL, @@ -46,23 +45,21 @@ public: LINE_ERROR, LINE_LINK }; -private: +private: struct Line { - LineType type; Variant meta; String text; }; - int font_height; int size_height; Size2 margin; - typedef Map<int,Line> LineMap; - Map<int,Line> line_map; + typedef Map<int, Line> LineMap; + Map<int, Line> line_map; VScrollBar *v_scroll; HScrollBar *h_scroll; @@ -74,14 +71,13 @@ private: void _vscroll_changed(float p_value); void _hscroll_changed(float p_value); void update_scrollbars(); -protected: +protected: static void _bind_methods(); void _notification(int p_what); public: - - void add_line(const String& p_text, const Variant& p_meta=Variant(), const LineType p_type=LINE_NORMAL); + void add_line(const String &p_text, const Variant &p_meta = Variant(), const LineType p_type = LINE_NORMAL); OutputStrings(); }; |
