aboutsummaryrefslogtreecommitdiff
path: root/graphics/cursorman.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/cursorman.cpp')
-rw-r--r--graphics/cursorman.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/graphics/cursorman.cpp b/graphics/cursorman.cpp
index c818101645..5fcd2a3602 100644
--- a/graphics/cursorman.cpp
+++ b/graphics/cursorman.cpp
@@ -17,6 +17,7 @@
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
*/
#include "graphics/cursorman.h"
@@ -48,6 +49,9 @@ bool CursorManager::isVisible() {
bool CursorManager::showMouse(bool visible) {
if (_cursorStack.empty())
return false;
+ if (_locked) {
+ return false;
+ }
_cursorStack.top()->_visible = visible;
@@ -225,6 +229,10 @@ void CursorManager::replaceCursorPalette(const byte *colors, uint start, uint nu
}
}
+void CursorManager::lock(bool locked) {
+ _locked = locked;
+}
+
CursorManager::Cursor::Cursor(const void *data, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, bool dontScale, const Graphics::PixelFormat *format) {
#ifdef USE_RGB_COLOR
if (!format)
@@ -246,6 +254,7 @@ CursorManager::Cursor::Cursor(const void *data, uint w, uint h, int hotspotX, in
_hotspotX = hotspotX;
_hotspotY = hotspotY;
_dontScale = dontScale;
+ _visible = false;
}
CursorManager::Cursor::~Cursor() {