diff options
author | Eugene Sandulenko | 2016-02-05 19:24:32 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:13:02 +0100 |
commit | 08b3f89b099671fe1eb19e85dcc077a32cd69032 (patch) | |
tree | 9f0b1aa619a95e6734f6dd3c37816f3d02068b0b | |
parent | fe40bb284c7cefbfc82c59fc1fd3a0c081416902 (diff) | |
download | scummvm-rg350-08b3f89b099671fe1eb19e85dcc077a32cd69032.tar.gz scummvm-rg350-08b3f89b099671fe1eb19e85dcc077a32cd69032.tar.bz2 scummvm-rg350-08b3f89b099671fe1eb19e85dcc077a32cd69032.zip |
WAGE: Made copy command working
-rw-r--r-- | engines/wage/gui.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index 99876e028f..d90030cb20 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -808,6 +808,27 @@ void Gui::actionCopy() { SWAP(startX, endX); SWAP(endX, endY); } + + _clipboard.clear(); + + for (int i = startY; i <= endY; i++) { + if (startY == endY) { + _clipboard = Common::String(&_lines[i].c_str()[startX], &_lines[i].c_str()[endX]); + break; + } + + if (i == startY) { + _clipboard += &_lines[i].c_str()[startX]; + _clipboard += '\n'; + } else if (i == endY) { + _clipboard += Common::String(_lines[i].c_str(), &_lines[i].c_str()[endX]); + } else { + _clipboard += _lines[i]; + _clipboard += '\n'; + } + } + + _menu->enableCommand(kMenuEdit, kMenuActionPaste, true); } } // End of namespace Wage |