summaryrefslogtreecommitdiff
path: root/src/guiKeyChangeMenu.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/guiKeyChangeMenu.cpp')
-rw-r--r--src/guiKeyChangeMenu.cpp78
1 files changed, 39 insertions, 39 deletions
diff --git a/src/guiKeyChangeMenu.cpp b/src/guiKeyChangeMenu.cpp
index cdf32d176..20a3d361e 100644
--- a/src/guiKeyChangeMenu.cpp
+++ b/src/guiKeyChangeMenu.cpp
@@ -101,7 +101,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->forward = Environment->addButton(rect, this,
GUI_ID_KEY_FORWARD_BUTTON,
- narrow_to_wide(KeyNames[key_forward]).c_str());
+ wgettext(KeyNames[key_forward]));
}
offset += v2s32(0, 25);
@@ -118,7 +118,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->backward = Environment->addButton(rect, this,
GUI_ID_KEY_BACKWARD_BUTTON,
- narrow_to_wide(KeyNames[key_backward]).c_str());
+ wgettext(KeyNames[key_backward]));
}
offset += v2s32(0, 25);
{
@@ -133,7 +133,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->left = Environment->addButton(rect, this, GUI_ID_KEY_LEFT_BUTTON,
- narrow_to_wide(KeyNames[key_left]).c_str());
+ wgettext(KeyNames[key_left]));
}
offset += v2s32(0, 25);
{
@@ -149,7 +149,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->right = Environment->addButton(rect, this,
GUI_ID_KEY_RIGHT_BUTTON,
- narrow_to_wide(KeyNames[key_right]).c_str());
+ wgettext(KeyNames[key_right]));
}
offset += v2s32(0, 25);
{
@@ -164,7 +164,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->use = Environment->addButton(rect, this, GUI_ID_KEY_USE_BUTTON,
- narrow_to_wide(KeyNames[key_use]).c_str());
+ wgettext(KeyNames[key_use]));
}
offset += v2s32(0, 25);
{
@@ -180,7 +180,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->sneak = Environment->addButton(rect, this,
GUI_ID_KEY_SNEAK_BUTTON,
- narrow_to_wide(KeyNames[key_sneak]).c_str());
+ wgettext(KeyNames[key_sneak]));
}
offset += v2s32(0, 25);
{
@@ -194,7 +194,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->jump = Environment->addButton(rect, this, GUI_ID_KEY_JUMP_BUTTON,
- narrow_to_wide(KeyNames[key_jump]).c_str());
+ wgettext(KeyNames[key_jump]));
}
offset += v2s32(0, 25);
@@ -211,7 +211,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->inventory = Environment->addButton(rect, this,
GUI_ID_KEY_INVENTORY_BUTTON,
- narrow_to_wide(KeyNames[key_inventory]).c_str());
+ wgettext(KeyNames[key_inventory]));
}
offset += v2s32(0, 25);
{
@@ -225,7 +225,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->chat = Environment->addButton(rect, this, GUI_ID_KEY_CHAT_BUTTON,
- narrow_to_wide(KeyNames[key_chat]).c_str());
+ wgettext(KeyNames[key_chat]));
}
//next col
@@ -242,7 +242,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->fly = Environment->addButton(rect, this, GUI_ID_KEY_FLY_BUTTON,
- narrow_to_wide(KeyNames[key_fly]).c_str());
+ wgettext(KeyNames[key_fly]));
}
offset += v2s32(0, 25);
{
@@ -257,7 +257,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->fast = Environment->addButton(rect, this, GUI_ID_KEY_FAST_BUTTON,
- narrow_to_wide(KeyNames[key_fast]).c_str());
+ wgettext(KeyNames[key_fast]));
}
offset += v2s32(0, 25);
{
@@ -273,7 +273,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->range = Environment->addButton(rect, this,
GUI_ID_KEY_RANGE_BUTTON,
- narrow_to_wide(KeyNames[key_range]).c_str());
+ wgettext(KeyNames[key_range]));
}
offset += v2s32(0, 25);
@@ -289,7 +289,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
core::rect < s32 > rect(0, 0, 100, 30);
rect += topleft + v2s32(offset.X + 105, offset.Y - 5);
this->dump = Environment->addButton(rect, this, GUI_ID_KEY_DUMP_BUTTON,
- narrow_to_wide(KeyNames[key_dump]).c_str());
+ wgettext(KeyNames[key_dump]));
}
{
core::rect < s32 > rect(0, 0, 100, 30);
@@ -367,45 +367,45 @@ bool GUIKeyChangeMenu::resetMenu()
{
case GUI_ID_KEY_FORWARD_BUTTON:
this->forward->setText(
- narrow_to_wide(KeyNames[key_forward]).c_str());
+ wgettext(KeyNames[key_forward]));
break;
case GUI_ID_KEY_BACKWARD_BUTTON:
this->backward->setText(
- narrow_to_wide(KeyNames[key_backward]).c_str());
+ wgettext(KeyNames[key_backward]));
break;
case GUI_ID_KEY_LEFT_BUTTON:
- this->left->setText(narrow_to_wide(KeyNames[key_left]).c_str());
+ this->left->setText(wgettext(KeyNames[key_left]));
break;
case GUI_ID_KEY_RIGHT_BUTTON:
- this->right->setText(narrow_to_wide(KeyNames[key_right]).c_str());
+ this->right->setText(wgettext(KeyNames[key_right]));
break;
case GUI_ID_KEY_JUMP_BUTTON:
- this->jump->setText(narrow_to_wide(KeyNames[key_jump]).c_str());
+ this->jump->setText(wgettext(KeyNames[key_jump]));
break;
case GUI_ID_KEY_SNEAK_BUTTON:
- this->sneak->setText(narrow_to_wide(KeyNames[key_sneak]).c_str());
+ this->sneak->setText(wgettext(KeyNames[key_sneak]));
break;
case GUI_ID_KEY_INVENTORY_BUTTON:
this->inventory->setText(
- narrow_to_wide(KeyNames[key_inventory]).c_str());
+ wgettext(KeyNames[key_inventory]));
break;
case GUI_ID_KEY_CHAT_BUTTON:
- this->chat->setText(narrow_to_wide(KeyNames[key_chat]).c_str());
+ this->chat->setText(wgettext(KeyNames[key_chat]));
break;
case GUI_ID_KEY_RANGE_BUTTON:
- this->range->setText(narrow_to_wide(KeyNames[key_range]).c_str());
+ this->range->setText(wgettext(KeyNames[key_range]));
break;
case GUI_ID_KEY_FLY_BUTTON:
- this->fly->setText(narrow_to_wide(KeyNames[key_fly]).c_str());
+ this->fly->setText(wgettext(KeyNames[key_fly]));
break;
case GUI_ID_KEY_FAST_BUTTON:
- this->fast->setText(narrow_to_wide(KeyNames[key_fast]).c_str());
+ this->fast->setText(wgettext(KeyNames[key_fast]));
break;
case GUI_ID_KEY_USE_BUTTON:
- this->use->setText(narrow_to_wide(KeyNames[key_use]).c_str());
+ this->use->setText(wgettext(KeyNames[key_use]));
break;
case GUI_ID_KEY_DUMP_BUTTON:
- this->dump->setText(narrow_to_wide(KeyNames[key_dump]).c_str());
+ this->dump->setText(wgettext(KeyNames[key_dump]));
break;
}
activeKey = -1;
@@ -422,79 +422,79 @@ bool GUIKeyChangeMenu::OnEvent(const SEvent& event)
if (activeKey == GUI_ID_KEY_FORWARD_BUTTON)
{
this->forward->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_forward = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_BACKWARD_BUTTON)
{
this->backward->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_backward = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_LEFT_BUTTON)
{
this->left->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_left = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_RIGHT_BUTTON)
{
this->right->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_right = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_JUMP_BUTTON)
{
this->jump->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_jump = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_SNEAK_BUTTON)
{
this->sneak->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_sneak = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_INVENTORY_BUTTON)
{
this->inventory->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_inventory = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_CHAT_BUTTON)
{
this->chat->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_chat = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_RANGE_BUTTON)
{
this->range->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_range = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_FLY_BUTTON)
{
this->fly->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_fly = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_FAST_BUTTON)
{
this->fast->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_fast = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_USE_BUTTON)
{
this->use->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_use = event.KeyInput.Key;
}
else if (activeKey == GUI_ID_KEY_DUMP_BUTTON)
{
this->dump->setText(
- narrow_to_wide(KeyNames[event.KeyInput.Key]).c_str());
+ wgettext(KeyNames[event.KeyInput.Key]));
this->key_dump = event.KeyInput.Key;
}
changeCtype("C");