diff options
author | Eugene Sandulenko | 2016-02-05 10:54:55 +0100 |
---|---|---|
committer | Eugene Sandulenko | 2016-02-14 17:13:02 +0100 |
commit | c02c36ce88f6de4cb3442898deb4f051364fb52e (patch) | |
tree | c0cc69f398cb13071f92c06451a0246c8e0345a9 | |
parent | 06ba17395d0bbd3a099d692a6e1356b4c67f1d8b (diff) | |
download | scummvm-rg350-c02c36ce88f6de4cb3442898deb4f051364fb52e.tar.gz scummvm-rg350-c02c36ce88f6de4cb3442898deb4f051364fb52e.tar.bz2 scummvm-rg350-c02c36ce88f6de4cb3442898deb4f051364fb52e.zip |
WAGE: Implemented a way to remove selection
-rw-r--r-- | engines/wage/gui.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/engines/wage/gui.cpp b/engines/wage/gui.cpp index ef05607770..4e52801c76 100644 --- a/engines/wage/gui.cpp +++ b/engines/wage/gui.cpp @@ -656,7 +656,6 @@ void Gui::processMenuShortCut(byte flags, uint16 ascii) { _menu->processMenuShortCut(flags, ascii); } - void Gui::mouseMove(int x, int y) { if (_menu->_menuActivated) { if (_menu->mouseMove(x, y)) @@ -701,9 +700,16 @@ Designed *Gui::mouseUp(int x, int y) { return NULL; } - if (_inTextSelection) + if (_inTextSelection) { _inTextSelection = false; + if (_selectionEndY == -1 || + (_selectionEndX == _selectionStartX && _selectionEndY == _selectionStartY)) { + _selectionStartY = _selectionEndY = -1; + _consoleFullRedraw = true; + } + } + if (_sceneArea.contains(x, y)) { if (!_sceneIsActive) { _sceneIsActive = true; @@ -774,6 +780,8 @@ void Gui::startMarking(int x, int y) { _selectionStartY = calcTextY(y); _selectionStartX = calcTextX(x, _selectionStartY); + _selectionEndY = -1; + _inTextSelection = true; } |