59 ImGui::SetNextItemWidth(140.0F);
60 if (ComboTimeEditFormat(fmt::format(
"##ComboTimeEditFormat {}", str_id).c_str(), timeEditFormat.
format))
65 ImGui::SetNextItemWidth(80.0F);
75 int year = ymdhms.
year;
76 int month = ymdhms.month;
78 int hour = ymdhms.hour;
80 auto sec =
static_cast<double>(ymdhms.sec);
82 ImGui::SetNextItemWidth(itemWidth);
83 if (ImGui::InputInt(fmt::format(
"Year##{}", str_id).c_str(), &year, 0, 0)) { edited =
true; }
84 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
86 ImGui::SetNextItemWidth(itemWidth);
88 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
90 ImGui::SetNextItemWidth(itemWidth);
92 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
94 ImGui::SetNextItemWidth(itemWidth);
96 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
98 ImGui::SetNextItemWidth(itemWidth);
100 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
102 ImGui::SetNextItemWidth(itemWidth);
104 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
106 if (changes || edited)
108 insTime =
InsTime{
static_cast<uint16_t
>(year),
static_cast<uint16_t
>(month),
static_cast<uint16_t
>(day),
109 static_cast<uint16_t
>(hour),
static_cast<uint16_t
>(min), sec, timeEditFormat.
system };
117 int week = gpsWeekTow.gpsWeek;
118 auto tow =
static_cast<double>(gpsWeekTow.tow);
120 ImGui::SetNextItemWidth(itemWidth);
121 if (
ImGui::InputIntL(fmt::format(
"Cycle##{}", str_id).c_str(), &cycle, 0, std::numeric_limits<int>::max(), 0, 0)) { edited =
true; }
122 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
124 ImGui::SetNextItemWidth(itemWidth);
126 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
128 ImGui::SetNextItemWidth(itemWidth);
129 if (
ImGui::InputDoubleL(fmt::format(
"ToW [s]##{}", str_id).c_str(), &tow, 0, std::numeric_limits<double>::max(), 0, 0,
"%.6f")) { edited =
true; }
130 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
132 if (changes || edited)
134 insTime =
InsTime{ cycle, week, tow, timeEditFormat.
system };
bool InputIntL(const char *label, int *v, int v_min, int v_max, int step, int step_fast, ImGuiInputTextFlags flags)
Shows a value limited InputText GUI element for 'int'.
bool InputDoubleL(const char *label, double *v, double v_min, double v_max, double step, double step_fast, const char *format, ImGuiInputTextFlags flags)
Shows a value limited InputText GUI element for 'double'.