aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorWuzzy <wuzzy2@mail.ru>2021-02-24 10:45:30 +0000
committerGitHub <noreply@github.com>2021-02-24 11:45:30 +0100
commit827224635bc131dbf4f6e41dd3d78c7a2d94da0f (patch)
tree57963040d80122de7934707e3626c8d65f88ce18 /src
parent02d64a51ee185722ec1b6e2941b461bacf0db0de (diff)
downloadminetest-827224635bc131dbf4f6e41dd3d78c7a2d94da0f.tar.gz
minetest-827224635bc131dbf4f6e41dd3d78c7a2d94da0f.tar.bz2
minetest-827224635bc131dbf4f6e41dd3d78c7a2d94da0f.zip
Use "Aux1" key name consistently everywhere
Diffstat (limited to 'src')
-rw-r--r--src/client/game.cpp4
-rw-r--r--src/client/inputhandler.cpp4
-rw-r--r--src/client/joystick_controller.cpp6
-rw-r--r--src/client/keys.h2
-rw-r--r--src/defaultsettings.cpp4
-rw-r--r--src/gui/guiKeyChangeMenu.cpp6
-rw-r--r--src/gui/touchscreengui.cpp18
-rw-r--r--src/gui/touchscreengui.h8
8 files changed, 26 insertions, 26 deletions
diff --git a/src/client/game.cpp b/src/client/game.cpp
index 3c58fb46f..d4e2fe7c3 100644
--- a/src/client/game.cpp
+++ b/src/client/game.cpp
@@ -2415,7 +2415,7 @@ void Game::updatePlayerControl(const CameraOrientation &cam)
input->isKeyDown(KeyType::LEFT),
input->isKeyDown(KeyType::RIGHT),
isKeyDown(KeyType::JUMP),
- isKeyDown(KeyType::SPECIAL1),
+ isKeyDown(KeyType::AUX1),
isKeyDown(KeyType::SNEAK),
isKeyDown(KeyType::ZOOM),
isKeyDown(KeyType::DIG),
@@ -2432,7 +2432,7 @@ void Game::updatePlayerControl(const CameraOrientation &cam)
( (u32)(isKeyDown(KeyType::LEFT) & 0x1) << 2) |
( (u32)(isKeyDown(KeyType::RIGHT) & 0x1) << 3) |
( (u32)(isKeyDown(KeyType::JUMP) & 0x1) << 4) |
- ( (u32)(isKeyDown(KeyType::SPECIAL1) & 0x1) << 5) |
+ ( (u32)(isKeyDown(KeyType::AUX1) & 0x1) << 5) |
( (u32)(isKeyDown(KeyType::SNEAK) & 0x1) << 6) |
( (u32)(isKeyDown(KeyType::DIG) & 0x1) << 7) |
( (u32)(isKeyDown(KeyType::PLACE) & 0x1) << 8) |
diff --git a/src/client/inputhandler.cpp b/src/client/inputhandler.cpp
index 978baa320..b7e70fa6c 100644
--- a/src/client/inputhandler.cpp
+++ b/src/client/inputhandler.cpp
@@ -35,7 +35,7 @@ void KeyCache::populate()
key[KeyType::LEFT] = getKeySetting("keymap_left");
key[KeyType::RIGHT] = getKeySetting("keymap_right");
key[KeyType::JUMP] = getKeySetting("keymap_jump");
- key[KeyType::SPECIAL1] = getKeySetting("keymap_special1");
+ key[KeyType::AUX1] = getKeySetting("keymap_aux1");
key[KeyType::SNEAK] = getKeySetting("keymap_sneak");
key[KeyType::DIG] = getKeySetting("keymap_dig");
key[KeyType::PLACE] = getKeySetting("keymap_place");
@@ -219,7 +219,7 @@ void RandomInputHandler::step(float dtime)
{
static RandomInputHandlerSimData rnd_data[] = {
{ "keymap_jump", 0.0f, 40 },
- { "keymap_special1", 0.0f, 40 },
+ { "keymap_aux1", 0.0f, 40 },
{ "keymap_forward", 0.0f, 40 },
{ "keymap_left", 0.0f, 40 },
{ "keymap_dig", 0.0f, 30 },
diff --git a/src/client/joystick_controller.cpp b/src/client/joystick_controller.cpp
index f61ae4ae6..919db5315 100644
--- a/src/client/joystick_controller.cpp
+++ b/src/client/joystick_controller.cpp
@@ -79,7 +79,7 @@ JoystickLayout create_default_layout()
// Accessible without any modifier pressed
JLO_B_PB(KeyType::JUMP, bm | 1 << 0, 1 << 0);
- JLO_B_PB(KeyType::SPECIAL1, bm | 1 << 1, 1 << 1);
+ JLO_B_PB(KeyType::AUX1, bm | 1 << 1, 1 << 1);
// Accessible with start button not pressed, but four pressed
// TODO find usage for button 0
@@ -126,11 +126,11 @@ JoystickLayout create_xbox_layout()
// 4 Buttons
JLO_B_PB(KeyType::JUMP, 1 << 0, 1 << 0); // A/green
JLO_B_PB(KeyType::ESC, 1 << 1, 1 << 1); // B/red
- JLO_B_PB(KeyType::SPECIAL1, 1 << 2, 1 << 2); // X/blue
+ JLO_B_PB(KeyType::AUX1, 1 << 2, 1 << 2); // X/blue
JLO_B_PB(KeyType::INVENTORY, 1 << 3, 1 << 3); // Y/yellow
// Analog Sticks
- JLO_B_PB(KeyType::SPECIAL1, 1 << 11, 1 << 11); // left
+ JLO_B_PB(KeyType::AUX1, 1 << 11, 1 << 11); // left
JLO_B_PB(KeyType::SNEAK, 1 << 12, 1 << 12); // right
// Triggers
diff --git a/src/client/keys.h b/src/client/keys.h
index 60a7a3c45..9f90da6b8 100644
--- a/src/client/keys.h
+++ b/src/client/keys.h
@@ -32,7 +32,7 @@ public:
LEFT,
RIGHT,
JUMP,
- SPECIAL1,
+ AUX1,
SNEAK,
AUTOFORWARD,
DIG,
diff --git a/src/defaultsettings.cpp b/src/defaultsettings.cpp
index cda953082..9d155f76c 100644
--- a/src/defaultsettings.cpp
+++ b/src/defaultsettings.cpp
@@ -80,7 +80,7 @@ void set_default_settings()
settings->setDefault("keymap_drop", "KEY_KEY_Q");
settings->setDefault("keymap_zoom", "KEY_KEY_Z");
settings->setDefault("keymap_inventory", "KEY_KEY_I");
- settings->setDefault("keymap_special1", "KEY_KEY_E");
+ settings->setDefault("keymap_aux1", "KEY_KEY_E");
settings->setDefault("keymap_chat", "KEY_KEY_T");
settings->setDefault("keymap_cmd", "/");
settings->setDefault("keymap_cmd_local", ".");
@@ -464,7 +464,7 @@ void set_default_settings()
settings->setDefault("touchtarget", "true");
settings->setDefault("touchscreen_threshold","20");
settings->setDefault("fixed_virtual_joystick", "false");
- settings->setDefault("virtual_joystick_triggers_aux", "false");
+ settings->setDefault("virtual_joystick_triggers_aux1", "false");
settings->setDefault("smooth_lighting", "false");
settings->setDefault("max_simultaneous_block_sends_per_client", "10");
settings->setDefault("emergequeue_limit_diskonly", "16");
diff --git a/src/gui/guiKeyChangeMenu.cpp b/src/gui/guiKeyChangeMenu.cpp
index 4dcb47779..84678b629 100644
--- a/src/gui/guiKeyChangeMenu.cpp
+++ b/src/gui/guiKeyChangeMenu.cpp
@@ -46,7 +46,7 @@ enum
GUI_ID_KEY_BACKWARD_BUTTON,
GUI_ID_KEY_LEFT_BUTTON,
GUI_ID_KEY_RIGHT_BUTTON,
- GUI_ID_KEY_USE_BUTTON,
+ GUI_ID_KEY_AUX1_BUTTON,
GUI_ID_KEY_FLY_BUTTON,
GUI_ID_KEY_FAST_BUTTON,
GUI_ID_KEY_JUMP_BUTTON,
@@ -177,7 +177,7 @@ void GUIKeyChangeMenu::regenerateGui(v2u32 screensize)
{
core::rect<s32> rect(0, 0, option_w, 30 * s);
rect += topleft + v2s32(option_x, option_y);
- const wchar_t *text = wgettext("\"Special\" = climb down");
+ const wchar_t *text = wgettext("\"Aux1\" = climb down");
Environment->addCheckBox(g_settings->getBool("aux1_descends"), rect, this,
GUI_ID_CB_AUX1_DESCENDS, text);
delete[] text;
@@ -416,7 +416,7 @@ void GUIKeyChangeMenu::init_keys()
this->add_key(GUI_ID_KEY_BACKWARD_BUTTON, wgettext("Backward"), "keymap_backward");
this->add_key(GUI_ID_KEY_LEFT_BUTTON, wgettext("Left"), "keymap_left");
this->add_key(GUI_ID_KEY_RIGHT_BUTTON, wgettext("Right"), "keymap_right");
- this->add_key(GUI_ID_KEY_USE_BUTTON, wgettext("Special"), "keymap_special1");
+ this->add_key(GUI_ID_KEY_AUX1_BUTTON, wgettext("Aux1"), "keymap_aux1");
this->add_key(GUI_ID_KEY_JUMP_BUTTON, wgettext("Jump"), "keymap_jump");
this->add_key(GUI_ID_KEY_SNEAK_BUTTON, wgettext("Sneak"), "keymap_sneak");
this->add_key(GUI_ID_KEY_DROP_BUTTON, wgettext("Drop"), "keymap_drop");
diff --git a/src/gui/touchscreengui.cpp b/src/gui/touchscreengui.cpp
index e1a971462..78b18c2d9 100644
--- a/src/gui/touchscreengui.cpp
+++ b/src/gui/touchscreengui.cpp
@@ -40,7 +40,7 @@ const char **button_imagenames = (const char *[]) {
"jump_btn.png",
"down.png",
"zoom.png",
- "aux_btn.png"
+ "aux1_btn.png"
};
const char **joystick_imagenames = (const char *[]) {
@@ -80,8 +80,8 @@ static irr::EKEY_CODE id2keycode(touch_gui_button_id id)
case zoom_id:
key = "zoom";
break;
- case special1_id:
- key = "special1";
+ case aux1_id:
+ key = "aux1";
break;
case fly_id:
key = "freemove";
@@ -425,7 +425,7 @@ TouchScreenGUI::TouchScreenGUI(IrrlichtDevice *device, IEventReceiver *receiver)
m_touchscreen_threshold = g_settings->getU16("touchscreen_threshold");
m_fixed_joystick = g_settings->getBool("fixed_virtual_joystick");
- m_joystick_triggers_special1 = g_settings->getBool("virtual_joystick_triggers_aux");
+ m_joystick_triggers_aux1 = g_settings->getBool("virtual_joystick_triggers_aux1");
m_screensize = m_device->getVideoDriver()->getScreenSize();
button_size = MYMIN(m_screensize.Y / 4.5f,
porting::getDisplayDensity() *
@@ -521,9 +521,9 @@ void TouchScreenGUI::init(ISimpleTextureSource *tsrc)
m_screensize.Y - (3 * button_size)),
L"z", false);
- // init special1/aux button
- if (!m_joystick_triggers_special1)
- initButton(special1_id,
+ // init aux1 button
+ if (!m_joystick_triggers_aux1)
+ initButton(aux1_id,
rect<s32>(m_screensize.X - (1.25 * button_size),
m_screensize.Y - (2.5 * button_size),
m_screensize.X - (0.25 * button_size),
@@ -923,7 +923,7 @@ void TouchScreenGUI::translateEvent(const SEvent &event)
}
if (distance > button_size) {
- m_joystick_status[j_special1] = true;
+ m_joystick_status[j_aux1] = true;
// move joystick "button"
s32 ndx = button_size * dx / distance - button_size / 2.0f;
s32 ndy = button_size * dy / distance - button_size / 2.0f;
@@ -1039,7 +1039,7 @@ bool TouchScreenGUI::doubleTapDetection()
void TouchScreenGUI::applyJoystickStatus()
{
for (unsigned int i = 0; i < 5; i++) {
- if (i == 4 && !m_joystick_triggers_special1)
+ if (i == 4 && !m_joystick_triggers_aux1)
continue;
SEvent translated{};
diff --git a/src/gui/touchscreengui.h b/src/gui/touchscreengui.h
index 0349624fa..ad5abae87 100644
--- a/src/gui/touchscreengui.h
+++ b/src/gui/touchscreengui.h
@@ -39,7 +39,7 @@ typedef enum
jump_id = 0,
crunch_id,
zoom_id,
- special1_id,
+ aux1_id,
after_last_element_id,
settings_starter_id,
rare_controls_starter_id,
@@ -69,7 +69,7 @@ typedef enum
j_backward,
j_left,
j_right,
- j_special1
+ j_aux1
} touch_gui_joystick_move_id;
typedef enum
@@ -217,7 +217,7 @@ private:
// forward, backward, left, right
touch_gui_button_id m_joystick_names[5] = {
- forward_id, backward_id, left_id, right_id, special1_id};
+ forward_id, backward_id, left_id, right_id, aux1_id};
bool m_joystick_status[5] = {false, false, false, false, false};
/*
@@ -237,7 +237,7 @@ private:
int m_joystick_id = -1;
bool m_joystick_has_really_moved = false;
bool m_fixed_joystick = false;
- bool m_joystick_triggers_special1 = false;
+ bool m_joystick_triggers_aux1 = false;
button_info *m_joystick_btn_off = nullptr;
button_info *m_joystick_btn_bg = nullptr;
button_info *m_joystick_btn_center = nullptr;