helpers for putting text into fStrBuf and returning it
| 236 | |
| 237 | // helpers for putting text into fStrBuf and returning it |
| 238 | const char* getTextBufFileSize(const float value) |
| 239 | { |
| 240 | /**/ if (value > 1024*1024) |
| 241 | std::snprintf(fStrBuf, 0xfe, "%.2f GiB", value/(1024*1024)); |
| 242 | else if (value > 1024) |
| 243 | std::snprintf(fStrBuf, 0xfe, "%.2f MiB", value/1024); |
| 244 | else |
| 245 | std::snprintf(fStrBuf, 0xfe, "%.2f KiB", value); |
| 246 | return fStrBuf; |
| 247 | } |
| 248 | |
| 249 | // helpers for drawing text |
| 250 | void drawLeft(const float x, const float y, const char* const text) |