mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-28 23:09:32 -05:00
Compile fix in TimeConversion
Reenable display of shutdown timer Add prompt informing the user of ability to abort
This commit is contained in:
@@ -1319,6 +1319,10 @@ void OpenSpaceEngine::drawOverlays() {
|
||||
// and we won't need this if we are shutting down
|
||||
_renderEngine->renderCameraInformation();
|
||||
}
|
||||
else {
|
||||
// If we are in shutdown mode, we can display the remaining time
|
||||
_renderEngine->renderShutdownInformation(_shutdown.timer, _shutdown.waitTime);
|
||||
}
|
||||
_console->render();
|
||||
}
|
||||
|
||||
|
||||
@@ -598,6 +598,15 @@ void RenderEngine::renderShutdownInformation(float timer, float fullTime) {
|
||||
timer,
|
||||
fullTime
|
||||
);
|
||||
|
||||
RenderFontCr(
|
||||
*_fontDate,
|
||||
penPosition,
|
||||
"%s",
|
||||
// Important: length of this string is the same as the shutdown time text
|
||||
// to make them align
|
||||
"Press ESC again to abort"
|
||||
);
|
||||
}
|
||||
|
||||
void RenderEngine::postDraw() {
|
||||
|
||||
@@ -24,6 +24,8 @@
|
||||
|
||||
#include <openspace/util/timeconversion.h>
|
||||
|
||||
#include <ghoul/glm.h>
|
||||
|
||||
#include <chrono>
|
||||
|
||||
namespace {
|
||||
@@ -43,7 +45,7 @@ namespace {
|
||||
namespace openspace {
|
||||
|
||||
std::pair<double, std::string> simplifyTime(double seconds) {
|
||||
double secondsVal = abs(seconds);
|
||||
double secondsVal = glm::abs(seconds);
|
||||
|
||||
if (secondsVal > 1e-3 && secondsVal < SecondsPerMinute) {
|
||||
return { seconds, seconds == 1.0 ? "second" : "seconds" };
|
||||
|
||||
Reference in New Issue
Block a user