1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add confirmation on new player registration (#6849)

* Attempt to add registration confirmation

Using SRP auth mechanism, if server sent AUTH_MECHANISM_FIRST_SRP that means the player isn't exist.
Also tell player about the server and chosen username.
Local game has localhost as IP address of the server.
Add RenderingEngine::draw_menu_scene() to draw GUI and clouds background.
aborted -> connection_aborted

* Rewrite information message text

Client::promptConfirmRegister() -> Client::promptConfirmRegistration()
This commit is contained in:
Muhammad Rifqi Priyo Susanto 2018-01-13 18:07:16 +07:00 committed by Loïc Blot
parent fad263dec9
commit 792752997c
9 changed files with 378 additions and 13 deletions

View file

@ -410,6 +410,26 @@ void RenderingEngine::_draw_load_screen(const std::wstring &text,
guitext->remove();
}
/*
Draws the menu scene including (optional) cloud background.
*/
void RenderingEngine::_draw_menu_scene(gui::IGUIEnvironment *guienv,
float dtime, bool clouds)
{
bool cloud_menu_background = clouds && g_settings->getBool("menu_clouds");
if (cloud_menu_background) {
g_menuclouds->step(dtime * 3);
g_menuclouds->render();
get_video_driver()->beginScene(
true, true, video::SColor(255, 140, 186, 250));
g_menucloudsmgr->drawAll();
} else
get_video_driver()->beginScene(true, true, video::SColor(255, 0, 0, 0));
guienv->drawAll();
get_video_driver()->endScene();
}
std::vector<core::vector3d<u32>> RenderingEngine::getSupportedVideoModes()
{
IrrlichtDevice *nulldevice = createDevice(video::EDT_NULL);