mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 12:39:24 -05:00
Add setting in CEFWebGuiModule that sets which properties should be visible in the GUI
This commit is contained in:
@@ -67,6 +67,13 @@ namespace {
|
||||
"Gui Scale",
|
||||
"GUI scale multiplier."
|
||||
};
|
||||
|
||||
constexpr openspace::properties::Property::PropertyInfo VisibilityInfo = {
|
||||
"Visibility",
|
||||
"Visibility",
|
||||
"Hides or displays different settings in the GUI depending on how advanced they "
|
||||
"are."
|
||||
};
|
||||
} // namespace
|
||||
|
||||
namespace openspace {
|
||||
@@ -78,12 +85,22 @@ CefWebGuiModule::CefWebGuiModule()
|
||||
, _reload(ReloadInfo)
|
||||
, _url(GuiUrlInfo, "")
|
||||
, _guiScale(GuiScaleInfo, 1.f, 0.1f, 3.f)
|
||||
, _visibility(VisibilityInfo)
|
||||
{
|
||||
addProperty(_enabled);
|
||||
addProperty(_visible);
|
||||
addProperty(_reload);
|
||||
addProperty(_url);
|
||||
addProperty(_guiScale);
|
||||
addProperty(_visibility);
|
||||
|
||||
using Visibility = openspace::properties::Property::Visibility;
|
||||
_visibility.addOptions({
|
||||
{ static_cast<int>(Visibility::All), "All"},
|
||||
{ static_cast<int>(Visibility::User), "User"},
|
||||
{ static_cast<int>(Visibility::Developer), "Developer"},
|
||||
{ static_cast<int>(Visibility::Hidden), "Hidden"},
|
||||
});
|
||||
}
|
||||
|
||||
void CefWebGuiModule::startOrStopGui() {
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#include <openspace/properties/scalar/floatproperty.h>
|
||||
#include <openspace/properties/triggerproperty.h>
|
||||
#include <openspace/properties/stringproperty.h>
|
||||
#include <openspace/properties/optionproperty.h>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
@@ -53,6 +54,7 @@ private:
|
||||
properties::BoolProperty _visible;
|
||||
properties::TriggerProperty _reload;
|
||||
properties::StringProperty _url;
|
||||
properties::OptionProperty _visibility;
|
||||
properties::FloatProperty _guiScale;
|
||||
std::unique_ptr<BrowserInstance> _instance;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user