mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-21 08:26:34 +00:00
Add controller support to text input menu
This commit is contained in:
parent
1e200ed048
commit
5e7761bef1
2 changed files with 11 additions and 0 deletions
|
@ -83,4 +83,14 @@ namespace MWGui
|
||||||
mTextEdit->setCaption(text);
|
mTextEdit->setCaption(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool TextInputDialog::onControllerButtonEvent(const SDL_ControllerButtonEvent& arg)
|
||||||
|
{
|
||||||
|
if (arg.button == SDL_CONTROLLER_BUTTON_A)
|
||||||
|
{
|
||||||
|
onOkClicked(nullptr);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,6 +27,7 @@ namespace MWGui
|
||||||
protected:
|
protected:
|
||||||
void onOkClicked(MyGUI::Widget* _sender);
|
void onOkClicked(MyGUI::Widget* _sender);
|
||||||
void onTextAccepted(MyGUI::EditBox* _sender);
|
void onTextAccepted(MyGUI::EditBox* _sender);
|
||||||
|
bool onControllerButtonEvent(const SDL_ControllerButtonEvent& arg) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
MyGUI::EditBox* mTextEdit;
|
MyGUI::EditBox* mTextEdit;
|
||||||
|
|
Loading…
Reference in a new issue