Nameless Engine
|
#include <Window.h>
Public Member Functions | |
WindowCursor (const WindowCursor &)=delete | |
WindowCursor & | operator= (const WindowCursor &)=delete |
~WindowCursor () | |
Protected Member Functions | |
void | releaseCursor () |
GLFWcursor * | getCursor () const |
Static Protected Member Functions | |
static std::variant< std::unique_ptr< WindowCursor >, Error > | create (const std::filesystem::path &pathToIcon) |
Private Member Functions | |
WindowCursor (GLFWcursor *pCursor) | |
Private Attributes | |
GLFWcursor * | pCursor = nullptr |
Friends | |
class | Window |
Represents a custom window cursor.
ne::WindowCursor::~WindowCursor | ( | ) |
Checks if the created cursor was released and if not, logs an error.
|
private |
Initializes window cursor.
pCursor | Created GLFW cursor. |
|
staticprotected |
Loads image and creates a new cursor.
pathToIcon | Path to the image (.png). The image data should be 32-bit, little-endian, non-premultiplied RGBA, i.e. eight bits per channel with the red channel first. |
|
protected |
|
protected |
Releases existing cursor.
|
private |
Created GLFW cursor.