Fix for #3444: Changing the title text for key bindings dialog box

This commit is contained in:
123survesh 2019-10-04 12:14:16 +05:30
parent 1de0693402
commit 94ef5124d0
3 changed files with 8 additions and 3 deletions

View File

@ -28,10 +28,15 @@ using namespace irr::gui;
// ------------------------------------------------------------------------------------------------------
PressAKeyDialog::PressAKeyDialog(const float w, const float h) :
PressAKeyDialog::PressAKeyDialog(const float w, const float h, const bool isKeyboardFlag) :
ModalDialog(w, h)
{
loadFromFile("press_a_key_dialog.stkgui");
if(isKeyboardFlag)
{
Widget* title = getWidget("title");
title->setText("Press any key...");
}
}
// ------------------------------------------------------------------------------------------------------

View File

@ -31,7 +31,7 @@ public:
/**
* Creates a modal dialog with given percentage of screen width and height
*/
PressAKeyDialog(const float percentWidth, const float percentHeight);
PressAKeyDialog(const float percentWidth, const float percentHeight, const bool isKeyboardFlag);
GUIEngine::EventPropagation processEvent(const std::string& eventSource);
};

View File

@ -588,7 +588,7 @@ void OptionsScreenDevice::eventCallback(Widget* widget,
binding_to_set = (PlayerAction)n;
new PressAKeyDialog(0.5f, 0.4f);
new PressAKeyDialog(0.5f, 0.4f, m_config->isKeyboard());
if (m_config->isKeyboard())
{