hi all!
i m looking for some sample code with create cursor or else i can use to make
the cursor disapeared without using the evilish SDL_ShowCursor(SDL_DISABLE);?
THX
hi all!
i m looking for some sample code with create cursor or else i can use to make
the cursor disapeared without using the evilish SDL_ShowCursor(SDL_DISABLE);?
THX
Hi Golgoth, why is SDL_ShowCursor() evil?
i use it all the time with no problems…> ----- Original Message -----
From: neosettlers@sympatico.ca (Golgoth)
To:
Sent: Saturday, April 16, 2005 2:53 PM
Subject: [SDL] Hide Cursor!hi all!
i m looking for some sample code with create cursor or else i can use to
make
the cursor disapeared without using the evilish
SDL_ShowCursor(SDL_DISABLE);?THX
SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl
i m looking for some sample code with create cursor or else i can use to make
the cursor disapeared without using the evilish SDL_ShowCursor(SDL_DISABLE);?
What’s wrong with SDL_ShowCursor?
–ryan.
If you want to do it yourself, Just read your mouse position with
events and then blit your favorite cursor image to your surface.On 4/16/05, Golgoth! wrote:
hi all!
i m looking for some sample code with create cursor or else i can use to make
the cursor disapeared without using the evilish SDL_ShowCursor(SDL_DISABLE);?
–
E-Mail: Chris Nystrom
Business: http://www.shaklee.net/austin
Blog: http://cnystrom.blogspot.com/
AIM: nystromchris
You could liek hide teh crursor and just draw a bitmap as a
replacement. I think sdl_events has facitlities for this or something.
Just liek draw teh bitmap at whatever coordinates the mouse si at or
sumthing. I don’t have liek sample code, so DIY.
Hack teh planet!On 4/16/05, Ryan C. Gordon wrote:
What’s wrong with SDL_ShowCursor?
Hi!
it seams to be a combination of Fullscreen and SDL_ShowCursor()on window XP,
sdl 1.2.8! wich doesnt happen in window mode.
when u need to hide and unhide the cursor and keep track of the mouse position
and setting back to a fixed x,y (velocity purpuses) and/or (like pan and orbit
function) or using a touch screen monitor… you get either one of the folowing!
set cursor position to 0,0 and/or center of the screen when we dont ask for!
and/or
0,0 cursor positon have a different origin… when SDL_ShowCursor(false)…
origin becomes center of the screen instead of top left!
and/or
cursor position switch to percentage of the screen instead of pixels… but
unlikly…
i ve been trying on and off for the past year to solve that… i finally
exorcice the need for SDL_ShowCursor() function by getting the cursor
transparent, honestly, ill never use this function again!
regards
thx!
it all right!
my cursor is now a quad that can recive texture states! so we can do what ever
we want now! its traited as a primitive set in ortho mode via opengl!
work wonderfully!
note that we need to create a cursor with transparcy to work…
void HideCursor()
{
Uint8 l_data[1];
Uint8 l_mask[1];
l_data[0] = 0;
l_mask[0] = 0;
g_cursor = SDL_CreateCursor(l_data, l_mask, 1, 1, 0, 0);
SDL_SetCursor(g_cursor);
}
thx