various fixes to allow some support for keyboard navigation in message boxes and dialogs
Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 6 files). Show all
Unified · Split
| @@ -103,14 +103,14 @@ void WindowScriptingInterface::raiseMainWindow() { · 102 unmodified lines | |||
| 103 | /// \param const QString& message message to display | 103 | /// \param const QString& message message to display |
| 104 | /// \return QScriptValue::UndefinedValue | 104 | /// \return QScriptValue::UndefinedValue |
| 105 | void WindowScriptingInterface::alert(const QString& message) { | 105 | void WindowScriptingInterface::alert(const QString& message) { |
| 106 | OffscreenUi::asyncWarning("", message); | 106 | OffscreenUi::asyncWarning("", message, QMessageBox::Ok, QMessageBox::Ok); |
| 107 | } | 107 | } |
| 108 | 108 | ||
| 109 | /// Display a confirmation box with the options 'Yes' and 'No' | 109 | /// Display a confirmation box with the options 'Yes' and 'No' |
| 110 | /// \param const QString& message message to display | 110 | /// \param const QString& message message to display |
| 111 | /// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise | 111 | /// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise |
| 112 | QScriptValue WindowScriptingInterface::confirm(const QString& message) { | 112 | QScriptValue WindowScriptingInterface::confirm(const QString& message) { |
| 113 | return QScriptValue((QMessageBox::Yes == OffscreenUi::question("", message, QMessageBox::Yes | QMessageBox::No))); | 113 | return QScriptValue((QMessageBox::Yes == OffscreenUi::question("", message, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes))); |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | /// Display a prompt with a text box | 116 | /// Display a prompt with a text box |
| @@ -353,7 +353,7 @@ QScriptValue WindowScriptingInterface::browseAssets(const QString& title, const · 236 unmodified lines | |||
| 353 | return result.isEmpty() ? QScriptValue::NullValue : QScriptValue(result); | 353 | return result.isEmpty() ? QScriptValue::NullValue : QScriptValue(result); |
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | /// Display a select asset dialog that lets the user select an asset from the Asset Server. If `directory` is an invalid | 356 | /// Display a select asset dialog that lets the user select an asset from the Asset Server. If `directory` is an invalid |
| 357 | /// directory the browser will start at the root directory. | 357 | /// directory the browser will start at the root directory. |
| 358 | /// \param const QString& title title of the window | 358 | /// \param const QString& title title of the window |
| 359 | /// \param const QString& directory directory to start the asset browser at | 359 | /// \param const QString& directory directory to start the asset browser at |