Restructure DashboardItems

- Add a new class DashboardTextItem that is a DashboardItem that can render text with font
This commit is contained in:
Alexander Bock
2020-12-09 00:44:25 +01:00
parent 9c0aecba80
commit eb69d2219a
23 changed files with 107 additions and 640 deletions
@@ -28,9 +28,12 @@
#include <openspace/properties/propertyowner.h>
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/properties/scalar/floatproperty.h>
#include <openspace/properties/stringproperty.h>
#include <ghoul/glm.h>
namespace ghoul { class Dictionary; }
namespace ghoul::fontrendering { class Font; }
namespace openspace {
@@ -55,6 +58,22 @@ protected:
properties::BoolProperty _isEnabled;
};
class DashboardTextItem : public DashboardItem {
public:
static documentation::Documentation Documentation();
DashboardTextItem(const ghoul::Dictionary& dictionary, float fontSize = 10.f,
const std::string& fontName = "Mono");
protected:
properties::StringProperty _fontName;
properties::FloatProperty _fontSize;
std::shared_ptr<ghoul::fontrendering::Font> _font;
};
} // openspace
#endif // __OPENSPACE_CORE___DASHBOARDITEM___H__