0.4.1
Loading...
Searching...
No Matches
TimeMenu.cpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
9#include "TimeMenu.hpp"
10
11#include <imgui.h>
12
16
17#include <sstream>
18
20{
21 static gui::widgets::TimeEditFormat timeEditFormat;
22
23 InsTime currentTime = util::time::GetCurrentInsTime();
24 if (gui::widgets::TimeEdit("TimeEditGlobalTime", currentTime, timeEditFormat))
25 {
26 if (currentTime != util::time::GetCurrentInsTime())
27 {
28 util::time::ClearCurrentTime();
29 util::time::SetCurrentTime(currentTime);
30 }
31 }
32
33 if (ImGui::Button("Reset"))
34 {
35 util::time::ClearCurrentTime();
36 }
37}
Keeps track of the current real/simulation time.
Widget to modify time point values.
Time Menu.
Time System defintions.
The class is responsible for all time-related tasks.
Definition InsTime.hpp:710
void ShowTimeMenu()
Show the time menu dropdown.
Definition TimeMenu.cpp:19
bool TimeEdit(const char *str_id, InsTime &insTime, TimeEditFormat &timeEditFormat, float itemWidth=170.0F)
Inputs to edit an InsTime object.
Definition TimeEdit.cpp:52
Time Edit format and system.
Definition TimeEdit.hpp:29