Compile fix in TimeConversion

Reenable display of shutdown timer
Add prompt informing the user of ability to abort
This commit is contained in:
Alexander Bock
2017-11-30 21:17:18 -05:00
parent 38338725b9
commit 12ddfae337
3 changed files with 16 additions and 1 deletions
+4
View File
@@ -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();
}
+9
View File
@@ -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() {
+3 -1
View File
@@ -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" };