mirror of
https://github.com/blupi-games/planetblupi
synced 2024-12-30 10:15:36 +01:00
WIP: add partial cursor support (looks useless)
This commit is contained in:
parent
658b2f6972
commit
7ac5c6d753
5
misc.cpp
5
misc.cpp
@ -1,7 +1,7 @@
|
|||||||
// misc.cpp
|
// misc.cpp
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include <SDL_mouse.h>
|
||||||
#include <dsound.h>
|
#include <dsound.h>
|
||||||
#include <ddraw.h>
|
#include <ddraw.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
@ -49,6 +49,7 @@ void LoadString(UINT nID, char *pBuffer, int lgBuffer)
|
|||||||
void ChangeSprite(int sprite)
|
void ChangeSprite(int sprite)
|
||||||
{
|
{
|
||||||
HCURSOR hCursor = nullptr;
|
HCURSOR hCursor = nullptr;
|
||||||
|
SDL_Cursor * cursor;
|
||||||
|
|
||||||
if ( g_mouseType == MOUSETYPEGRA ) return;
|
if ( g_mouseType == MOUSETYPEGRA ) return;
|
||||||
if ( g_lastSprite == sprite ) return;
|
if ( g_lastSprite == sprite ) return;
|
||||||
@ -65,9 +66,11 @@ void ChangeSprite(int sprite)
|
|||||||
if ( sprite == SPRITE_ARROWDL ) hCursor = LoadCursor(g_hInstance, "IDC_ARROWDL");
|
if ( sprite == SPRITE_ARROWDL ) hCursor = LoadCursor(g_hInstance, "IDC_ARROWDL");
|
||||||
if ( sprite == SPRITE_ARROWDR ) hCursor = LoadCursor(g_hInstance, "IDC_ARROWDR");
|
if ( sprite == SPRITE_ARROWDR ) hCursor = LoadCursor(g_hInstance, "IDC_ARROWDR");
|
||||||
if ( sprite == SPRITE_WAIT ) hCursor = LoadCursor(g_hInstance, "IDC_WAIT");
|
if ( sprite == SPRITE_WAIT ) hCursor = LoadCursor(g_hInstance, "IDC_WAIT");
|
||||||
|
cursor = SDL_CreateSystemCursor (SDL_SYSTEM_CURSOR_WAIT);
|
||||||
if ( sprite == SPRITE_EMPTY ) hCursor = LoadCursor(g_hInstance, "IDC_EMPTY");
|
if ( sprite == SPRITE_EMPTY ) hCursor = LoadCursor(g_hInstance, "IDC_EMPTY");
|
||||||
if ( sprite == SPRITE_FILL ) hCursor = LoadCursor(g_hInstance, "IDC_FILL");
|
if ( sprite == SPRITE_FILL ) hCursor = LoadCursor(g_hInstance, "IDC_FILL");
|
||||||
SetCursor(hCursor);
|
SetCursor(hCursor);
|
||||||
|
SDL_SetCursor (cursor);
|
||||||
|
|
||||||
g_lastSprite = sprite;
|
g_lastSprite = sprite;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user