Line |
Branch |
Exec |
Source |
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 |
|
|
|
13 |
|
|
#include "util/Time/TimeBase.hpp" |
14 |
|
|
#include "Navigation/Time/TimeSystem.hpp" |
15 |
|
|
#include "internal/gui/widgets/TimeEdit.hpp" |
16 |
|
|
|
17 |
|
|
#include <sstream> |
18 |
|
|
|
19 |
|
✗ |
void NAV::gui::menus::ShowTimeMenu() |
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 |
|
✗ |
} |
38 |
|
|
|