Code cleanup branch (#618)

* Make height map fallback layer work again
  * Add documentation to joystick button bindings
  * Removed grouped property headers
  * Add new version number constant generated by CMake
  * Make Joystick deadzone work properly
  * Change the startup date on Earth to today
  * Fix key modifier handling
  * Add debugging indices for TreeNodeDebugging
  * Fix script schedule for OsirisRex
  * Do not open Mission schedule automatically
  * Upload default projection texture automatically

  * General code cleanup
  * Fix check_style_guide warnings
  * Remove .clang-format
  * MacOS compile fixes
  * Clang analyzer fixes
This commit is contained in:
Alexander Bock
2018-06-10 04:47:34 +00:00
committed by GitHub
parent 5de728442d
commit 4952f8f977
796 changed files with 22428 additions and 24063 deletions
+7 -10
View File
@@ -28,23 +28,22 @@
#include <openspace/documentation/verifier.h>
#include <openspace/engine/openspaceengine.h>
#include <openspace/util/timemanager.h>
#include <ghoul/font/font.h>
#include <ghoul/font/fontmanager.h>
#include <ghoul/font/fontrenderer.h>
namespace {
const char* KeyFontMono = "Mono";
const float DefaultFontSize = 15.f;
constexpr const char* KeyFontMono = "Mono";
constexpr const float DefaultFontSize = 15.f;
static const openspace::properties::Property::PropertyInfo FontNameInfo = {
const openspace::properties::Property::PropertyInfo FontNameInfo = {
"FontName",
"Font Name",
"This value is the name of the font that is used. It can either refer to an "
"internal name registered previously, or it can refer to a path that is used."
};
static const openspace::properties::Property::PropertyInfo FontSizeInfo = {
const openspace::properties::Property::PropertyInfo FontSizeInfo = {
"FontSize",
"Font Size",
"This value determines the size of the font that is used to render the date."
@@ -80,7 +79,7 @@ documentation::Documentation DashboardItemDate::Documentation() {
};
}
DashboardItemDate::DashboardItemDate(ghoul::Dictionary dictionary)
DashboardItemDate::DashboardItemDate(const ghoul::Dictionary& dictionary)
: DashboardItem(dictionary)
, _fontName(FontNameInfo, KeyFontMono)
, _fontSize(FontSizeInfo, DefaultFontSize, 6.f, 144.f, 1.f)
@@ -117,16 +116,14 @@ void DashboardItemDate::render(glm::vec2& penPosition) {
RenderFont(
*_font,
penPosition,
"Date: %s",
OsEng.timeManager().time().UTC().c_str()
"Date: " + OsEng.timeManager().time().UTC()
);
}
glm::vec2 DashboardItemDate::size() const {
return ghoul::fontrendering::FontRenderer::defaultRenderer().boundingBox(
*_font,
"Date: %s",
OsEng.timeManager().time().UTC().c_str()
"Date: " + OsEng.timeManager().time().UTC()
).boundingBox;
}