1
0
Fork 0
mirror of https://github.com/gwm17/implot.git synced 2024-11-22 18:28:53 -05:00

ImPlotTimeFmt_MinSMs (#383)

This commit is contained in:
ozlb 2022-07-29 14:57:51 +02:00 committed by GitHub
parent 220f5c9ab4
commit e80e42e8b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View File

@ -1055,6 +1055,7 @@ int FormatTime(const ImPlotTime& t, char* buffer, int size, ImPlotTimeFmt fmt, b
case ImPlotTimeFmt_SUs: return ImFormatString(buffer, size, ":%02d.%03d %03d", sec, ms, us); case ImPlotTimeFmt_SUs: return ImFormatString(buffer, size, ":%02d.%03d %03d", sec, ms, us);
case ImPlotTimeFmt_SMs: return ImFormatString(buffer, size, ":%02d.%03d", sec, ms); case ImPlotTimeFmt_SMs: return ImFormatString(buffer, size, ":%02d.%03d", sec, ms);
case ImPlotTimeFmt_S: return ImFormatString(buffer, size, ":%02d", sec); case ImPlotTimeFmt_S: return ImFormatString(buffer, size, ":%02d", sec);
case ImPlotTimeFmt_MinSMs: return ImFormatString(buffer, size, ":%02d:%02d.%03d", min, sec, ms);
case ImPlotTimeFmt_HrMinSMs: return ImFormatString(buffer, size, "%02d:%02d:%02d.%03d", hr, min, sec, ms); case ImPlotTimeFmt_HrMinSMs: return ImFormatString(buffer, size, "%02d:%02d:%02d.%03d", hr, min, sec, ms);
case ImPlotTimeFmt_HrMinS: return ImFormatString(buffer, size, "%02d:%02d:%02d", hr, min, sec); case ImPlotTimeFmt_HrMinS: return ImFormatString(buffer, size, "%02d:%02d:%02d", hr, min, sec);
case ImPlotTimeFmt_HrMin: return ImFormatString(buffer, size, "%02d:%02d", hr, min); case ImPlotTimeFmt_HrMin: return ImFormatString(buffer, size, "%02d:%02d", hr, min);
@ -1070,6 +1071,7 @@ int FormatTime(const ImPlotTime& t, char* buffer, int size, ImPlotTimeFmt fmt, b
case ImPlotTimeFmt_SUs: return ImFormatString(buffer, size, ":%02d.%03d %03d", sec, ms, us); case ImPlotTimeFmt_SUs: return ImFormatString(buffer, size, ":%02d.%03d %03d", sec, ms, us);
case ImPlotTimeFmt_SMs: return ImFormatString(buffer, size, ":%02d.%03d", sec, ms); case ImPlotTimeFmt_SMs: return ImFormatString(buffer, size, ":%02d.%03d", sec, ms);
case ImPlotTimeFmt_S: return ImFormatString(buffer, size, ":%02d", sec); case ImPlotTimeFmt_S: return ImFormatString(buffer, size, ":%02d", sec);
case ImPlotTimeFmt_MinSMs: return ImFormatString(buffer, size, ":%02d:%02d.%03d", min, sec, ms);
case ImPlotTimeFmt_HrMinSMs: return ImFormatString(buffer, size, "%d:%02d:%02d.%03d%s", hr, min, sec, ms, ap); case ImPlotTimeFmt_HrMinSMs: return ImFormatString(buffer, size, "%d:%02d:%02d.%03d%s", hr, min, sec, ms, ap);
case ImPlotTimeFmt_HrMinS: return ImFormatString(buffer, size, "%d:%02d:%02d%s", hr, min, sec, ap); case ImPlotTimeFmt_HrMinS: return ImFormatString(buffer, size, "%d:%02d:%02d%s", hr, min, sec, ap);
case ImPlotTimeFmt_HrMin: return ImFormatString(buffer, size, "%d:%02d%s", hr, min, ap); case ImPlotTimeFmt_HrMin: return ImFormatString(buffer, size, "%d:%02d%s", hr, min, ap);

View File

@ -261,6 +261,7 @@ enum ImPlotTimeFmt_ { // default [ 24 Hour Clock ]
ImPlotTimeFmt_SUs, // :29.428 552 [ :29.428 552 ] ImPlotTimeFmt_SUs, // :29.428 552 [ :29.428 552 ]
ImPlotTimeFmt_SMs, // :29.428 [ :29.428 ] ImPlotTimeFmt_SMs, // :29.428 [ :29.428 ]
ImPlotTimeFmt_S, // :29 [ :29 ] ImPlotTimeFmt_S, // :29 [ :29 ]
ImPlotTimeFmt_MinSMs, // 21:29.428 [ 21:29.428 ]
ImPlotTimeFmt_HrMinSMs, // 7:21:29.428pm [ 19:21:29.428 ] ImPlotTimeFmt_HrMinSMs, // 7:21:29.428pm [ 19:21:29.428 ]
ImPlotTimeFmt_HrMinS, // 7:21:29pm [ 19:21:29 ] ImPlotTimeFmt_HrMinS, // 7:21:29pm [ 19:21:29 ]
ImPlotTimeFmt_HrMin, // 7:21pm [ 19:21 ] ImPlotTimeFmt_HrMin, // 7:21pm [ 19:21 ]