mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
More work on GUI elements
Create GUI for some Properties
This commit is contained in:
@@ -26,25 +26,48 @@
|
||||
#define __GUI_H__
|
||||
|
||||
#include <ghoul/glm.h>
|
||||
|
||||
#include <map>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace openspace {
|
||||
|
||||
namespace properties {
|
||||
class Property;
|
||||
}
|
||||
|
||||
class GUI {
|
||||
public:
|
||||
GUI(const glm::vec2& windowSize);
|
||||
GUI();
|
||||
~GUI();
|
||||
|
||||
void initializeGL();
|
||||
void deinitializeGL();
|
||||
|
||||
void registerProperty(properties::Property* prop);
|
||||
|
||||
bool mouseButtonCallback(int key, int action);
|
||||
bool mouseWheelCallback(int position);
|
||||
bool keyCallback(int key, int action);
|
||||
bool charCallback(unsigned int character);
|
||||
|
||||
void startFrame(float deltaTime, const glm::vec2& mousePos, bool mouseButtonsPressed[2]);
|
||||
void startFrame(float deltaTime, const glm::vec2& windowSize, const glm::vec2& mousePos, bool mouseButtonsPressed[2]);
|
||||
void endFrame();
|
||||
|
||||
private:
|
||||
void renderGuiElements();
|
||||
|
||||
std::set<properties::Property*> _boolProperties;
|
||||
std::set<properties::Property*> _intProperties;
|
||||
std::set<properties::Property*> _floatProperties;
|
||||
std::set<properties::Property*> _vec2Properties;
|
||||
std::set<properties::Property*> _vec3Properties;
|
||||
std::set<properties::Property*> _stringProperties;
|
||||
std::set<properties::Property*> _optionProperty;
|
||||
|
||||
std::map<std::string, std::vector<properties::Property*>> _propertiesByOwner;
|
||||
};
|
||||
|
||||
} // namespace openspace
|
||||
|
||||
@@ -59,6 +59,8 @@ public:
|
||||
scripting::ScriptEngine& scriptEngine();
|
||||
LuaConsole& console();
|
||||
|
||||
GUI* gui() { return _gui; }
|
||||
|
||||
// SGCT callbacks
|
||||
bool initializeGL();
|
||||
void preSynchronization();
|
||||
|
||||
Reference in New Issue
Block a user