1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

data to clipboard; simplify types

This commit is contained in:
Laserlicht
2024-08-14 21:01:37 +02:00
parent 81b1704e39
commit 39aaa6fe32
8 changed files with 94 additions and 90 deletions

View File

@@ -32,6 +32,7 @@
#include <SDL_events.h>
#include <SDL_timer.h>
#include <SDL_clipboard.h>
InputHandler::InputHandler()
: enableMouse(settings["input"]["enableMouse"].Bool())
@@ -142,6 +143,11 @@ InputMode InputHandler::getCurrentInputMode()
return currentInputMode;
}
void InputHandler::copyToClipBoard(std::string text)
{
SDL_SetClipboardText(text.c_str());
}
std::vector<SDL_Event> InputHandler::acquireEvents()
{
boost::unique_lock<boost::mutex> lock(eventsMutex);