mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
Always create the GUI element but make it switchable via scripting
This commit is contained in:
@@ -25,6 +25,8 @@
|
||||
#ifndef __GUI_H__
|
||||
#define __GUI_H__
|
||||
|
||||
#include <openspace/scripting/scriptengine.h>
|
||||
|
||||
#include <ghoul/glm.h>
|
||||
|
||||
#include <map>
|
||||
@@ -43,6 +45,11 @@ public:
|
||||
GUI();
|
||||
~GUI();
|
||||
|
||||
bool isEnabled() const;
|
||||
void setEnabled(bool enabled);
|
||||
|
||||
void initialize();
|
||||
|
||||
void initializeGL();
|
||||
void deinitializeGL();
|
||||
|
||||
@@ -56,9 +63,14 @@ public:
|
||||
void startFrame(float deltaTime, const glm::vec2& windowSize, const glm::vec2& mousePos, bool mouseButtonsPressed[2]);
|
||||
void endFrame();
|
||||
|
||||
|
||||
static scripting::ScriptEngine::LuaLibrary luaLibrary();
|
||||
|
||||
private:
|
||||
void renderPropertyWindow();
|
||||
|
||||
bool _isEnabled;
|
||||
|
||||
std::set<properties::Property*> _boolProperties;
|
||||
std::set<properties::Property*> _intProperties;
|
||||
std::set<properties::Property*> _floatProperties;
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
#include <openspace/interaction/luaconsole.h>
|
||||
#include <openspace/rendering/renderengine.h>
|
||||
#include <openspace/engine/configurationmanager.h>
|
||||
|
||||
#include <openspace/engine/gui.h>
|
||||
#include <ghoul/cmdparser/commandlineparser.h>
|
||||
|
||||
namespace openspace {
|
||||
@@ -59,7 +59,7 @@ public:
|
||||
scripting::ScriptEngine& scriptEngine();
|
||||
LuaConsole& console();
|
||||
|
||||
GUI* gui() { return _gui; }
|
||||
GUI& gui();
|
||||
|
||||
// SGCT callbacks
|
||||
bool initializeGL();
|
||||
@@ -97,7 +97,7 @@ private:
|
||||
scripting::ScriptEngine _scriptEngine;
|
||||
ghoul::cmdparser::CommandlineParser _commandlineParser;
|
||||
LuaConsole _console;
|
||||
GUI* _gui;
|
||||
GUI _gui;
|
||||
|
||||
SyncBuffer* _syncBuffer;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user