Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
OpenSpace
Commits
7be3c7b0
Commit
7be3c7b0
authored
3 years ago
by
Ylva Selling
Browse files
Options
Download
Email Patches
Plain Diff
Add setting in CEFWebGuiModule that sets which properties should be visible in the GUI
parent
58771121
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/cefwebgui/cefwebguimodule.cpp
+17
-0
modules/cefwebgui/cefwebguimodule.cpp
modules/cefwebgui/cefwebguimodule.h
+2
-0
modules/cefwebgui/cefwebguimodule.h
with
19 additions
and
0 deletions
+19
-0
modules/cefwebgui/cefwebguimodule.cpp
+
17
-
0
View file @
7be3c7b0
...
...
@@ -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.1
f
,
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
()
{
...
...
This diff is collapsed.
Click to expand it.
modules/cefwebgui/cefwebguimodule.h
+
2
-
0
View file @
7be3c7b0
...
...
@@ -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
;
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment