Toned down window closing by dragging, dim window when it's closed

This commit is contained in:
pelya
2017-04-07 21:29:43 +03:00
committed by Sergii Pylypenko
parent 817edd68df
commit 450858784e
3 changed files with 31 additions and 8 deletions

View File

@@ -592,6 +592,11 @@ void Window::DrawWidgets() const
GfxFillRect(left, bottom, right, bottom, colour);
}
}
/* Dim the window if it's about to close */
if ((this->flags & WF_DRAGGING) && !_settings_client.gui.windows_titlebars && GetWindowDraggedOffScreen(this)) {
GfxFillRect(2, 2, this->width - 3, this->height - 3, PALETTE_TO_TRANSPARENT, FILLRECT_RECOLOUR);
}
}
/**