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
103/// \param const QString& message message to display103/// \param const QString& message message to display
104/// \return QScriptValue::UndefinedValue104/// \return QScriptValue::UndefinedValue
105void WindowScriptingInterface::alert(const QString& message) {105void 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 display110/// \param const QString& message message to display
111/// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise111/// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise
112QScriptValue WindowScriptingInterface::confirm(const QString& message) {112QScriptValue 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 box116/// 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 window358/// \param const QString& title title of the window
359/// \param const QString& directory directory to start the asset browser at359/// \param const QString& directory directory to start the asset browser at