Skip to content

Commit

Permalink
WAGE: Implemented a way to remove selection
Browse files Browse the repository at this point in the history
  • Loading branch information
sev- committed Feb 14, 2016
1 parent 06ba173 commit c02c36c
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions engines/wage/gui.cpp
Expand Up @@ -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))
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -774,6 +780,8 @@ void Gui::startMarking(int x, int y) {
_selectionStartY = calcTextY(y);
_selectionStartX = calcTextX(x, _selectionStartY);

_selectionEndY = -1;

_inTextSelection = true;
}

Expand Down

0 comments on commit c02c36c

Please sign in to comment.