History

fix Ui keyboard navigation

various fixes to allow some support for keyboard navigation in message boxes and dialogs

Triplelexx committed 8 years ago

Commit 24f1fc31 parent ac1c3986 files · +83 −26Browse files

Showing the changes to interface/src/scripting/WindowScriptingInterface.cpp (1 of 6 files). Show all

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+3−3
@@ -103,14 +103,14 @@ void WindowScriptingInterface::raiseMainWindow() { · 102 unmodified lines
103103 /// \param const QString& message message to display
104104 /// \return QScriptValue::UndefinedValue
105105 void WindowScriptingInterface::alert(const QString& message) {
106− OffscreenUi::asyncWarning("", message);
106+ OffscreenUi::asyncWarning("", message, QMessageBox::Ok, QMessageBox::Ok);
107107 }
108108
109109 /// Display a confirmation box with the options 'Yes' and 'No'
110110 /// \param const QString& message message to display
111111 /// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise
112112 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)));
114114 }
115115
116116 /// Display a prompt with a text box
@@ -353,7 +353,7 @@ QScriptValue WindowScriptingInterface::browseAssets(const QString& title, const · 236 unmodified lines
353353 return result.isEmpty() ? QScriptValue::NullValue : QScriptValue(result);
354354 }
355355
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
357357 /// directory the browser will start at the root directory.
358358 /// \param const QString& title title of the window
359359 /// \param const QString& directory directory to start the asset browser at