History

Merge pull request #12138 from Triplelexx/21669_prompt_keyboard

WL#21669: Allow better keyboard navigation of prompt windows such as Window.prompt()

Seth Alves committed 8 years ago

Commit 50e68642 parents b97c938 4c275389 files · +145 −37Browse files

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

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+3−3
@@ -105,14 +105,14 @@ void WindowScriptingInterface::raiseMainWindow() { · 104 unmodified lines
105/// \param const QString& message message to display105/// \param const QString& message message to display
106/// \return QScriptValue::UndefinedValue106/// \return QScriptValue::UndefinedValue
107void WindowScriptingInterface::alert(const QString& message) {107void WindowScriptingInterface::alert(const QString& message) {
108 OffscreenUi::asyncWarning("", message);108 OffscreenUi::asyncWarning("", message, QMessageBox::Ok, QMessageBox::Ok);
109}109}
110 110
111/// Display a confirmation box with the options 'Yes' and 'No'111/// Display a confirmation box with the options 'Yes' and 'No'
112/// \param const QString& message message to display112/// \param const QString& message message to display
113/// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise113/// \return QScriptValue `true` if 'Yes' was clicked, `false` otherwise
114QScriptValue WindowScriptingInterface::confirm(const QString& message) {114QScriptValue WindowScriptingInterface::confirm(const QString& message) {
115 return QScriptValue((QMessageBox::Yes == OffscreenUi::question("", message, QMessageBox::Yes | QMessageBox::No)));115 return QScriptValue((QMessageBox::Yes == OffscreenUi::question("", message, QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes)));
116}116}
117 117
118/// Display a prompt with a text box118/// Display a prompt with a text box
@@ -354,7 +354,7 @@ QScriptValue WindowScriptingInterface::browseAssets(const QString& title, const · 235 unmodified lines
354 return result.isEmpty() ? QScriptValue::NullValue : QScriptValue(result);354 return result.isEmpty() ? QScriptValue::NullValue : QScriptValue(result);
355}355}
356 356
357/// Display a select asset dialog that lets the user select an asset from the Asset Server. If `directory` is an invalid 357/// Display a select asset dialog that lets the user select an asset from the Asset Server. If `directory` is an invalid
358/// directory the browser will start at the root directory.358/// directory the browser will start at the root directory.
359/// \param const QString& title title of the window359/// \param const QString& title title of the window
360/// \param const QString& directory directory to start the asset browser at360/// \param const QString& directory directory to start the asset browser at