Add Cursor activating method.

pull/6/head
Kirigaya Kazuto 2017-04-22 10:33:18 +08:00
parent 0c5186c11a
commit 76010ebd43
2 changed files with 7 additions and 0 deletions

View File

@ -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);

View File

@ -252,6 +252,8 @@ namespace MiniEngine
static void show(bool);
static bool isShow();
void activate();
private:
std::shared_ptr<SDL_Cursor> _cur;
void _set(SDL_Cursor*);