]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/guiPasswordChange.cpp
Introduce Player::getLightPosition
[dragonfireclient.git] / src / guiPasswordChange.cpp
index 98b11b43214495c168e95a9591f11765be6e74b1..273326fd59761d3802366610126703603b786af4 100644 (file)
@@ -1,21 +1,19 @@
 /*
-Minetest-c55
-Copyright (C) 2010-11 celeron55, Perttu Ahola <celeron55@gmail.com>
+Part of Minetest-c55
+Copyright (C) 2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 Copyright (C) 2011 Ciaran Gultnieks <ciaran@ciarang.com>
 
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+Permission to use, copy, modify, and distribute this software for any
+purpose with or without fee is hereby granted, provided that the above
+copyright notice and this permission notice appear in all copies.
 
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License along
-with this program; if not, write to the Free Software Foundation, Inc.,
-51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 */
 
 #include "guiPasswordChange.h"
@@ -23,6 +21,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "serialization.h"
 #include <string>
 
+#include "gettext.h"
+
 const int ID_oldPassword = 256;
 const int ID_newPassword1 = 257;
 const int ID_newPassword2 = 258;
@@ -96,12 +96,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
                Add stuff
        */
        s32 ypos = 50;
+       changeCtype("");
        {
                core::rect<s32> 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<s32> rect(0, 0, 230, 30);
                rect += topleft_client + v2s32(160, ypos);
@@ -111,12 +113,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
                e->setPasswordBox(true);
        }
        ypos += 50;
+       changeCtype("");
        {
                core::rect<s32> 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<s32> rect(0, 0, 230, 30);
                rect += topleft_client + v2s32(160, ypos);
@@ -125,12 +129,14 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
                e->setPasswordBox(true);
        }
        ypos += 50;
+       changeCtype("");
        {
                core::rect<s32> 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<s32> rect(0, 0, 230, 30);
                rect += topleft_client + v2s32(160, ypos);
@@ -140,21 +146,24 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
        }
 
        ypos += 50;
+       changeCtype("");
        {
                core::rect<s32> 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<s32> 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");
 
 }