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);
83 ImGui::SetNextItemWidth(itemWidth);
84 if (ImGui::InputInt(fmt::format(
"Year##{}", str_id).c_str(), &year, 0, 0)) { edited =
true; }
85 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
87 ImGui::SetNextItemWidth(itemWidth);
89 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
91 ImGui::SetNextItemWidth(itemWidth);
93 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
96 if (columns == 2) { ImGui::SameLine(); }
98 ImGui::SetNextItemWidth(itemWidth);
100 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
102 ImGui::SetNextItemWidth(itemWidth);
104 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
106 ImGui::SetNextItemWidth(itemWidth);
108 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
111 if (changes || edited)
113 insTime =
InsTime{
static_cast<uint16_t
>(year),
static_cast<uint16_t
>(month),
static_cast<uint16_t
>(day),
114 static_cast<uint16_t
>(hour),
static_cast<uint16_t
>(min), sec, timeEditFormat.
system };
122 int week = gpsWeekTow.gpsWeek;
123 auto tow =
static_cast<double>(gpsWeekTow.tow);
125 ImGui::SetNextItemWidth(itemWidth);
126 if (
ImGui::InputIntL(fmt::format(
"Cycle##{}", str_id).c_str(), &cycle, 0, std::numeric_limits<int>::max(), 0, 0)) { edited =
true; }
127 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
129 ImGui::SetNextItemWidth(itemWidth);
131 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
133 ImGui::SetNextItemWidth(itemWidth);
134 if (
ImGui::InputDoubleL(fmt::format(
"ToW [s]##{}", str_id).c_str(), &tow, 0, std::numeric_limits<double>::max(), 0, 0,
"%.6f")) { edited =
true; }
135 if (ImGui::IsItemDeactivatedAfterEdit()) { changes =
true; }
137 if (changes || edited)
139 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'.