Upgrade Platform
This commit is contained in:
@@ -7,38 +7,33 @@
|
||||
#ifndef NAZARA_CURSORIMPL_HPP
|
||||
#define NAZARA_CURSORIMPL_HPP
|
||||
|
||||
#include <array>
|
||||
#include <Nazara/Platform/Enums.hpp>
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
#include <Nazara/Core/MovablePtr.hpp>
|
||||
#include <Nazara/Math/Vector2.hpp>
|
||||
#include <Nazara/Platform/Enums.hpp>
|
||||
#include <Nazara/Utility/Image.hpp>
|
||||
|
||||
#include <SDL2/SDL_mouse.h>
|
||||
|
||||
namespace Nz
|
||||
{
|
||||
class Image;
|
||||
|
||||
class CursorImpl
|
||||
{
|
||||
friend class Cursor;
|
||||
|
||||
public:
|
||||
bool Create(const Image& image, int hotSpotX, int hotSpotY);
|
||||
bool Create(SystemCursor cursor);
|
||||
|
||||
void Destroy();
|
||||
CursorImpl(const Image& image, const Vector2i& hotSpot);
|
||||
CursorImpl(SystemCursor cursor);
|
||||
CursorImpl(const CursorImpl&) = delete;
|
||||
CursorImpl(CursorImpl&&) noexcept = default;
|
||||
~CursorImpl();
|
||||
|
||||
SDL_Cursor* GetCursor();
|
||||
|
||||
CursorImpl& operator=(const CursorImpl&) = delete;
|
||||
CursorImpl& operator=(CursorImpl&&) noexcept = default;
|
||||
|
||||
private:
|
||||
static bool Initialize();
|
||||
static void Uninitialize();
|
||||
|
||||
SDL_Cursor* m_cursor = nullptr;
|
||||
SDL_Surface* m_icon = nullptr;
|
||||
Image m_iconImage;
|
||||
|
||||
static std::array<SDL_SystemCursor, SystemCursor_Max + 1> s_systemCursorIds;
|
||||
MovablePtr<SDL_Cursor> m_cursor;
|
||||
MovablePtr<SDL_Surface> m_surface;
|
||||
Image m_cursorImage;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user