History

Merge branch 'master' of https://github.com/highfidelity/hifi into 21668

Cain Kilgore committed 8 years ago

Commit d1ecc852 parents 5048bf1 51bf3c1440 files · +9824 −37124Browse files

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

Unified · Split

interface/src/scripting/WindowScriptingInterface.cpp+5−5
@@ -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
@@ -357,7 +357,7 @@ QScriptValue WindowScriptingInterface::browseAssets(const QString& title, const · 238 unmodified lines
357 return result.isEmpty() ? QScriptValue::NullValue : QScriptValue(result);357 return result.isEmpty() ? QScriptValue::NullValue : QScriptValue(result);
358}358}
359 359
360/// Display a select asset dialog that lets the user select an asset from the Asset Server. If `directory` is an invalid 360/// Display a select asset dialog that lets the user select an asset from the Asset Server. If `directory` is an invalid
361/// directory the browser will start at the root directory.361/// directory the browser will start at the root directory.
362/// \param const QString& title title of the window362/// \param const QString& title title of the window
363/// \param const QString& directory directory to start the asset browser at363/// \param const QString& directory directory to start the asset browser at
@@ -399,11 +399,11 @@ QString WindowScriptingInterface::protocolSignature() { · 35 unmodified lines
399}399}
400 400
401int WindowScriptingInterface::getInnerWidth() {401int WindowScriptingInterface::getInnerWidth() {
402 return qApp->getDeviceSize().x;402 return qApp->getWindow()->geometry().width();
403}403}
404 404
405int WindowScriptingInterface::getInnerHeight() {405int WindowScriptingInterface::getInnerHeight() {
406 return qApp->getDeviceSize().y;406 return qApp->getWindow()->geometry().height() - qApp->getPrimaryMenu()->geometry().height();
407}407}
408 408
409glm::vec2 WindowScriptingInterface::getDeviceSize() const {409glm::vec2 WindowScriptingInterface::getDeviceSize() const {