mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-05 10:59:47 -05:00
Restructure DashboardItems
- Add a new class DashboardTextItem that is a DashboardItem that can render text with font
This commit is contained in:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user