I loaded two sprites:
MainMenu and Battle
I then display it like this:
Code:
void MainMenu(void)
{
mainmenu->Draw(mainmenusprite, NULL, ¢er, &position, D3DCOLOR_XRGB(255, 255, 255));
if(GetAsyncKeyState(VK_ESCAPE))
{
mainmenu->Draw(battlesprite, NULL, ¢er, &position, D3DCOLOR_XRGB(255, 255, 255));
}
if(GetAsyncKeyState(VK_INSERT))
{
mainmenu->Draw(mainmenusprite, NULL, ¢er, &position, D3DCOLOR_XRGB(255, 255, 255));
}
}
When I press those buttons though, the sprite only stays there when I hold the button. How do I make it stay there permanently even if I let go of the key?