summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2021-02-21 22:56:06 -0500
committerKelly Rauchenberger <fefferburbia@gmail.com>2021-02-21 22:56:06 -0500
commit65c866691aaa709fed249e4e8798068a68cfbae0 (patch)
treef2c40f088237786d9f82f3bbcb3d31b79ed51a91
parentf1118738d56d70989a9a131d6b370b73e8e3bc25 (diff)
downloadtanetane-65c866691aaa709fed249e4e8798068a68cfbae0.tar.gz
tanetane-65c866691aaa709fed249e4e8798068a68cfbae0.tar.bz2
tanetane-65c866691aaa709fed249e4e8798068a68cfbae0.zip
Added copy-pasting into the debug console
-rw-r--r--src/input_system.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input_system.cpp b/src/input_system.cpp index 1b5b56b..73a28bd 100644 --- a/src/input_system.cpp +++ b/src/input_system.cpp
@@ -49,6 +49,11 @@ void InputSystem::tick(double dt) {
49 if (!debugText_.empty()) { 49 if (!debugText_.empty()) {
50 debugText_.pop_back(); 50 debugText_.pop_back();
51 } 51 }
52 } else if (debugConsole_ && e.key.keysym.sym == SDLK_v && SDL_GetModState() & (KMOD_CTRL | KMOD_GUI)) {
53 // CTRL-V or CMD-V bc I have a Mac thanks
54 char* clipboardText = SDL_GetClipboardText();
55 debugText_.append(clipboardText);
56 SDL_free(clipboardText);
52 } else if (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT) { 57 } else if (e.key.keysym.sym == SDLK_LSHIFT || e.key.keysym.sym == SDLK_RSHIFT) {
53 if (game_.isGameplayPaused()) continue; 58 if (game_.isGameplayPaused()) continue;
54 59