Update gui strings and hide some button for mobile stk (with gamepad)

This commit is contained in:
Benau 2020-04-28 10:20:24 +08:00
parent e7e702ad39
commit 11757a557a
4 changed files with 22 additions and 7 deletions

View File

@ -44,7 +44,7 @@
text="Once in a server, a race will begin once its owner (symbolized with the crown) decides so. Official servers may auto-start races only when there are enough players. Then, you can choose your kart and vote for the next track to race on. An addon kart or track is allowed only if it exists on all joined players and the server."/>
</div>
<label align="center" I18N="In the help menu" text="... or on the same computer:"/>
<label align="center" I18N="In the help menu" text="... or on the same device:"/>
<div width="100%" proportion="2" layout="horizontal-row">
<icon align="center" width="8%" height="100%" icon="gui/icons/options_input.png"/>

View File

@ -61,13 +61,13 @@ AddDeviceDialog::AddDeviceDialog() : ModalDialog(0.90f, 0.80f)
core::rect<s32> text_area( 15, 15, m_area.getWidth()-15, y_bottom-15 );
core::stringw msg =
_("To add a new Gamepad/Joystick device, simply start SuperTuxKart "
"with it connected and it will appear in the list.\n\nTo add a "
_("New gamepads and joysticks will automatically appear in the list "
"when you connect them to this device.\n\nTo add a "
"keyboard config, you can use the button below, HOWEVER please "
"note that most keyboards only support a limited amount of "
"simultaneous keypresses and are thus inappropriate for multiplayer "
"gameplay. (You can, however, connect multiple keyboards to the "
"computer. Remember that everyone still needs different keybindings "
"gameplay. (You can, however, connect multiple keyboards to this "
"device. Remember that everyone still needs different keybindings "
"in this case.)");
IGUIStaticText* b =
GUIEngine::getGUIEnv()->addStaticText(msg,

View File

@ -39,6 +39,12 @@ PressAKeyDialog::PressAKeyDialog(const float w, const float h, const bool isKeyb
// I18N: In press a key dialog, tell user to press a key to bind configuration
title->setText(_("Press any key..."));
}
else
{
// Gamepad configuration, rename cancel to just cancel and hide assign esc button
getWidget("cancel")->setText(_("Cancel"));
getWidget("assignEsc")->setVisible(false);
}
}
// ------------------------------------------------------------------------------------------------------

View File

@ -1008,8 +1008,17 @@ void KartSelectionScreen::addMultiplayerMessage()
{
m_multiplayer_message = new BubbleWidget();
m_multiplayer_message->m_properties[PROP_TEXT_ALIGN] = "center";
m_multiplayer_message->setText( _("Everyone:\nPress the 'Select' button to "
"join the game") );
if (!irr_driver->getDevice()->hasHardwareKeyboard() &&
input_manager->getGamepadCount() == 0)
{
m_multiplayer_message->setText(_("Connect a keyboard or "
"gamepad to play splitscreen multiplayer"));
}
else
{
m_multiplayer_message->setText(_("Everyone:\n"
"Press the 'Select' button to join the game"));
}
m_multiplayer_message->m_x = message_x;
m_multiplayer_message->m_y = (int) (fullarea->m_y + fullarea->m_h * 0.3f);
m_multiplayer_message->m_w = (int) (splitWidth * 0.6f);