Initial command input support

- Access the command input prompt with  the § button on swedish keyboard
  layout. It is whatever key is corresponding to SGCT_KEY_BACKSLASH on
  other layouts.
This commit is contained in:
Jonas Strandstedt
2014-10-20 15:58:37 +02:00
parent 18a87ef99e
commit dbef0d36e4
6 changed files with 261 additions and 16 deletions

View File

@@ -81,8 +81,9 @@ public:
void preSynchronization();
void postSynchronizationPreDraw();
void render();
void postDraw();
void keyboardCallback(int key, int action);
void postDraw();
void keyboardCallback(int key, int action);
void charCallback(unsigned int codepoint);
void mouseButtonCallback(int key, int action);
void mousePositionCallback(int x, int y);
void mouseScrollWheelCallback(int pos);
@@ -114,6 +115,14 @@ private:
ghoul::opencl::CLContext _context;
sgct::SharedVector<char> _synchronizationBuffer;
bool _inputCommand;
size_t _inputPosition;
std::string _activeCommand;
void renderActiveCommand();
void handleCommandInput(int key, int action);
void addToCommand(std::string c);
};
#define OsEng (openspace::OpenSpaceEngine::ref())