From 76010ebd43d8d18ba22da2275d437a876aaa7c5c Mon Sep 17 00:00:00 2001 From: kiritow <1362050620@qq.com> Date: Sat, 22 Apr 2017 10:33:18 +0800 Subject: [PATCH] Add Cursor activating method. --- MiniEngine.cpp | 5 +++++ MiniEngine.h | 2 ++ 2 files changed, 7 insertions(+) diff --git a/MiniEngine.cpp b/MiniEngine.cpp index d14822d..7f2e4fc 100644 --- a/MiniEngine.cpp +++ b/MiniEngine.cpp @@ -864,6 +864,11 @@ namespace MiniEngine SDL_ShowCursor(Settings?SDL_ENABLE:SDL_DISABLE); } + void Cursor::activate() + { + SDL_SetCursor(_get()); + } + bool Renderer::isReady() { return (_get() != nullptr); diff --git a/MiniEngine.h b/MiniEngine.h index d31942b..d62b3f1 100644 --- a/MiniEngine.h +++ b/MiniEngine.h @@ -252,6 +252,8 @@ namespace MiniEngine static void show(bool); static bool isShow(); + + void activate(); private: std::shared_ptr _cur; void _set(SDL_Cursor*);