overte-JulianGro/interface/resources/qml/hifi/avatarapp/MessageBoxes.qml
David Rowe ffeb37e7aa Merge remote-tracking branch 'hifi/master' into merge-hifi-master
# Conflicts:
#	CMakeLists.txt
#	README.md
#	cmake/externals/glad32es/CMakeLists.txt
#	cmake/externals/glad41/CMakeLists.txt
#	cmake/externals/glad45/CMakeLists.txt
#	cmake/externals/polyvox/CMakeLists.txt
#	cmake/externals/quazip/CMakeLists.txt
#	cmake/externals/vhacd/CMakeLists.txt
#	cmake/init.cmake
#	cmake/ports/hifi-deps/CONTROL
#	cmake/ports/sdl2/CONTROL
#	cmake/ports/sdl2/disable-hidapi-for-uwp.patch
#	cmake/ports/sdl2/enable-winrt-cmake.patch
#	cmake/ports/sdl2/fix-arm64-headers.patch
#	cmake/ports/sdl2/fix-x86-windows.patch
#	cmake/ports/sdl2/portfile.cmake
#	cmake/ports/sdl2/vcpkg-cmake-wrapper.cmake
#	cmake/ports/tbb/portfile.cmake
#	hifi_vcpkg.py
#	interface/src/avatar/MyAvatar.h
#	libraries/avatars-renderer/src/avatars-renderer/Avatar.h
#	libraries/avatars/src/AvatarData.h
#	libraries/entities-renderer/src/RenderableEntityItem.h
#	libraries/entities/src/EntityItem.cpp
#	libraries/entities/src/EntityItem.h
#	libraries/fbx/src/GLTFSerializer.cpp
#	libraries/graphics-scripting/src/graphics-scripting/Forward.h
#	libraries/networking/src/AddressManager.cpp
#	libraries/networking/src/DomainHandler.h
#	libraries/procedural/src/procedural/ProceduralMaterialCache.cpp
#	libraries/render-utils/src/HighlightEffect.cpp
#	libraries/render-utils/src/MeshPartPayload.cpp
#	libraries/render-utils/src/Model.cpp
#	libraries/render-utils/src/RenderShadowTask.cpp
#	libraries/script-engine/src/WebSocketClass.cpp
2020-04-09 16:46:27 +12:00

129 lines
4 KiB
QML

import QtQuick 2.5
MessageBox {
id: popup
function showSpecifyAvatarUrl(url, callback, linkCallback) {
popup.onButton2Clicked = callback;
popup.titleText = 'Specify Avatar URL'
popup.bodyText = 'This will not overwrite your existing favorite if you are wearing one.<br>' +
'<a href="https://docs.projectathena.dev/create/avatars/create-avatars.html">' +
'Learn to make a custom avatar by opening this link on your desktop.' +
'</a>'
popup.inputText.visible = true;
popup.inputText.placeholderText = 'Enter Avatar Url';
popup.inputText.text = url;
popup.inputText.selectAll();
popup.button1text = 'CANCEL';
popup.button2text = 'CONFIRM';
popup.onButton2Clicked = function() {
if (callback) {
callback();
}
popup.close();
}
popup.onLinkClicked = function(link) {
if (linkCallback) {
linkCallback(link);
}
}
popup.open();
popup.inputText.forceActiveFocus();
}
function showSpecifyWearableUrl(callback) {
popup.button2text = 'CONFIRM'
popup.button1text = 'CANCEL'
popup.titleText = 'Specify Wearable URL'
popup.bodyText = 'If you want to add a custom wearable, you can specify the URL of the wearable file here.'
popup.inputText.visible = true;
popup.inputText.placeholderText = 'Enter Wearable URL';
popup.onButton2Clicked = function() {
if (callback) {
callback(popup.inputText.text);
}
popup.close();
}
popup.open();
popup.inputText.forceActiveFocus();
}
function showGetWearables(callback, linkCallback) {
popup.dialogButtons.yesButton.visible = false;
popup.button1text = 'CANCEL'
popup.titleText = 'Get Wearables'
popup.bodyText = 'Get wearables from <b><a href="app://marketplace">Marketplace.</a></b>' + '<br/>' +
'Wear wearable from <b><a href="app://purchases">Inventory.</a></b>'
popup.onLinkClicked = function(link) {
popup.close();
if (linkCallback) {
linkCallback(link);
}
}
popup.open();
}
function showDeleteFavorite(favoriteName, callback) {
popup.titleText = 'Delete Favorite: {AvatarName}'.replace('{AvatarName}', favoriteName)
popup.bodyText = 'This will delete your favorite. You will retain access to the wearables and avatar that made up the favorite from Inventory.'
popup.imageSource = null;
popup.button1text = 'CANCEL'
popup.button2text = 'DELETE'
popup.onButton2Clicked = function() {
popup.close();
if (callback) {
callback();
}
}
popup.open();
}
function showLoadFavorite(favoriteName, callback) {
popup.button2text = 'CONFIRM'
popup.button1text = 'CANCEL'
popup.titleText = 'Load Favorite: {AvatarName}'.replace('{AvatarName}', favoriteName)
popup.bodyText = 'This will switch your current avatar and wearables that you are wearing with a new avatar and wearables.'
popup.imageSource = null;
popup.onButton2Clicked = function() {
popup.close();
if (callback) {
callback();
}
}
popup.open();
}
function showBuyAvatars(callback, linkCallback) {
popup.dialogButtons.yesButton.visible = false;
popup.button1text = 'CANCEL'
popup.titleText = 'Get Avatars'
popup.bodyText = 'Get avatars from <b><a href="app://marketplace">Marketplace.</a></b>' + '<br/>' +
'Wear avatars in <b><a href="app://purchases">Inventory.</a></b>'
popup.onLinkClicked = function(link) {
popup.close();
if (linkCallback) {
linkCallback(link);
}
}
popup.open();
}
}