diff options
author | Muhammad Rifqi Priyo Susanto <muhammadrifqipriyosusanto@gmail.com> | 2018-01-13 18:07:16 +0700 |
---|---|---|
committer | Loïc Blot <nerzhul@users.noreply.github.com> | 2018-01-13 12:07:16 +0100 |
commit | 792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f (patch) | |
tree | 568b578dd8cd5d0e579a4debc560d088c880d5e7 /src/client | |
parent | fad263dec9e1fa7ae0886f768e22d8ee74e8553b (diff) | |
download | minetest-792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f.tar.gz minetest-792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f.tar.bz2 minetest-792752997c5ae2aaa4f54d0a2e2af2a96d7d1e9f.zip |
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()
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/renderingengine.cpp | 20 | ||||
-rw-r--r-- | src/client/renderingengine.h | 9 |
2 files changed, 29 insertions, 0 deletions
diff --git a/src/client/renderingengine.cpp b/src/client/renderingengine.cpp index f9da178b9..3c48c28a8 100644 --- a/src/client/renderingengine.cpp +++ b/src/client/renderingengine.cpp @@ -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); diff --git a/src/client/renderingengine.h b/src/client/renderingengine.h index ac6b6926c..8728363d2 100644 --- a/src/client/renderingengine.h +++ b/src/client/renderingengine.h @@ -110,6 +110,12 @@ public: text, guienv, tsrc, dtime, percent, clouds); } + inline static void draw_menu_scene( + gui::IGUIEnvironment *guienv, float dtime, bool clouds) + { + s_singleton->_draw_menu_scene(guienv, dtime, clouds); + } + inline static void draw_scene(video::SColor skycolor, bool show_hud, bool show_minimap, bool draw_wield_tool, bool draw_crosshair) { @@ -138,6 +144,9 @@ private: ITextureSource *tsrc, float dtime = 0, int percent = 0, bool clouds = true); + void _draw_menu_scene(gui::IGUIEnvironment *guienv, float dtime = 0, + bool clouds = true); + void _draw_scene(video::SColor skycolor, bool show_hud, bool show_minimap, bool draw_wield_tool, bool draw_crosshair); |