aboutsummaryrefslogtreecommitdiff
path: root/src/gui/guiConfirmRegistration.cpp
diff options
context:
space:
mode:
authorMinetest-j45 <55553015+Minetest-j45@users.noreply.github.com>2021-08-30 15:22:40 +0100
committerGitHub <noreply@github.com>2021-08-30 15:22:40 +0100
commit7824a4956bf489b4e2cc35e0c97272eee06be6ba (patch)
tree70243765dc1743a83596f9c6eec122fb417ef92c /src/gui/guiConfirmRegistration.cpp
parent607add326feb44e078b843464ce4a8de09f28743 (diff)
parent35445d24f425c6291a0580b468919ca83de716fd (diff)
downloaddragonfireclient-7824a4956bf489b4e2cc35e0c97272eee06be6ba.tar.xz
Merge pull request #1 from EliasFleckenstein03/master
update
Diffstat (limited to 'src/gui/guiConfirmRegistration.cpp')
-rw-r--r--src/gui/guiConfirmRegistration.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/guiConfirmRegistration.cpp b/src/gui/guiConfirmRegistration.cpp
index 020a2796a..4ca9a64ed 100644
--- a/src/gui/guiConfirmRegistration.cpp
+++ b/src/gui/guiConfirmRegistration.cpp
@@ -25,7 +25,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#include <IGUIButton.h>
#include <IGUIStaticText.h>
#include <IGUIFont.h>
-#include "intlGUIEditBox.h"
+#include "guiEditBoxWithScrollbar.h"
#include "porting.h"
#include "gettext.h"
@@ -109,10 +109,9 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize)
porting::mt_snprintf(info_text_buf, sizeof(info_text_buf),
info_text_template.c_str(), m_playername.c_str());
- wchar_t *info_text_buf_wide = utf8_to_wide_c(info_text_buf);
- gui::IGUIEditBox *e = new gui::intlGUIEditBox(info_text_buf_wide, true,
- Environment, this, ID_intotext, rect2, false, true);
- delete[] info_text_buf_wide;
+ std::wstring info_text_w = utf8_to_wide(info_text_buf);
+ gui::IGUIEditBox *e = new GUIEditBoxWithScrollBar(info_text_w.c_str(),
+ true, Environment, this, ID_intotext, rect2, false, true);
e->drop();
e->setMultiLine(true);
e->setWordWrap(true);
@@ -192,8 +191,7 @@ void GUIConfirmRegistration::acceptInput()
bool GUIConfirmRegistration::processInput()
{
- std::wstring m_password_ws = narrow_to_wide(m_password);
- if (m_password_ws != m_pass_confirm) {
+ if (utf8_to_wide(m_password) != m_pass_confirm) {
gui::IGUIElement *e = getElementFromId(ID_message);
if (e)
e->setVisible(true);