aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-30 22:33:26 +0200
committerNils Dagsson Moskopp <nils@dieweltistgarnichtso.net>2011-07-30 22:33:26 +0200
commitf4d7530587cf0c71d51ee08e7f78bbaf70bd8b9e (patch)
tree3e68841dc749f04f5ea7b850c553a34893650854 /src
parent75816150ec3f95a3d0f60f3b70d281e5d83c584c (diff)
parent185c0bd5870d95b130e76d5cc3869442b4e73e69 (diff)
downloadminetest-f4d7530587cf0c71d51ee08e7f78bbaf70bd8b9e.tar.gz
minetest-f4d7530587cf0c71d51ee08e7f78bbaf70bd8b9e.tar.bz2
minetest-f4d7530587cf0c71d51ee08e7f78bbaf70bd8b9e.zip
Merge branch 'master' of github.com:erlehmann/minetest-delta
Diffstat (limited to 'src')
-rw-r--r--src/gettext.h14
-rw-r--r--src/guiKeyChangeMenu.cpp84
-rw-r--r--src/guiKeyChangeMenu.h35
-rw-r--r--src/guiMainMenu.cpp6
-rw-r--r--src/guiMessageMenu.cpp2
-rw-r--r--src/guiPasswordChange.cpp8
-rw-r--r--src/guiPauseMenu.cpp2
-rw-r--r--src/guiTextInputMenu.cpp2
8 files changed, 94 insertions, 59 deletions
diff --git a/src/gettext.h b/src/gettext.h
index 493f9b21b..3413f3806 100644
--- a/src/gettext.h
+++ b/src/gettext.h
@@ -1,3 +1,4 @@
+#ifndef GETTEXT_HEADER
#include "config.h" // for USE_GETTEXT
#if USE_GETTEXT
@@ -12,7 +13,6 @@
inline void init_gettext(const char *path) {
#if USE_GETTEXT
- setlocale(LC_MESSAGES, "");
bindtextdomain(PROJECT_NAME, path);
textdomain(PROJECT_NAME);
#endif
@@ -25,3 +25,15 @@ inline wchar_t* chartowchar_t(const char *str)
mbstowcs(nstr, str, l);
return nstr;
}
+
+inline void changeCtype(const char *l)
+{
+ char *ret = NULL;
+ ret = setlocale(LC_CTYPE, l);
+ if(ret == NULL)
+ std::cout<<"locale could not be set"<<std::endl;
+ else
+ std::cout<<"locale has been set to:"<<ret<<std::endl;
+}
+#define GETTEXT_HEADER
+#endif
diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp
index 98d6f8086..7855751ff 100644
--- a/src/guiKeyChangeMenu.cpp
+++ b/src/guiKeyChangeMenu.cpp
@@ -80,9 +80,9 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 125, 20);
rect += topleft + v2s32(25, 3);
- const wchar_t *text = L"KEYBINDINGS";
//gui::IGUIStaticText *t =
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("KEYBINDINGS")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
v2s32 offset(25, 40);
@@ -91,8 +91,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Forward";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Forward")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -108,8 +108,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Backward";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Backward")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -124,8 +124,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Left";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Left")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -139,8 +139,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Right";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Right")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -155,8 +155,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Use";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Use")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -170,8 +170,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Sneak";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Sneak")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -186,8 +186,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Jump";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Jump")), rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -202,8 +201,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Inventory";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Inventory")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -218,8 +217,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Chat";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Chat")), rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -235,8 +233,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Toggle fly";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Toggle fly")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -250,8 +248,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
- const wchar_t *text = L"Toggle fast";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Toggle fast")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -266,7 +264,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Range select";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Range select")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -283,7 +282,8 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 20);
rect += topleft + v2s32(offset.X, offset.Y);
const wchar_t *text = L"Print stacks";
- Environment->addStaticText(text, rect, false, true, this, -1);
+ Environment->addStaticText(chartowchar_t(gettext("Print stacks")),
+ rect, false, true, this, -1);
//t->setTextAlignment(gui::EGUIA_CENTER, gui::EGUIA_UPPERLEFT);
}
@@ -296,12 +296,14 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(size.X - 100 - 20, size.Y - 40);
- Environment->addButton(rect, this, GUI_ID_BACK_BUTTON, L"Save");
+ Environment->addButton(rect, this, GUI_ID_BACK_BUTTON,
+ chartowchar_t(gettext("Save")));
}
{
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(size.X - 100 - 20 - 100 - 20, size.Y - 40);
- Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON, L"Cancel");
+ Environment->addButton(rect, this, GUI_ID_ABORT_BUTTON,
+ chartowchar_t(gettext("Cancel")));
}
}
@@ -526,67 +528,67 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event)
case GUI_ID_KEY_FORWARD_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->forward->setText(L"press Key");
+ this->forward->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_BACKWARD_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->backward->setText(L"press Key");
+ this->backward->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_LEFT_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->left->setText(L"press Key");
+ this->left->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_RIGHT_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->right->setText(L"press Key");
+ this->right->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_USE_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->use->setText(L"press Key");
+ this->use->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_FLY_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->fly->setText(L"press Key");
+ this->fly->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_FAST_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->fast->setText(L"press Key");
+ this->fast->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_JUMP_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->jump->setText(L"press Key");
+ this->jump->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_CHAT_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->chat->setText(L"press Key");
+ this->chat->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_SNEAK_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->sneak->setText(L"press Key");
+ this->sneak->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_INVENTORY_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->inventory->setText(L"press Key");
+ this->inventory->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_DUMP_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->dump->setText(L"press Key");
+ this->dump->setText(chartowchar_t(gettext("press Key")));
break;
case GUI_ID_KEY_RANGE_BUTTON:
resetMenu();
activeKey = event.GUIEvent.Caller->getID();
- this->range->setText(L"press Key");
+ this->range->setText(chartowchar_t(gettext("press Key")));
break;
}
//Buttons
diff --git a/src/guiKeyChangeMenu.h b/src/guiKeyChangeMenu.h
index e9e359c3c..c40d802ac 100644
--- a/src/guiKeyChangeMenu.h
+++ b/src/guiKeyChangeMenu.h
@@ -26,35 +26,36 @@
#include "utility.h"
#include "modalMenu.h"
#include "client.h"
+#include "gettext.h"
#include <string>
static const char *KeyNames[] =
- { "-", "Left Button", "Right Button", "Cancel", "Middle Button", "X Button 1",
- "X Button 2", "-", "Back", "Tab", "-", "-", "Clear", "Return", "-",
- "-", "Shift", "Control", "Menu", "Pause", "Capital", "Kana", "-",
- "Junja", "Final", "Kanji", "-", "Escape", "Convert", "Nonconvert",
- "Accept", "Mode Change", "Space", "Priot", "Next", "End", "Home",
- "Left", "Up", "Right", "Down", "Select", "Print", "Execute",
- "Snapshot", "Insert", "Delete", "Help", "0", "1", "2", "3", "4", "5",
+ { "-", gettext("Left Button"), gettext("Right Button"), gettext("Cancel"), gettext("Middle Button"), gettext("X Button 1"),
+ gettext("X Button 2"), "-", gettext("Back"), gettext("Tab"), "-", "-", gettext("Clear"), gettext("Return"), "-",
+ "-", gettext("Shift"), gettext("Control"), gettext("Menu"), gettext("Pause"), gettext("Capital"), gettext("Kana"), "-",
+ gettext("Junja"), gettext("Final"), gettext("Kanji"), "-", gettext("Escape"), gettext("Convert"), gettext("Nonconvert"),
+ gettext("Accept"), gettext("Mode Change"), gettext("Space"), gettext("Priot"), gettext("Next"), gettext("End"), gettext("Home"),
+ gettext("Left"), gettext("Up"), gettext("Right"), gettext("Down"), gettext("Select"), gettext("Print"), gettext("Execute"),
+ gettext("Snapshot"), gettext("Insert"), gettext("Delete"), gettext("Help"), "0", "1", "2", "3", "4", "5",
"6", "7", "8", "9", "-", "-", "-", "-", "-", "-", "-", "A", "B", "C",
"D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q",
- "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "Left Windows",
- "Right Windows", "Apps", "-", "Sleep", "Numpad 0", "Numpad 1",
- "Numpad 2", "Numpad 3", "Numpad 4", "Numpad 5", "Numpad 6", "Numpad 7",
- "Numpad 8", "Numpad 9", "Numpad *", "Numpad +", "Numpad /", "Numpad -",
+ "R", "S", "T", "U", "V", "W", "X", "Y", "Z", gettext("Left Windows"),
+ gettext("Right Windows"), gettext("Apps"), "-", gettext("Sleep"), gettext("Numpad 0"), gettext("Numpad 1"),
+ gettext("Numpad 2"), gettext("Numpad 3"), gettext("Numpad 4"), gettext("Numpad 5"), gettext("Numpad 6"), gettext("Numpad 7"),
+ gettext("Numpad 8"), gettext("Numpad 9"), gettext("Numpad *"), gettext("Numpad +"), gettext("Numpad /"), gettext("Numpad -"),
"Numpad .", "Numpad /", "F1", "F2", "F3", "F4", "F5", "F6", "F7", "F8",
"F9", "F10", "F11", "F12", "F13", "F14", "F15", "F16", "F17", "F18",
"F19", "F20", "F21", "F22", "F23", "F24", "-", "-", "-", "-", "-", "-",
- "-", "-", "Num Lock", "Scroll Lock", "-", "-", "-", "-", "-", "-", "-",
- "-", "-", "-", "-", "-", "-", "-", "Left Shift", "Right Shight",
- "Left Control", "Right Control", "Left Menu", "Right Menu", "-", "-",
+ "-", "-", gettext("Num Lock"), gettext("Scroll Lock"), "-", "-", "-", "-", "-", "-", "-",
+ "-", "-", "-", "-", "-", "-", "-", gettext("Left Shift"), gettext("Right Shight"),
+ gettext("Left Control"), gettext("Right Control"), gettext("Left Menu"), gettext("Right Menu"), "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
- "-", "-", "-", "-", "-", "Plus", "Comma", "Minus", "Period", "-", "-",
+ "-", "-", "-", "-", "-", gettext("Plus"), gettext("Comma"), gettext("Minus"), gettext("Period"), "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
"-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-",
- "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "Attn", "CrSel",
- "ExSel", "Erase OEF", "Play", "Zoom", "PA1", "OEM Clear", "-" };
+ "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", "-", gettext("Attn"), gettext("CrSel"),
+ gettext("ExSel"), gettext("Erase OEF"), gettext("Play"), gettext("Zoom"), gettext("PA1"), gettext("OEM Clear"), "-" };
enum
{
GUI_ID_BACK_BUTTON = 101, GUI_ID_ABORT_BUTTON, GUI_ID_SCROLL_BAR,
diff --git a/src/guiMainMenu.cpp b/src/guiMainMenu.cpp
index 1d7f224f6..63bc72d24 100644
--- a/src/guiMainMenu.cpp
+++ b/src/guiMainMenu.cpp
@@ -164,6 +164,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
v2s32 topleft_client(40, 0);
v2s32 size_client = size - v2s32(40, 0);
+ changeCtype("");
{
core::rect<s32> rect(0, 0, 20, 125);
rect += topleft_client + v2s32(-15, 60);
@@ -180,6 +181,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
Environment->addStaticText(chartowchar_t(gettext("Name/Password")),
rect, false, true, this, -1);
}
+ changeCtype("C");
{
core::rect<s32> rect(0, 0, 230, 30);
rect += topleft_client + v2s32(160, 50);
@@ -196,6 +198,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
e->setPasswordBox(true);
}
+ changeCtype("");
// Address + port
{
core::rect<s32> rect(0, 0, 110, 20);
@@ -203,6 +206,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
Environment->addStaticText(chartowchar_t(gettext("Address/Port")),
rect, false, true, this, -1);
}
+ changeCtype("C");
{
core::rect<s32> rect(0, 0, 230, 30);
rect += topleft_client + v2s32(160, 100);
@@ -217,6 +221,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
rect += topleft_client + v2s32(size_client.X-60-100, 100);
Environment->addEditBox(text_port.c_str(), rect, true, this, GUI_ID_PORT_INPUT);
}
+ changeCtype("");
{
core::rect<s32> rect(0, 0, 400, 20);
rect += topleft_client + v2s32(160, 100+35);
@@ -289,6 +294,7 @@ void GUIMainMenu::regenerateGui(v2u32 screensize)
Environment->addButton(rect, this, GUI_ID_DELETE_MAP_BUTTON,
chartowchar_t(gettext("Delete map")));
}
+ changeCtype("C");
}
void GUIMainMenu::drawMenu()
diff --git a/src/guiMessageMenu.cpp b/src/guiMessageMenu.cpp
index 155be6029..71c8fd1e8 100644
--- a/src/guiMessageMenu.cpp
+++ b/src/guiMessageMenu.cpp
@@ -85,6 +85,7 @@ void GUIMessageMenu::regenerateGui(v2u32 screensize)
Environment->addStaticText(m_message_text.c_str(), rect, false,
true, this, 256);
}
+ changeCtype("");
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25);
@@ -93,6 +94,7 @@ void GUIMessageMenu::regenerateGui(v2u32 screensize)
chartowchar_t(gettext("Proceed")));
Environment->setFocus(e);
}
+ changeCtype("C");
}
void GUIMessageMenu::drawMenu()
diff --git a/src/guiPasswordChange.cpp b/src/guiPasswordChange.cpp
index fabe75110..2a7fb009a 100644
--- a/src/guiPasswordChange.cpp
+++ b/src/guiPasswordChange.cpp
@@ -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);
Environment->addStaticText(chartowchar_t(gettext("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);
Environment->addStaticText(chartowchar_t(gettext("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);
Environment->addStaticText(chartowchar_t(gettext("Confirm Password")),
rect, false, true, this, -1);
}
+ changeCtype("C");
{
core::rect<s32> rect(0, 0, 230, 30);
rect += topleft_client + v2s32(160, ypos);
@@ -140,6 +146,7 @@ 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);
@@ -156,6 +163,7 @@ void GUIPasswordChange::regenerateGui(v2u32 screensize)
rect, false, true, this, ID_message);
e->setVisible(false);
}
+ changeCtype("C");
}
diff --git a/src/guiPauseMenu.cpp b/src/guiPauseMenu.cpp
index c704cd3fb..6cf364e5f 100644
--- a/src/guiPauseMenu.cpp
+++ b/src/guiPauseMenu.cpp
@@ -103,6 +103,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
const s32 btn_gap = 20;
const s32 btn_num = 4;
s32 btn_y = size.Y/2-((btn_num*btn_height+(btn_num-1)*btn_gap))/2;
+ changeCtype("");
{
core::rect<s32> rect(0, 0, 140, btn_height);
rect = rect + v2s32(size.X/2-140/2, btn_y);
@@ -180,6 +181,7 @@ void GUIPauseMenu::regenerateGui(v2u32 screensize)
Environment->addStaticText(narrow_to_wide(os.str()).c_str(), rect, false, true, this, 259);
}
+ changeCtype("C");
}
void GUIPauseMenu::drawMenu()
diff --git a/src/guiTextInputMenu.cpp b/src/guiTextInputMenu.cpp
index 252e452f5..a59602554 100644
--- a/src/guiTextInputMenu.cpp
+++ b/src/guiTextInputMenu.cpp
@@ -104,12 +104,14 @@ void GUITextInputMenu::regenerateGui(v2u32 screensize)
Environment->addEditBox(text.c_str(), rect, true, this, 256);
Environment->setFocus(e);
}
+ changeCtype("");
{
core::rect<s32> rect(0, 0, 140, 30);
rect = rect + v2s32(size.X/2-140/2, size.Y/2-30/2+25);
Environment->addButton(rect, this, 257,
chartowchar_t(gettext("Proceed")));
}
+ changeCtype("C");
}
void GUITextInputMenu::drawMenu()