Jump to content
  • Advertisement

Archived

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

GroZZleR

Mouse Problem...

This topic is 5942 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
Advertisement

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!