Archived

This topic is now archived and is closed to further replies.

Mouse Problem...

This topic is 5575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey all, I''m having a problem with the mouse. On my menu screen, it doesn''t show up properly at all. I can see it when I move it, but otherwise its being hidden. However, in my game screen, its showing up just fine. Heres the 2 rendering routines that I use.. Problem:
  
void CMenu::Render(SDL_Surface *pScreen)
{
	int iLoop = 0;
	int iInnerLoop = 0;
	int iTemp = 0;
	int iButtonState = 0;
	// !!FIX!!

	// Temp. fix, this should be 0.  The mouse cursor doesn''t

	// show up properly for some reason.

	SDL_ShowCursor(0);
	SDL_FillRect(pScreen, NULL, 0x000000);
	UTIL_DrawImage(pBackground, pScreen, 0, 0);

	// Draw the Buttons


	SDL_Flip(pScreen);
	SDL_ShowCursor(1);

	return;
}
  
Just fine:
  
void CPuzzle::Render(SDL_Surface *pScreen)
{
	SDL_ShowCursor(0);
	SDL_FillRect(pScreen, NULL, 0x000000);
	UTIL_DrawImage(pBackground, pScreen, 0, 0);

        // Draw Puzzle


	SDL_Flip(pScreen);        // Flip the buffers

	SDL_ShowCursor(1);       // Show the cursor again

	return;
}
  
I''ve commented out the loops which actually draw the stuff. I don''t think thats really neccessary to see, but I will edit the post if you request it. Also, the Rendering routines are only called when the screen is updated (the mouse is clicked, keyboard press, etc.) Any ideas?

Share this post


Link to post
Share on other sites