1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-11 17:51:04 +00:00

Reduce gettext wide/narrow and string/char* conversions

This commit is contained in:
ShadowNinja 2015-02-01 17:59:23 -05:00 committed by kwolekr
parent 84c367bb46
commit 9e2a9b55e1
15 changed files with 125 additions and 141 deletions

View file

@ -96,6 +96,8 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
v2s32 size = rect.getSize();
v2s32 topleft_client(40, 0);
const wchar_t *text;
/*
Add stuff
*/
@ -103,7 +105,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
wchar_t* text = wgettext("Old Password");
text = wgettext("Old Password");
Environment->addStaticText(text, rect, false, true, this, -1);
delete[] text;
}
@ -119,7 +121,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
wchar_t* text = wgettext("New Password");
text = wgettext("New Password");
Environment->addStaticText(text, rect, false, true, this, -1);
delete[] text;
}
@ -134,7 +136,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 110, 20);
rect += topleft_client + v2s32(35, ypos+6);
wchar_t* text = wgettext("Confirm Password");
text = wgettext("Confirm Password");
Environment->addStaticText(text, rect, false, true, this, -1);
delete[] text;
}
@ -150,7 +152,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, ypos);
wchar_t* text = wgettext("Change");
text = wgettext("Change");
Environment->addButton(rect, this, ID_change, text);
delete[] text;
}
@ -159,7 +161,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, 300, 20);
rect += topleft_client + v2s32(35, ypos);
wchar_t* text = wgettext("Passwords do not match!");
text = wgettext("Passwords do not match!");
IGUIElement *e =
Environment->addStaticText(
text,