This is the lower level implementation as provided by the backends. The engines should use the Graphics::CursorManager class instead of using this directly.
Functions | |
| virtual bool | OSystem::showMouse (bool visible)=0 |
| virtual void | OSystem::setMouseCursor (const void *buf, uint w, uint h, int hotspotX, int hotspotY, uint32 keycolor, const Graphics::PixelFormat *format, const byte *mask, frac_t scaleX, frac_t scaleY)=0 |
| virtual void | OSystem::setCursorPalette (const byte *colors, uint start, uint num) |
| virtual bool | OSystem::lockMouse (bool lock) |
| virtual void | OSystem::warpMouse (int x, int y)=0 |
| virtual uint32 | OSystem::getDoubleClickTime () const |
|
protectedpure virtual |
Show or hide the mouse cursor.
Currently, the backend is not required to immediately draw the mouse cursor on showMouse(true).
Implemented in N3DS::OSystem_3DS, OSystem_Dreamcast, OSystem_DS, OSystem_N64, OSystem_PSP, OSystem_Wii, and ModularGraphicsBackend.
|
protectedpure virtual |
Set the bitmap used for drawing the cursor.
| buf | Pixmap data to be used. |
| w | Width of the mouse cursor. |
| h | Height of the mouse cursor. |
| hotspotX | Horizontal offset from the left side to the hotspot. |
| hotspotY | Vertical offset from the top side to the hotspot. |
| keycolor | Transparency color value. This should not exceed the maximum color value of the specified format. In case it does, the behavior is undefined. The backend might just error out or simply ignore the value. (The SDL backend will just assert to prevent abuse of this). This parameter does nothing if a mask is provided. |
| format | Pointer to the pixel format that the cursor graphic uses (0 means CLUT8). |
| mask | A mask containing values from the CursorMaskValue enum for each cursor pixel. |
| scaleX | Horizontal scaling factor for the cursor relative to the game screen scale. A value of 0 means that the cursor should not be scaled. |
| scaleY | Vertical scaling factor for the cursor relative to the game screen scale. A value of 0 means that the cursor should not be scaled. |
Implemented in OSystem_Dreamcast, OSystem_DS, N3DS::OSystem_3DS, OSystem_N64, OSystem_PSP, OSystem_Wii, and ModularGraphicsBackend.
|
inlineprotectedvirtual |
Replace the specified range of cursor palette with new colors.
The palette entries from 'start' till (start+num-1) will be replaced - so a full palette update is accomplished via start=0, num=256.
Backends which implement this should have the kFeatureCursorPalette flag set.
Reimplemented in N3DS::OSystem_3DS, OSystem_Dreamcast, OSystem_DS, OSystem_N64, OSystem_PSP, OSystem_Wii, and ModularGraphicsBackend.
|
inlinevirtual |
Lock or unlock the mouse cursor within the window.
Reimplemented in ModularGraphicsBackend.
|
pure virtual |
Move ("warp") the mouse cursor to the specified position in virtual screen coordinates.
| x | New x position of the mouse. |
| y | New y position of the mouse. |
Implemented in N3DS::OSystem_3DS, OSystem_Dreamcast, OSystem_DS, OSystem_N64, OSystem_PSP, OSystem_Wii, and ModularGraphicsBackend.
|
inlinevirtual |
Get the system-configured double-click time interval. If the system doesn't support configuring double-click time, returns 0.
Reimplemented in OSystem_SDL.