Pass text data straight to log (without being displayed)
| 9233 | |
| 9234 | // Pass text data straight to log (without being displayed) |
| 9235 | void ImGui::LogText(const char* fmt, ...) |
| 9236 | { |
| 9237 | ImGuiContext& g = *GImGui; |
| 9238 | if (!g.LogEnabled) |
| 9239 | return; |
| 9240 | |
| 9241 | va_list args; |
| 9242 | va_start(args, fmt); |
| 9243 | if (g.LogFile) |
| 9244 | { |
| 9245 | g.LogBuffer.Buf.resize(0); |
| 9246 | g.LogBuffer.appendfv(fmt, args); |
| 9247 | ImFileWrite(g.LogBuffer.c_str(), sizeof(char), (ImU64)g.LogBuffer.size(), g.LogFile); |
| 9248 | } |
| 9249 | else |
| 9250 | { |
| 9251 | g.LogBuffer.appendfv(fmt, args); |
| 9252 | } |
| 9253 | va_end(args); |
| 9254 | } |
| 9255 | |
| 9256 | // Internal version that takes a position to decide on newline placement and pad items according to their depth. |
| 9257 | // We split text into individual lines to add current tree level padding |
nothing calls this directly
no test coverage detected