Add the ability to configure the Console key through the openspace.cfg (closes #2573)

This commit is contained in:
Alexander Bock
2023-04-03 10:53:09 +02:00
parent 379a050bc0
commit 0e2d5e245d
6 changed files with 32 additions and 4 deletions

View File

@@ -25,6 +25,7 @@
#ifndef __OPENSPACE_CORE___CONFIGURATION___H__
#define __OPENSPACE_CORE___CONFIGURATION___H__
#include <openspace/util/keys.h>
#include <ghoul/lua/luastate.h>
#include <ghoul/misc/dictionary.h>
#include <filesystem>
@@ -91,6 +92,8 @@ struct Configuration {
bool isLoggingOpenGLCalls = false;
bool isPrintingEvents = false;
Key consoleKey = Key::GraveAccent;
float shutdownCountdown = 0.f;
bool shouldUseScreenshotDate = false;

View File

@@ -58,6 +58,8 @@ public:
void render();
float currentHeight() const;
void setCommandInputButton(Key key);
private:
void parallelConnectionChanged(const ParallelConnection::Status& status);
@@ -71,6 +73,8 @@ private:
properties::Vec4Property _historyTextColor;
properties::IntProperty _historyLength;
Key _commandInputButton = Key::GraveAccent;
size_t _inputPosition = 0;
std::vector<std::string> _commandsHistory;
size_t _activeCommand = 0;