More work on GUI elements

Create GUI for some Properties
This commit is contained in:
Alexander Bock
2014-12-06 17:20:59 +01:00
parent 4e65aaafe2
commit afa2d4d6a9
8 changed files with 382 additions and 118 deletions

View File

@@ -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

View File

@@ -59,6 +59,8 @@ public:
scripting::ScriptEngine& scriptEngine();
LuaConsole& console();
GUI* gui() { return _gui; }
// SGCT callbacks
bool initializeGL();
void preSynchronization();