@@ -20,6 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
20
20
21
21
#include " guiConfirmRegistration.h"
22
22
#include " client.h"
23
+ #include " intlGUIEditBox.h"
23
24
#include < IGUICheckBox.h>
24
25
#include < IGUIEditBox.h>
25
26
#include < IGUIButton.h>
@@ -66,8 +67,8 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize)
66
67
/*
67
68
Calculate new sizes and positions
68
69
*/
69
- core::rect<s32> rect (screensize.X / 2 - 600 / 2 , screensize.Y / 2 - 300 / 2 ,
70
- screensize.X / 2 + 600 / 2 , screensize.Y / 2 + 300 / 2 );
70
+ core::rect<s32> rect (screensize.X / 2 - 600 / 2 , screensize.Y / 2 - 360 / 2 ,
71
+ screensize.X / 2 + 600 / 2 , screensize.Y / 2 + 360 / 2 );
71
72
72
73
DesiredRect = rect;
73
74
recalculateAbsolutePosition (false );
@@ -85,7 +86,7 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize)
85
86
std::string address = m_address;
86
87
if (address.empty ())
87
88
address = " localhost" ;
88
- core::rect<s32> rect (0 , 0 , 540 , 90 );
89
+ core::rect<s32> rect (0 , 0 , 540 , 180 );
89
90
rect += topleft_client + v2s32 (30 , ypos);
90
91
static const std::string info_text_template = strgettext (
91
92
" You are about to join the server at %1$s with the "
@@ -98,11 +99,17 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize)
98
99
char info_text_buf[1024 ];
99
100
snprintf (info_text_buf, sizeof (info_text_buf), info_text_template.c_str (),
100
101
address.c_str (), m_playername.c_str ());
101
- Environment->addStaticText (narrow_to_wide_c (info_text_buf), rect, false ,
102
- true , this , -1 );
102
+
103
+ gui::intlGUIEditBox *e = new gui::intlGUIEditBox (
104
+ utf8_to_wide_c (info_text_buf), true , Environment, this ,
105
+ ID_message, rect, false , true );
106
+ e->drop ();
107
+ e->setMultiLine (true );
108
+ e->setWordWrap (true );
109
+ e->setTextAlignment (gui::EGUIA_UPPERLEFT, gui::EGUIA_CENTER);
103
110
}
104
111
105
- ypos += 120 ;
112
+ ypos += 210 ;
106
113
{
107
114
core::rect<s32> rect (0 , 0 , 540 , 30 );
108
115
rect += topleft_client + v2s32 (30 , ypos);
@@ -111,7 +118,7 @@ void GUIConfirmRegistration::regenerateGui(v2u32 screensize)
111
118
e->setPasswordBox (true );
112
119
}
113
120
114
- ypos += 90 ;
121
+ ypos += 60 ;
115
122
{
116
123
core::rect<s32> rect (0 , 0 , 230 , 35 );
117
124
rect = rect + v2s32 (size.X / 2 - 220 , ypos);
0 commit comments