mirror of
https://github.com/OpenMW/openmw.git
synced 2025-10-18 01:16:37 +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);
|
||||
}
|
||||
|
||||
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:
|
||||
void onOkClicked(MyGUI::Widget* _sender);
|
||||
void onTextAccepted(MyGUI::EditBox* _sender);
|
||||
bool onControllerButtonEvent(const SDL_ControllerButtonEvent& arg) override;
|
||||
|
||||
private:
|
||||
MyGUI::EditBox* mTextEdit;
|
||||
|
|
Loading…
Reference in a new issue