X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2FguiPasswordChange.cpp;h=273326fd59761d3802366610126703603b786af4;hb=7aa72c56b6a3d3af8a7dbef36d3a71fa311a7242;hp=ec1cd029ab321165df02086198bc0b71240316b1;hpb=ccae5a49ad55a7c70d3977af33f5ce413abe94df;p=dragonfireclient.git diff --git a/src/guiPasswordChange.cpp b/src/guiPasswordChange.cpp index ec1cd029a..273326fd5 100644 --- a/src/guiPasswordChange.cpp +++ b/src/guiPasswordChange.cpp @@ -21,6 +21,8 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "serialization.h" #include +#include "gettext.h" + const int ID_oldPassword = 256; const int ID_newPassword1 = 257; const int ID_newPassword2 = 258; @@ -94,12 +96,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) Add stuff */ s32 ypos = 50; + changeCtype(""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); - const wchar_t *text = L"Old Password"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(wgettext("Old Password"), + rect, false, true, this, -1); } + changeCtype("C"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -109,12 +113,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) e->setPasswordBox(true); } ypos += 50; + changeCtype(""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); - const wchar_t *text = L"New Password"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(wgettext("New Password"), + rect, false, true, this, -1); } + changeCtype("C"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -123,12 +129,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) e->setPasswordBox(true); } ypos += 50; + changeCtype(""); { core::rect rect(0, 0, 110, 20); rect += topleft_client + v2s32(35, ypos+6); - const wchar_t *text = L"Confirm Password"; - Environment->addStaticText(text, rect, false, true, this, -1); + Environment->addStaticText(wgettext("Confirm Password"), + rect, false, true, this, -1); } + changeCtype("C"); { core::rect rect(0, 0, 230, 30); rect += topleft_client + v2s32(160, ypos); @@ -138,21 +146,24 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize) } ypos += 50; + changeCtype(""); { core::rect rect(0, 0, 140, 30); rect = rect + v2s32(size.X/2-140/2, ypos); - Environment->addButton(rect, this, ID_change, L"Change"); + Environment->addButton(rect, this, ID_change, wgettext("Change")); } ypos += 50; { core::rect rect(0, 0, 300, 20); rect += topleft_client + v2s32(35, ypos); - const wchar_t *text = L"Passwords do not match!"; IGUIElement *e = - Environment->addStaticText(text, rect, false, true, this, ID_message); + Environment->addStaticText( + wgettext("Passwords do not match!"), + rect, false, true, this, ID_message); e->setVisible(false); } + changeCtype("C"); }