Showing the changes to interface/src/scripting/AssetMappingsScriptingInterface.cpp (1 of 4 files). Show all
Unified · Split
| @@ -59,13 +59,18 @@ void AssetMappingsScriptingInterface::getMapping(QString path, QJSValue callback · 58 unmodified lines | ||
| 59 | 59 | request->start(); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | −void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, QJSValue startedCallback, QJSValue completedCallback) { | |
| 62 | +void AssetMappingsScriptingInterface::uploadFile(QString path, QString mapping, QJSValue startedCallback, QJSValue completedCallback, bool dropEvent) { | |
| 63 | 63 | static const QString helpText = |
| 64 | − "Upload your asset to a specific folder by entering the full path. Specifying " | |
| 64 | + "Upload your asset to a specific folder by entering the full path. Specifying\n" | |
| 65 | 65 | "a new folder name will automatically create that folder for you."; |
| 66 | + static const QString dropHelpText = | |
| 67 | + "This file will be added to your Asset Server.\n" | |
| 68 | + "Use the field below to place your file in a specific folder or to rename it.\n" | |
| 69 | + "Specifying a new folder name will automatically create that folder for you."; | |
| 66 | 70 | |
| 67 | 71 | auto offscreenUi = DependencyManager::get<OffscreenUi>(); |
| 68 | − auto result = offscreenUi->inputDialog(OffscreenUi::ICON_INFORMATION, "Specify Asset Path", helpText, mapping); | |
| 72 | + auto result = offscreenUi->inputDialog(OffscreenUi::ICON_INFORMATION, "Specify Asset Path", | |
| 73 | + dropEvent ? dropHelpText : helpText, mapping); | |
| 69 | 74 | |
| 70 | 75 | if (!result.isValid()) { |
| 71 | 76 | completedCallback.call({ -1 }); |