How do I erase the font once it's done it's purpose? I've checked the web and it only shows how to put up font but not how to erase it so I can put up new font in it's place. Also if you have an easier way to do what I am doing I would love to hear it. NOTE: I am using C++ visual Studio 2008 with the March 2009 Direct x sdk.
here's what I got.
// Set up story screen display
// Text color (red)
D3DCOLOR fontColor = D3DCOLOR_XRGB(0,0,255);
// story string
string game_story = "Welcome brave traveler.";
string story2 = "The kingdom of Thorinhold is in great peril!";
string story3 = "Monsters roam the land and the lovely Princess Sara has been kidnapped";
string story4 = "by the evil Vampire Lord Radu.";
string story5 = "You must help the brave Knight Sir Delrin rescue her";
string story6 = "and end the Vampire Lord's reign of terror!";
string story7 = "Press space or the left mouse button to continue!";
// Rectangle for where it will be
RECT story;
story.left = 180;
story.right = 640;
story.top = 70;
story.bottom = story.top + 20;
// Draw the text
m_font->DrawText(NULL, game_story.c_str(), -1, &story, 0, fontColor);
story.left = 140;
story.top = 90;
story.bottom = story.top + 20;
m_font->DrawText(NULL, story2.c_str(), -1, &story, 0, fontColor);
story.left = 40;
story.top = 110;
story.bottom = story.top + 20;
m_font->DrawText(NULL, story3.c_str(), -1, &story, 0, fontColor);
story.left = 140;
story.top = 130;
story.bottom = story.top + 20;
m_font->DrawText(NULL, story4.c_str(), -1, &story, 0, fontColor);
story.left = 140;
story.top = 150;
story.bottom = story.top + 20;
m_font->DrawText(NULL, story5.c_str(), -1, &story, 0, fontColor);
story.left = 140;
story.top = 170;
story.bottom = story.top + 20;
m_font->DrawText(NULL, story6.c_str(), -1, &story, 0, fontColor);
story.left = 140;
story.top = 190;
story.bottom = story.top + 20;
m_font->DrawText(NULL, story7.c_str(), -1, &story, 0, fontColor);
//When I press space I want to the font to disappear.
if (Key_Down(DIK_SPACE) || Mouse_Button(0))
{
Hero.x = 300;
Hero.y = 50;
StoryScreen = NULL;
game_story.erase(NULL);
story2.erase(NULL);
story3.erase(NULL);
story4.erase(NULL);
story5.erase(NULL);
story6.erase(NULL);
story7.erase(NULL);
}