Add some tooltips to the debug console

This commit is contained in:
Moritz Brückner 2021-09-27 16:02:29 +02:00
parent d979e4fde9
commit 308ab2d77b

View file

@ -783,15 +783,19 @@ class DebugConsole extends Trait {
final h = Id.handle();
h.selected = DebugConsole.traceWithPosition;
DebugConsole.traceWithPosition = ui.check(h, "Print With Position");
if (ui.isHovered) ui.tooltip("Whether to prepend the position of print/trace statements to the printed text");
if (ui.button("Clear")) {
lastTraces[0] = "";
lastTraces.splice(1, lastTraces.length - 1);
}
if (ui.isHovered) ui.tooltip("Clear the log output");
final eh = ui.t.ELEMENT_H;
ui.t.ELEMENT_H = ui.fontSize;
for (t in lastTraces) ui.text(t);
ui.t.ELEMENT_H = eh;
ui.unindent();
}
}