diff --git a/data/gui/multitouch_settings.stkgui b/data/gui/multitouch_settings.stkgui
index 605fc7e47..9107dc109 100644
--- a/data/gui/multitouch_settings.stkgui
+++ b/data/gui/multitouch_settings.stkgui
@@ -15,6 +15,14 @@
+
diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp
index 869819411..3d91c18d5 100644
--- a/src/config/user_config.hpp
+++ b/src/config/user_config.hpp
@@ -413,7 +413,12 @@ namespace UserConfigParams
PARAM_DEFAULT( IntUserConfigParam(1, "multitouch_mode",
&m_multitouch_group,
"Steering mode: 0 = off, 1 = buttons"));
-
+
+ PARAM_PREFIX BoolUserConfigParam m_multitouch_inverted
+ PARAM_DEFAULT( BoolUserConfigParam(false, "multitouch_inverted",
+ &m_multitouch_group,
+ "Draw steering wheel on right side.") );
+
PARAM_PREFIX IntUserConfigParam m_multitouch_accelerometer
PARAM_DEFAULT( IntUserConfigParam(0, "multitouch_accelerometer",
&m_multitouch_group,
diff --git a/src/states_screens/dialogs/multitouch_settings_dialog.cpp b/src/states_screens/dialogs/multitouch_settings_dialog.cpp
index 92402930f..901fab343 100644
--- a/src/states_screens/dialogs/multitouch_settings_dialog.cpp
+++ b/src/states_screens/dialogs/multitouch_settings_dialog.cpp
@@ -89,6 +89,10 @@ GUIEngine::EventPropagation MultitouchSettingsDialog::processEvent(
CheckBoxWidget* buttons_en = getWidget("buttons_enabled");
assert(buttons_en != NULL);
UserConfigParams::m_multitouch_mode = buttons_en->getState() ? 1 : 0;
+
+ CheckBoxWidget* buttons_inv = getWidget("buttons_inverted");
+ assert(buttons_inv != NULL);
+ UserConfigParams::m_multitouch_inverted = buttons_inv->getState();
SpinnerWidget* accelerometer = getWidget("accelerometer");
assert(accelerometer != NULL);
@@ -144,7 +148,11 @@ void MultitouchSettingsDialog::updateValues()
CheckBoxWidget* buttons_en = getWidget("buttons_enabled");
assert(buttons_en != NULL);
- buttons_en->setState(UserConfigParams::m_multitouch_mode!=0);
+ buttons_en->setState(UserConfigParams::m_multitouch_mode != 0);
+
+ CheckBoxWidget* buttons_inv = getWidget("buttons_inverted");
+ assert(buttons_inv != NULL);
+ buttons_inv->setState(UserConfigParams::m_multitouch_inverted);
SpinnerWidget* accelerometer = getWidget("accelerometer");
assert(accelerometer != NULL);
diff --git a/src/states_screens/race_gui_multitouch.cpp b/src/states_screens/race_gui_multitouch.cpp
index 9538439ab..fbf0fa474 100644
--- a/src/states_screens/race_gui_multitouch.cpp
+++ b/src/states_screens/race_gui_multitouch.cpp
@@ -104,34 +104,48 @@ void RaceGUIMultitouch::initMultitouchSteering()
const float btn_size = 0.125f * h * scale;
const float btn2_size = 0.35f * h * scale;
const float margin = 0.075f * h * scale;
- const float top_margin = 0.3f * h;
+ const float margin_top = 0.3f * h;
const float col_size = (btn_size + margin);
+
const float small_ratio = 0.75f;
+ const float btn_small_size = small_ratio * btn_size;
+ const float margin_small = small_ratio * margin;
+ const float col_small_size = small_ratio * col_size;
+
+ float first_column_x = w - 2 * col_size;
+ float second_column_x = w - 1 * col_size;
+ float steering_btn_x = 0.5f * margin;
+
+ if (UserConfigParams::m_multitouch_inverted)
+ {
+ first_column_x = margin + 1 * col_size;
+ second_column_x = margin;
+ steering_btn_x = w - btn2_size - 0.5f * margin;
+ }
m_minimap_bottom = (unsigned int)(h - 2 * col_size);
m_device->addButton(BUTTON_STEERING,
- int(0.5f * margin), int(h - 0.5f * margin - btn2_size),
- int(btn2_size), int(btn2_size));
+ int(steering_btn_x), int(h - 0.5f * margin - btn2_size),
+ int(btn2_size), int(btn2_size));
m_device->addButton(BUTTON_ESCAPE,
- int(top_margin), int(small_ratio * margin),
- int(small_ratio * btn_size), int(small_ratio * btn_size));
+ int(margin_top), int(margin_small),
+ int(btn_small_size), int(btn_small_size));
m_device->addButton(BUTTON_RESCUE,
- int(top_margin + small_ratio * col_size),
- int(small_ratio * margin),
- int(small_ratio * btn_size), int(small_ratio * btn_size));
+ int(margin_top + col_small_size), int(margin_small),
+ int(btn_small_size), int(btn_small_size));
m_device->addButton(BUTTON_NITRO,
- int(w - 1 * col_size), int(h - 2 * col_size),
- int(btn_size), int(btn_size));
+ int(second_column_x), int(h - 2 * col_size),
+ int(btn_size), int(btn_size));
m_device->addButton(BUTTON_SKIDDING,
- int(w - 1 * col_size), int(h - 1 * col_size),
- int(btn_size), int(btn_size));
+ int(second_column_x), int(h - 1 * col_size),
+ int(btn_size), int(btn_size));
m_device->addButton(BUTTON_FIRE,
- int(w - 2 * col_size), int(h - 2 * col_size),
- int(btn_size), int(btn_size));
+ int(first_column_x), int(h - 2 * col_size),
+ int(btn_size), int(btn_size));
m_device->addButton(BUTTON_LOOK_BACKWARDS,
- int(w - 2 * col_size), int(h - 1 * col_size),
- int(btn_size), int(btn_size));
+ int(first_column_x), int(h - 1 * col_size),
+ int(btn_size), int(btn_size));
m_directionnal_wheel_tex = irr_driver->getTexture(FileManager::GUI,
"android/directionnal_wheel.png");