Commit 7be3c7b0 authored by Ylva Selling's avatar Ylva Selling
Browse files

Add setting in CEFWebGuiModule that sets which properties should be visible in the GUI

parent 58771121
Showing with 19 additions and 0 deletions
+19 -0
......@@ -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;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment