forked from oerkki/voxelands
Making the tutrial works - Part 3
This commit is contained in:
parent
39f4313f1f
commit
a988191ded
|
@ -2304,18 +2304,20 @@ void the_game(
|
||||||
|
|
||||||
// FIXME
|
// FIXME
|
||||||
{
|
{
|
||||||
vlprintf(CN_INFO,"Tutorial Begin");
|
|
||||||
core::dimension2d<u32> screensize = driver->getScreenSize();
|
core::dimension2d<u32> screensize = driver->getScreenSize();
|
||||||
s32 x = (screensize.Width/2);
|
s32 x = (screensize.Width/2);
|
||||||
s32 y = (screensize.Height/2);
|
s32 y = (screensize.Height/2);
|
||||||
LocalPlayer* player = client.getLocalPlayer();
|
LocalPlayer* player = client.getLocalPlayer();
|
||||||
Tutorial *tuto = player->tutorial;
|
Tutorial *tuto = player->tutorial;
|
||||||
|
|
||||||
|
if (input->isKeyDown(getKeySetting(tuto->getCurrentTutorialCompletionValue())))
|
||||||
|
tuto->setCurrentTutorialToNext();
|
||||||
|
|
||||||
std::string tutotext = tuto->getCurrentTutorialText();
|
std::string tutotext = tuto->getCurrentTutorialText();
|
||||||
std::wstring text = narrow_to_wide(tutotext);
|
std::wstring text = narrow_to_wide(tutotext);
|
||||||
core::dimension2d<u32> textsize = guienv->getSkin()->getFont()->getDimension(text.c_str());
|
core::dimension2d<u32> textsize = guienv->getSkin()->getFont()->getDimension(text.c_str());
|
||||||
core::rect<s32> rect((x-412)-(textsize.Width/2), y+10, (x-412)+(textsize.Width/2), y+10+textsize.Height);
|
core::rect<s32> rect((x-412)-(textsize.Width/2), y+10, (x-412)+(textsize.Width/2), y+10+textsize.Height);
|
||||||
guienv->addStaticText(text.c_str(),rect);
|
guienv->addStaticText(text.c_str(),rect);
|
||||||
vlprintf(CN_INFO,"Tutorial works");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue