mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:09:24 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into bug-hud-module
This commit is contained in:
commit
a6bc6a09a5
36 changed files with 300 additions and 405 deletions
|
@ -97,7 +97,11 @@ void AudioMixerSlavePool::run(ConstIter begin, ConstIter end) {
|
||||||
#else
|
#else
|
||||||
// fill the queue
|
// fill the queue
|
||||||
std::for_each(_begin, _end, [&](const SharedNodePointer& node) {
|
std::for_each(_begin, _end, [&](const SharedNodePointer& node) {
|
||||||
|
#if defined(__clang__) && defined(Q_OS_LINUX)
|
||||||
|
_queue.push(node);
|
||||||
|
#else
|
||||||
_queue.emplace(node);
|
_queue.emplace(node);
|
||||||
|
#endif
|
||||||
});
|
});
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
@ -97,7 +97,11 @@ void AvatarMixerSlavePool::run(ConstIter begin, ConstIter end) {
|
||||||
#else
|
#else
|
||||||
// fill the queue
|
// fill the queue
|
||||||
std::for_each(_begin, _end, [&](const SharedNodePointer& node) {
|
std::for_each(_begin, _end, [&](const SharedNodePointer& node) {
|
||||||
|
#if defined(__clang__) && defined(Q_OS_LINUX)
|
||||||
|
_queue.push(node);
|
||||||
|
#else
|
||||||
_queue.emplace(node);
|
_queue.emplace(node);
|
||||||
|
#endif
|
||||||
});
|
});
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
2
cmake/externals/glew/CMakeLists.txt
vendored
2
cmake/externals/glew/CMakeLists.txt
vendored
|
@ -9,7 +9,7 @@ ExternalProject_Add(
|
||||||
${EXTERNAL_NAME}
|
${EXTERNAL_NAME}
|
||||||
URL http://hifi-public.s3.amazonaws.com/dependencies/glew_simple_1.13.0.zip
|
URL http://hifi-public.s3.amazonaws.com/dependencies/glew_simple_1.13.0.zip
|
||||||
URL_MD5 73f833649e904257b35bf4e84f8bdfb5
|
URL_MD5 73f833649e904257b35bf4e84f8bdfb5
|
||||||
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||||
LOG_DOWNLOAD 1
|
LOG_DOWNLOAD 1
|
||||||
LOG_CONFIGURE 1
|
LOG_CONFIGURE 1
|
||||||
LOG_BUILD 1
|
LOG_BUILD 1
|
||||||
|
|
2
cmake/externals/nvtt/CMakeLists.txt
vendored
2
cmake/externals/nvtt/CMakeLists.txt
vendored
|
@ -31,7 +31,7 @@ else ()
|
||||||
${EXTERNAL_NAME}
|
${EXTERNAL_NAME}
|
||||||
URL http://hifi-public.s3.amazonaws.com/dependencies/nvidia-texture-tools-2.1.0.hifi.zip
|
URL http://hifi-public.s3.amazonaws.com/dependencies/nvidia-texture-tools-2.1.0.hifi.zip
|
||||||
URL_MD5 5794b950f8b265a9a41b2839b3bf7ebb
|
URL_MD5 5794b950f8b265a9a41b2839b3bf7ebb
|
||||||
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DNVTT_SHARED=1 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
|
CONFIGURE_COMMAND CMAKE_ARGS ${ANDROID_CMAKE_ARGS} -DNVTT_SHARED=1 -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR> -DCMAKE_POSITION_INDEPENDENT_CODE=ON
|
||||||
LOG_DOWNLOAD 1
|
LOG_DOWNLOAD 1
|
||||||
LOG_CONFIGURE 1
|
LOG_CONFIGURE 1
|
||||||
LOG_BUILD 1
|
LOG_BUILD 1
|
||||||
|
|
|
@ -14,9 +14,17 @@ endif ()
|
||||||
|
|
||||||
if (HIFI_MEMORY_DEBUGGING)
|
if (HIFI_MEMORY_DEBUGGING)
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -U_FORTIFY_SOURCE -fno-stack-protector -fno-omit-frame-pointer")
|
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libasan -static-libstdc++ -fsanitize=address")
|
# for clang on Linux
|
||||||
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libasan -static-libstdc++ -fsanitize=address")
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address -fsanitize-recover=address")
|
||||||
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined -fsanitize=address -fsanitize-recover=address")
|
||||||
|
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fsanitize=undefined -fsanitize=address -fsanitize-recover=address")
|
||||||
|
else ()
|
||||||
|
# for gcc on Linux
|
||||||
|
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined -fsanitize=address -U_FORTIFY_SOURCE -fno-stack-protector -fno-omit-frame-pointer")
|
||||||
|
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libasan -static-libstdc++ -fsanitize=undefined -fsanitize=address")
|
||||||
|
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static-libasan -static-libstdc++ -fsanitize=undefined -fsanitize=address")
|
||||||
|
endif()
|
||||||
endif (UNIX)
|
endif (UNIX)
|
||||||
endif ()
|
endif ()
|
||||||
endmacro(SETUP_MEMORY_DEBUGGER)
|
endmacro(SETUP_MEMORY_DEBUGGER)
|
||||||
|
|
|
@ -262,7 +262,13 @@ target_link_libraries(
|
||||||
)
|
)
|
||||||
|
|
||||||
if (UNIX)
|
if (UNIX)
|
||||||
target_link_libraries(${TARGET_NAME} pthread)
|
if (CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||||
|
# Linux
|
||||||
|
target_link_libraries(${TARGET_NAME} pthread atomic)
|
||||||
|
else ()
|
||||||
|
# OSX
|
||||||
|
target_link_libraries(${TARGET_NAME} pthread)
|
||||||
|
endif ()
|
||||||
endif(UNIX)
|
endif(UNIX)
|
||||||
|
|
||||||
# assume we are using a Qt build without bearer management
|
# assume we are using a Qt build without bearer management
|
||||||
|
|
|
@ -25,16 +25,67 @@ Rectangle {
|
||||||
HifiConstants { id: hifi; }
|
HifiConstants { id: hifi; }
|
||||||
|
|
||||||
id: root;
|
id: root;
|
||||||
property string marketplaceId: "";
|
property string marketplaceUrl;
|
||||||
|
property string certificateId;
|
||||||
property string itemName: "--";
|
property string itemName: "--";
|
||||||
property string itemOwner: "--";
|
property string itemOwner: "--";
|
||||||
property string itemEdition: "--";
|
property string itemEdition: "--";
|
||||||
property string dateOfPurchase: "";
|
property string dateOfPurchase: "--";
|
||||||
property bool isLightbox: false;
|
property bool isLightbox: false;
|
||||||
|
property bool isMyCert: false;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.faintGray;
|
color: hifi.colors.faintGray;
|
||||||
Hifi.QmlCommerce {
|
Hifi.QmlCommerce {
|
||||||
id: commerce;
|
id: commerce;
|
||||||
|
|
||||||
|
onCertificateInfoResult: {
|
||||||
|
if (result.status !== 'success') {
|
||||||
|
console.log("Failed to get certificate info", result.message);
|
||||||
|
} else {
|
||||||
|
root.marketplaceUrl = result.data.marketplace_item_url;
|
||||||
|
root.isMyCert = result.isMyCert ? result.isMyCert : false;
|
||||||
|
root.itemOwner = root.isMyCert ? Account.username :
|
||||||
|
"\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022\u2022";
|
||||||
|
root.itemEdition = result.data.edition_number + "/" + (result.data.limited_run === -1 ? "\u221e" : result.data.limited_run);
|
||||||
|
root.dateOfPurchase = getFormattedDate(result.data.transfer_created_at * 1000);
|
||||||
|
root.itemName = result.data.marketplace_item_name;
|
||||||
|
|
||||||
|
if (result.data.invalid_reason || result.data.transfer_status[0] === "failed") {
|
||||||
|
titleBarText.text = "Invalid Certificate";
|
||||||
|
titleBarText.color = hifi.colors.redHighlight;
|
||||||
|
popText.text = "";
|
||||||
|
if (result.data.invalid_reason) {
|
||||||
|
errorText.text = result.data.invalid_reason;
|
||||||
|
}
|
||||||
|
} else if (result.data.transfer_status[0] === "pending") {
|
||||||
|
titleBarText.text = "Certificate Pending";
|
||||||
|
errorText.text = "The status of this item is still pending confirmation. If the purchase is not confirmed, " +
|
||||||
|
"this entity will be cleaned up by the domain.";
|
||||||
|
errorText.color = hifi.colors.baseGray;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onCertificateIdChanged: {
|
||||||
|
if (certificateId !== "") {
|
||||||
|
commerce.certificateInfo(certificateId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
onVisibleChanged: {
|
||||||
|
if (!visible) {
|
||||||
|
titleBarText.text = "Certificate";
|
||||||
|
popText.text = "PROOF OF PURCHASE";
|
||||||
|
root.certificateId = "";
|
||||||
|
root.itemName = "--";
|
||||||
|
root.itemOwner = "--";
|
||||||
|
root.itemEdition = "--";
|
||||||
|
root.dateOfPurchase = "--";
|
||||||
|
root.marketplaceUrl = "";
|
||||||
|
root.isMyCert = false;
|
||||||
|
errorText.text = "";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This object is always used in a popup.
|
// This object is always used in a popup.
|
||||||
|
@ -115,7 +166,7 @@ Rectangle {
|
||||||
size: 28;
|
size: 28;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: itemNameHeader.bottom;
|
anchors.top: itemNameHeader.bottom;
|
||||||
anchors.topMargin: 4;
|
anchors.topMargin: 8;
|
||||||
anchors.left: itemNameHeader.left;
|
anchors.left: itemNameHeader.left;
|
||||||
anchors.right: itemNameHeader.right;
|
anchors.right: itemNameHeader.right;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
|
@ -126,7 +177,7 @@ Rectangle {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
hoverEnabled: enabled;
|
hoverEnabled: enabled;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sendToScript({method: 'inspectionCertificate_showInMarketplaceClicked', itemId: root.marketplaceId});
|
sendToScript({method: 'inspectionCertificate_showInMarketplaceClicked', marketplaceUrl: root.marketplaceUrl});
|
||||||
}
|
}
|
||||||
onEntered: itemName.color = hifi.colors.blueHighlight;
|
onEntered: itemName.color = hifi.colors.blueHighlight;
|
||||||
onExited: itemName.color = hifi.colors.blueAccent;
|
onExited: itemName.color = hifi.colors.blueAccent;
|
||||||
|
@ -140,14 +191,20 @@ Rectangle {
|
||||||
size: 16;
|
size: 16;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: itemName.bottom;
|
anchors.top: itemName.bottom;
|
||||||
anchors.topMargin: 20;
|
anchors.topMargin: 28;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 45;
|
anchors.leftMargin: 45;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 16;
|
anchors.rightMargin: 16;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.lightGray;
|
||||||
|
}
|
||||||
|
FontLoader { id: ralewayRegular; source: "../../../../fonts/Raleway-Regular.ttf"; }
|
||||||
|
TextMetrics {
|
||||||
|
id: textMetrics;
|
||||||
|
font.family: ralewayRegular.name
|
||||||
|
text: root.itemOwner;
|
||||||
}
|
}
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: ownedBy;
|
id: ownedBy;
|
||||||
|
@ -156,14 +213,31 @@ Rectangle {
|
||||||
size: 22;
|
size: 22;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: ownedByHeader.bottom;
|
anchors.top: ownedByHeader.bottom;
|
||||||
anchors.topMargin: 4;
|
anchors.topMargin: 8;
|
||||||
anchors.left: ownedByHeader.left;
|
anchors.left: ownedByHeader.left;
|
||||||
anchors.right: ownedByHeader.right;
|
height: textMetrics.height;
|
||||||
height: paintedHeight;
|
width: root.isMyCert ? textMetrics.width + 25 : ownedByHeader.width;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.darkGray;
|
color: hifi.colors.darkGray;
|
||||||
elide: Text.ElideRight;
|
elide: Text.ElideRight;
|
||||||
}
|
}
|
||||||
|
AnonymousProRegular {
|
||||||
|
id: isMyCertText;
|
||||||
|
visible: root.isMyCert;
|
||||||
|
text: "(Private)";
|
||||||
|
size: 18;
|
||||||
|
// Anchors
|
||||||
|
anchors.top: ownedBy.top;
|
||||||
|
anchors.topMargin: 4;
|
||||||
|
anchors.bottom: ownedBy.bottom;
|
||||||
|
anchors.left: ownedBy.right;
|
||||||
|
anchors.leftMargin: 4;
|
||||||
|
anchors.right: ownedByHeader.right;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.lightGray;
|
||||||
|
elide: Text.ElideRight;
|
||||||
|
verticalAlignment: Text.AlignVCenter;
|
||||||
|
}
|
||||||
|
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: editionHeader;
|
id: editionHeader;
|
||||||
|
@ -172,23 +246,23 @@ Rectangle {
|
||||||
size: 16;
|
size: 16;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: ownedBy.bottom;
|
anchors.top: ownedBy.bottom;
|
||||||
anchors.topMargin: 20;
|
anchors.topMargin: 28;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 45;
|
anchors.leftMargin: 45;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 16;
|
anchors.rightMargin: 16;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.lightGray;
|
||||||
}
|
}
|
||||||
AnonymousProRegular {
|
AnonymousProRegular {
|
||||||
id: edition;
|
id: edition;
|
||||||
text: root.itemEdition;
|
text: root.itemEdition;
|
||||||
// Text size
|
// Text size
|
||||||
size: 22;
|
size: 18;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: editionHeader.bottom;
|
anchors.top: editionHeader.bottom;
|
||||||
anchors.topMargin: 4;
|
anchors.topMargin: 8;
|
||||||
anchors.left: editionHeader.left;
|
anchors.left: editionHeader.left;
|
||||||
anchors.right: editionHeader.right;
|
anchors.right: editionHeader.right;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
|
@ -199,31 +273,29 @@ Rectangle {
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: dateOfPurchaseHeader;
|
id: dateOfPurchaseHeader;
|
||||||
text: "DATE OF PURCHASE";
|
text: "DATE OF PURCHASE";
|
||||||
visible: root.dateOfPurchase !== "";
|
|
||||||
// Text size
|
// Text size
|
||||||
size: 16;
|
size: 16;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: ownedBy.bottom;
|
anchors.top: edition.bottom;
|
||||||
anchors.topMargin: 20;
|
anchors.topMargin: 28;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 45;
|
anchors.leftMargin: 45;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 16;
|
anchors.rightMargin: 16;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.lightGray;
|
||||||
}
|
}
|
||||||
AnonymousProRegular {
|
AnonymousProRegular {
|
||||||
id: dateOfPurchase;
|
id: dateOfPurchase;
|
||||||
text: root.dateOfPurchase;
|
text: root.dateOfPurchase;
|
||||||
visible: root.dateOfPurchase !== "";
|
|
||||||
// Text size
|
// Text size
|
||||||
size: 22;
|
size: 18;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: editionHeader.bottom;
|
anchors.top: dateOfPurchaseHeader.bottom;
|
||||||
anchors.topMargin: 4;
|
anchors.topMargin: 8;
|
||||||
anchors.left: editionHeader.left;
|
anchors.left: dateOfPurchaseHeader.left;
|
||||||
anchors.right: editionHeader.right;
|
anchors.right: dateOfPurchaseHeader.right;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.darkGray;
|
color: hifi.colors.darkGray;
|
||||||
|
@ -231,15 +303,13 @@ Rectangle {
|
||||||
|
|
||||||
RalewayRegular {
|
RalewayRegular {
|
||||||
id: errorText;
|
id: errorText;
|
||||||
text: "Here we will display some text if there's an <b>error</b> with the certificate " +
|
|
||||||
"(DMCA takedown, invalid cert, location of item updated)";
|
|
||||||
// Text size
|
// Text size
|
||||||
size: 20;
|
size: 20;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: root.dateOfPurchase !== "" ? dateOfPurchase.bottom : edition.bottom;
|
anchors.top: dateOfPurchase.bottom;
|
||||||
anchors.topMargin: 40;
|
anchors.topMargin: 36;
|
||||||
anchors.left: root.dateOfPurchase !== "" ? dateOfPurchase.left : edition.left;
|
anchors.left: dateOfPurchase.left;
|
||||||
anchors.right: root.dateOfPurchase !== "" ? dateOfPurchase.right : edition.right;
|
anchors.right: dateOfPurchase.right;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
// Style
|
// Style
|
||||||
wrapMode: Text.WordWrap;
|
wrapMode: Text.WordWrap;
|
||||||
|
@ -254,7 +324,7 @@ Rectangle {
|
||||||
Item {
|
Item {
|
||||||
id: buttonsContainer;
|
id: buttonsContainer;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.bottomMargin: 50;
|
anchors.bottomMargin: 30;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
height: 50;
|
height: 50;
|
||||||
|
@ -281,6 +351,7 @@ Rectangle {
|
||||||
// "Show In Marketplace" button
|
// "Show In Marketplace" button
|
||||||
HifiControlsUit.Button {
|
HifiControlsUit.Button {
|
||||||
id: showInMarketplaceButton;
|
id: showInMarketplaceButton;
|
||||||
|
enabled: root.marketplaceUrl;
|
||||||
color: hifi.buttons.blue;
|
color: hifi.buttons.blue;
|
||||||
colorScheme: hifi.colorSchemes.light;
|
colorScheme: hifi.colorSchemes.light;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
|
@ -290,7 +361,7 @@ Rectangle {
|
||||||
height: 50;
|
height: 50;
|
||||||
text: "View In Market"
|
text: "View In Market"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sendToScript({method: 'inspectionCertificate_showInMarketplaceClicked', itemId: root.marketplaceId});
|
sendToScript({method: 'inspectionCertificate_showInMarketplaceClicked', marketplaceUrl: root.marketplaceUrl});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -313,19 +384,42 @@ Rectangle {
|
||||||
//
|
//
|
||||||
function fromScript(message) {
|
function fromScript(message) {
|
||||||
switch (message.method) {
|
switch (message.method) {
|
||||||
case 'inspectionCertificate_setMarketplaceId':
|
case 'inspectionCertificate_setCertificateId':
|
||||||
root.marketplaceId = message.marketplaceId;
|
root.certificateId = message.certificateId;
|
||||||
break;
|
|
||||||
case 'inspectionCertificate_setItemInfo':
|
|
||||||
root.itemName = message.itemName;
|
|
||||||
root.itemOwner = message.itemOwner;
|
|
||||||
root.itemEdition = message.itemEdition;
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
console.log('Unrecognized message from marketplaces.js:', JSON.stringify(message));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
signal sendToScript(var message);
|
signal sendToScript(var message);
|
||||||
|
|
||||||
|
function getFormattedDate(timestamp) {
|
||||||
|
function addLeadingZero(n) {
|
||||||
|
return n < 10 ? '0' + n : '' + n;
|
||||||
|
}
|
||||||
|
|
||||||
|
var a = new Date(timestamp);
|
||||||
|
var year = a.getFullYear();
|
||||||
|
var month = addLeadingZero(a.getMonth());
|
||||||
|
var day = addLeadingZero(a.getDate());
|
||||||
|
var hour = a.getHours();
|
||||||
|
var drawnHour = hour;
|
||||||
|
if (hour === 0) {
|
||||||
|
drawnHour = 12;
|
||||||
|
} else if (hour > 12) {
|
||||||
|
drawnHour -= 12;
|
||||||
|
}
|
||||||
|
drawnHour = addLeadingZero(drawnHour);
|
||||||
|
|
||||||
|
var amOrPm = "AM";
|
||||||
|
if (hour >= 12) {
|
||||||
|
amOrPm = "PM";
|
||||||
|
}
|
||||||
|
|
||||||
|
var min = addLeadingZero(a.getMinutes());
|
||||||
|
var sec = addLeadingZero(a.getSeconds());
|
||||||
|
return year + '-' + month + '-' + day + '<br>' + drawnHour + ':' + min + amOrPm;
|
||||||
|
}
|
||||||
//
|
//
|
||||||
// FUNCTION DEFINITIONS END
|
// FUNCTION DEFINITIONS END
|
||||||
//
|
//
|
||||||
|
|
|
@ -34,6 +34,7 @@ Item {
|
||||||
property string itemId;
|
property string itemId;
|
||||||
property string itemPreviewImageUrl;
|
property string itemPreviewImageUrl;
|
||||||
property string itemHref;
|
property string itemHref;
|
||||||
|
property string certificateId;
|
||||||
property int displayedItemCount;
|
property int displayedItemCount;
|
||||||
property int itemEdition;
|
property int itemEdition;
|
||||||
property int numberSold;
|
property int numberSold;
|
||||||
|
@ -168,7 +169,7 @@ Item {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
hoverEnabled: enabled;
|
hoverEnabled: enabled;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sendToPurchases({method: 'purchases_itemCertificateClicked', itemMarketplaceId: root.itemId});
|
sendToPurchases({method: 'purchases_itemCertificateClicked', itemCertificateId: root.certificateId});
|
||||||
}
|
}
|
||||||
onEntered: {
|
onEntered: {
|
||||||
certificateIcon.color = hifi.colors.black;
|
certificateIcon.color = hifi.colors.black;
|
||||||
|
@ -225,7 +226,7 @@ Item {
|
||||||
} else if (root.purchaseStatus === "invalidated") {
|
} else if (root.purchaseStatus === "invalidated") {
|
||||||
"INVALIDATED"
|
"INVALIDATED"
|
||||||
} else if (root.numberSold !== -1) {
|
} else if (root.numberSold !== -1) {
|
||||||
("Sales: " + root.numberSold + "/" + (root.limitedRun === -1 ? "INFTY" : root.limitedRun))
|
("Sales: " + root.numberSold + "/" + (root.limitedRun === -1 ? "\u221e" : root.limitedRun))
|
||||||
} else {
|
} else {
|
||||||
""
|
""
|
||||||
}
|
}
|
||||||
|
|
|
@ -427,6 +427,7 @@ Rectangle {
|
||||||
itemId: id;
|
itemId: id;
|
||||||
itemPreviewImageUrl: preview;
|
itemPreviewImageUrl: preview;
|
||||||
itemHref: download_url;
|
itemHref: download_url;
|
||||||
|
certificateId: certificate_id;
|
||||||
purchaseStatus: status;
|
purchaseStatus: status;
|
||||||
purchaseStatusChanged: statusChanged;
|
purchaseStatusChanged: statusChanged;
|
||||||
itemEdition: model.edition_number;
|
itemEdition: model.edition_number;
|
||||||
|
@ -684,8 +685,7 @@ Rectangle {
|
||||||
titleBarContainer.referrerURL = message.referrerURL;
|
titleBarContainer.referrerURL = message.referrerURL;
|
||||||
filterBar.text = message.filterText ? message.filterText : "";
|
filterBar.text = message.filterText ? message.filterText : "";
|
||||||
break;
|
break;
|
||||||
case 'inspectionCertificate_setMarketplaceId':
|
case 'inspectionCertificate_setCertificateId':
|
||||||
case 'inspectionCertificate_setItemInfo':
|
|
||||||
inspectionCertificate.fromScript(message);
|
inspectionCertificate.fromScript(message);
|
||||||
break;
|
break;
|
||||||
case 'purchases_showMyItems':
|
case 'purchases_showMyItems':
|
||||||
|
|
|
@ -299,10 +299,14 @@ Item {
|
||||||
//
|
//
|
||||||
|
|
||||||
function getFormattedDate(timestamp) {
|
function getFormattedDate(timestamp) {
|
||||||
|
function addLeadingZero(n) {
|
||||||
|
return n < 10 ? '0' + n : '' + n;
|
||||||
|
}
|
||||||
|
|
||||||
var a = new Date(timestamp);
|
var a = new Date(timestamp);
|
||||||
var year = a.getFullYear();
|
var year = a.getFullYear();
|
||||||
var month = a.getMonth();
|
var month = addLeadingZero(a.getMonth());
|
||||||
var day = a.getDate();
|
var day = addLeadingZero(a.getDate());
|
||||||
var hour = a.getHours();
|
var hour = a.getHours();
|
||||||
var drawnHour = hour;
|
var drawnHour = hour;
|
||||||
if (hour === 0) {
|
if (hour === 0) {
|
||||||
|
@ -310,14 +314,15 @@ Item {
|
||||||
} else if (hour > 12) {
|
} else if (hour > 12) {
|
||||||
drawnHour -= 12;
|
drawnHour -= 12;
|
||||||
}
|
}
|
||||||
|
drawnHour = addLeadingZero(drawnHour);
|
||||||
|
|
||||||
var amOrPm = "AM";
|
var amOrPm = "AM";
|
||||||
if (hour >= 12) {
|
if (hour >= 12) {
|
||||||
amOrPm = "PM";
|
amOrPm = "PM";
|
||||||
}
|
}
|
||||||
|
|
||||||
var min = a.getMinutes();
|
var min = addLeadingZero(a.getMinutes());
|
||||||
var sec = a.getSeconds();
|
var sec = addLeadingZero(a.getSeconds());
|
||||||
return year + '-' + month + '-' + day + '<br>' + drawnHour + ':' + min + amOrPm;
|
return year + '-' + month + '-' + day + '<br>' + drawnHour + ':' + min + amOrPm;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,8 +79,6 @@
|
||||||
#include <gpu/Batch.h>
|
#include <gpu/Batch.h>
|
||||||
#include <gpu/Context.h>
|
#include <gpu/Context.h>
|
||||||
#include <gpu/gl/GLBackend.h>
|
#include <gpu/gl/GLBackend.h>
|
||||||
#include <HFActionEvent.h>
|
|
||||||
#include <HFBackEvent.h>
|
|
||||||
#include <InfoView.h>
|
#include <InfoView.h>
|
||||||
#include <input-plugins/InputPlugin.h>
|
#include <input-plugins/InputPlugin.h>
|
||||||
#include <controllers/UserInputMapper.h>
|
#include <controllers/UserInputMapper.h>
|
||||||
|
@ -2858,10 +2856,6 @@ bool Application::event(QEvent* event) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (HFActionEvent::types().contains(event->type())) {
|
|
||||||
_controllerScriptingInterface->handleMetaEvent(static_cast<HFMetaEvent*>(event));
|
|
||||||
}
|
|
||||||
|
|
||||||
return QApplication::event(event);
|
return QApplication::event(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3166,25 +3160,8 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
case Qt::Key_Equal:
|
case Qt::Key_Equal:
|
||||||
getMyAvatar()->resetSize();
|
getMyAvatar()->resetSize();
|
||||||
break;
|
break;
|
||||||
case Qt::Key_Space: {
|
|
||||||
if (!event->isAutoRepeat()) {
|
|
||||||
// FIXME -- I don't think we've tested the HFActionEvent in a while... this looks possibly dubious
|
|
||||||
// this starts an HFActionEvent
|
|
||||||
HFActionEvent startActionEvent(HFActionEvent::startType(),
|
|
||||||
computePickRay(getMouse().x, getMouse().y));
|
|
||||||
sendEvent(this, &startActionEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case Qt::Key_Escape: {
|
case Qt::Key_Escape: {
|
||||||
getActiveDisplayPlugin()->abandonCalibration();
|
getActiveDisplayPlugin()->abandonCalibration();
|
||||||
if (!event->isAutoRepeat()) {
|
|
||||||
// this starts the HFCancelEvent
|
|
||||||
HFBackEvent startBackEvent(HFBackEvent::startType());
|
|
||||||
sendEvent(this, &startBackEvent);
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3210,30 +3187,6 @@ void Application::keyReleaseEvent(QKeyEvent* event) {
|
||||||
if (_keyboardMouseDevice->isActive()) {
|
if (_keyboardMouseDevice->isActive()) {
|
||||||
_keyboardMouseDevice->keyReleaseEvent(event);
|
_keyboardMouseDevice->keyReleaseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch (event->key()) {
|
|
||||||
case Qt::Key_Space: {
|
|
||||||
if (!event->isAutoRepeat()) {
|
|
||||||
// FIXME -- I don't think we've tested the HFActionEvent in a while... this looks possibly dubious
|
|
||||||
// this ends the HFActionEvent
|
|
||||||
HFActionEvent endActionEvent(HFActionEvent::endType(),
|
|
||||||
computePickRay(getMouse().x, getMouse().y));
|
|
||||||
sendEvent(this, &endActionEvent);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case Qt::Key_Escape: {
|
|
||||||
if (!event->isAutoRepeat()) {
|
|
||||||
// this ends the HFCancelEvent
|
|
||||||
HFBackEvent endBackEvent(HFBackEvent::endType());
|
|
||||||
sendEvent(this, &endBackEvent);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
event->ignore();
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::focusOutEvent(QFocusEvent* event) {
|
void Application::focusOutEvent(QFocusEvent* event) {
|
||||||
|
@ -3370,13 +3323,6 @@ void Application::mousePressEvent(QMouseEvent* event) {
|
||||||
if (_keyboardMouseDevice->isActive()) {
|
if (_keyboardMouseDevice->isActive()) {
|
||||||
_keyboardMouseDevice->mousePressEvent(event);
|
_keyboardMouseDevice->mousePressEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->button() == Qt::LeftButton) {
|
|
||||||
// nobody handled this - make it an action event on the _window object
|
|
||||||
HFActionEvent actionEvent(HFActionEvent::startType(),
|
|
||||||
computePickRay(mappedEvent.x(), mappedEvent.y()));
|
|
||||||
sendEvent(this, &actionEvent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3431,13 +3377,6 @@ void Application::mouseReleaseEvent(QMouseEvent* event) {
|
||||||
if (_keyboardMouseDevice->isActive()) {
|
if (_keyboardMouseDevice->isActive()) {
|
||||||
_keyboardMouseDevice->mouseReleaseEvent(event);
|
_keyboardMouseDevice->mouseReleaseEvent(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event->button() == Qt::LeftButton) {
|
|
||||||
// fire an action end event
|
|
||||||
HFActionEvent actionEvent(HFActionEvent::endType(),
|
|
||||||
computePickRay(mappedEvent.x(), mappedEvent.y()));
|
|
||||||
sendEvent(this, &actionEvent);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QTimeZone>
|
#include <QTimeZone>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include "AccountManager.h"
|
|
||||||
#include "Wallet.h"
|
#include "Wallet.h"
|
||||||
#include "Ledger.h"
|
#include "Ledger.h"
|
||||||
#include "CommerceLogging.h"
|
#include "CommerceLogging.h"
|
||||||
|
@ -48,13 +47,13 @@ Handler(receiveAt)
|
||||||
Handler(balance)
|
Handler(balance)
|
||||||
Handler(inventory)
|
Handler(inventory)
|
||||||
|
|
||||||
void Ledger::send(const QString& endpoint, const QString& success, const QString& fail, QNetworkAccessManager::Operation method, QJsonObject request) {
|
void Ledger::send(const QString& endpoint, const QString& success, const QString& fail, QNetworkAccessManager::Operation method, AccountManagerAuth::Type authType, QJsonObject request) {
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
const QString URL = "/api/v1/commerce/";
|
const QString URL = "/api/v1/commerce/";
|
||||||
JSONCallbackParameters callbackParams(this, success, this, fail);
|
JSONCallbackParameters callbackParams(this, success, this, fail);
|
||||||
qCInfo(commerce) << "Sending" << endpoint << QJsonDocument(request).toJson(QJsonDocument::Compact);
|
qCInfo(commerce) << "Sending" << endpoint << QJsonDocument(request).toJson(QJsonDocument::Compact);
|
||||||
accountManager->sendRequest(URL + endpoint,
|
accountManager->sendRequest(URL + endpoint,
|
||||||
AccountManagerAuth::Required,
|
authType,
|
||||||
method,
|
method,
|
||||||
callbackParams,
|
callbackParams,
|
||||||
QJsonDocument(request).toJson());
|
QJsonDocument(request).toJson());
|
||||||
|
@ -70,14 +69,14 @@ void Ledger::signedSend(const QString& propertyName, const QByteArray& text, con
|
||||||
} else {
|
} else {
|
||||||
request["signature"] = QString("controlled failure!");
|
request["signature"] = QString("controlled failure!");
|
||||||
}
|
}
|
||||||
send(endpoint, success, fail, QNetworkAccessManager::PutOperation, request);
|
send(endpoint, success, fail, QNetworkAccessManager::PutOperation, AccountManagerAuth::Required, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ledger::keysQuery(const QString& endpoint, const QString& success, const QString& fail) {
|
void Ledger::keysQuery(const QString& endpoint, const QString& success, const QString& fail) {
|
||||||
auto wallet = DependencyManager::get<Wallet>();
|
auto wallet = DependencyManager::get<Wallet>();
|
||||||
QJsonObject request;
|
QJsonObject request;
|
||||||
request["public_keys"] = QJsonArray::fromStringList(wallet->listPublicKeys());
|
request["public_keys"] = QJsonArray::fromStringList(wallet->listPublicKeys());
|
||||||
send(endpoint, success, fail, QNetworkAccessManager::PostOperation, request);
|
send(endpoint, success, fail, QNetworkAccessManager::PostOperation, AccountManagerAuth::Required, request);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ledger::buy(const QString& hfc_key, int cost, const QString& asset_id, const QString& inventory_key, const bool controlled_failure) {
|
void Ledger::buy(const QString& hfc_key, int cost, const QString& asset_id, const QString& inventory_key, const bool controlled_failure) {
|
||||||
|
@ -192,7 +191,7 @@ void Ledger::history(const QStringList& keys) {
|
||||||
void Ledger::resetSuccess(QNetworkReply& reply) { apiResponse("reset", reply); }
|
void Ledger::resetSuccess(QNetworkReply& reply) { apiResponse("reset", reply); }
|
||||||
void Ledger::resetFailure(QNetworkReply& reply) { failResponse("reset", reply); }
|
void Ledger::resetFailure(QNetworkReply& reply) { failResponse("reset", reply); }
|
||||||
void Ledger::reset() {
|
void Ledger::reset() {
|
||||||
send("reset_user_hfc_account", "resetSuccess", "resetFailure", QNetworkAccessManager::PutOperation, QJsonObject());
|
send("reset_user_hfc_account", "resetSuccess", "resetFailure", QNetworkAccessManager::PutOperation, AccountManagerAuth::Required, QJsonObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
void Ledger::accountSuccess(QNetworkReply& reply) {
|
void Ledger::accountSuccess(QNetworkReply& reply) {
|
||||||
|
@ -217,7 +216,7 @@ void Ledger::accountFailure(QNetworkReply& reply) {
|
||||||
failResponse("account", reply);
|
failResponse("account", reply);
|
||||||
}
|
}
|
||||||
void Ledger::account() {
|
void Ledger::account() {
|
||||||
send("hfc_account", "accountSuccess", "accountFailure", QNetworkAccessManager::PutOperation, QJsonObject());
|
send("hfc_account", "accountSuccess", "accountFailure", QNetworkAccessManager::PutOperation, AccountManagerAuth::Required, QJsonObject());
|
||||||
}
|
}
|
||||||
|
|
||||||
// The api/failResponse is called just for the side effect of logging.
|
// The api/failResponse is called just for the side effect of logging.
|
||||||
|
@ -234,3 +233,28 @@ void Ledger::updateLocation(const QString& asset_id, const QString location, con
|
||||||
auto transactionString = transactionDoc.toJson(QJsonDocument::Compact);
|
auto transactionString = transactionDoc.toJson(QJsonDocument::Compact);
|
||||||
signedSend("transaction", transactionString, key, "location", "updateLocationSuccess", "updateLocationFailure", controlledFailure);
|
signedSend("transaction", transactionString, key, "location", "updateLocationSuccess", "updateLocationFailure", controlledFailure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Ledger::certificateInfoSuccess(QNetworkReply& reply) {
|
||||||
|
auto wallet = DependencyManager::get<Wallet>();
|
||||||
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
|
|
||||||
|
QByteArray response = reply.readAll();
|
||||||
|
QJsonObject replyObject = QJsonDocument::fromJson(response).object();
|
||||||
|
|
||||||
|
QStringList keys = wallet->listPublicKeys();
|
||||||
|
if (keys.count() != 0) {
|
||||||
|
QJsonObject data = replyObject["data"].toObject();
|
||||||
|
if (data["transfer_recipient_key"].toString() == keys[0]) {
|
||||||
|
replyObject.insert("isMyCert", true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
qInfo(commerce) << "certificateInfo" << "response" << QJsonDocument(replyObject).toJson(QJsonDocument::Compact);
|
||||||
|
emit certificateInfoResult(replyObject);
|
||||||
|
}
|
||||||
|
void Ledger::certificateInfoFailure(QNetworkReply& reply) { failResponse("certificateInfo", reply); }
|
||||||
|
void Ledger::certificateInfo(const QString& certificateId) {
|
||||||
|
QString endpoint = "proof_of_purchase_status/transfer";
|
||||||
|
QJsonObject request;
|
||||||
|
request["certificate_id"] = certificateId;
|
||||||
|
send(endpoint, "certificateInfoSuccess", "certificateInfoFailure", QNetworkAccessManager::PutOperation, AccountManagerAuth::None, request);
|
||||||
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <DependencyManager.h>
|
#include <DependencyManager.h>
|
||||||
#include <QtNetwork/QNetworkReply>
|
#include <QtNetwork/QNetworkReply>
|
||||||
|
#include "AccountManager.h"
|
||||||
|
|
||||||
|
|
||||||
class Ledger : public QObject, public Dependency {
|
class Ledger : public QObject, public Dependency {
|
||||||
|
@ -32,6 +33,7 @@ public:
|
||||||
void account();
|
void account();
|
||||||
void reset();
|
void reset();
|
||||||
void updateLocation(const QString& asset_id, const QString location, const bool controlledFailure = false);
|
void updateLocation(const QString& asset_id, const QString location, const bool controlledFailure = false);
|
||||||
|
void certificateInfo(const QString& certificateId);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void buyResult(QJsonObject result);
|
void buyResult(QJsonObject result);
|
||||||
|
@ -41,6 +43,7 @@ signals:
|
||||||
void historyResult(QJsonObject result);
|
void historyResult(QJsonObject result);
|
||||||
void accountResult(QJsonObject result);
|
void accountResult(QJsonObject result);
|
||||||
void locationUpdateResult(QJsonObject result);
|
void locationUpdateResult(QJsonObject result);
|
||||||
|
void certificateInfoResult(QJsonObject result);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void buySuccess(QNetworkReply& reply);
|
void buySuccess(QNetworkReply& reply);
|
||||||
|
@ -59,11 +62,13 @@ public slots:
|
||||||
void accountFailure(QNetworkReply& reply);
|
void accountFailure(QNetworkReply& reply);
|
||||||
void updateLocationSuccess(QNetworkReply& reply);
|
void updateLocationSuccess(QNetworkReply& reply);
|
||||||
void updateLocationFailure(QNetworkReply& reply);
|
void updateLocationFailure(QNetworkReply& reply);
|
||||||
|
void certificateInfoSuccess(QNetworkReply& reply);
|
||||||
|
void certificateInfoFailure(QNetworkReply& reply);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QJsonObject apiResponse(const QString& label, QNetworkReply& reply);
|
QJsonObject apiResponse(const QString& label, QNetworkReply& reply);
|
||||||
QJsonObject failResponse(const QString& label, QNetworkReply& reply);
|
QJsonObject failResponse(const QString& label, QNetworkReply& reply);
|
||||||
void send(const QString& endpoint, const QString& success, const QString& fail, QNetworkAccessManager::Operation method, QJsonObject request);
|
void send(const QString& endpoint, const QString& success, const QString& fail, QNetworkAccessManager::Operation method, AccountManagerAuth::Type authType, QJsonObject request);
|
||||||
void keysQuery(const QString& endpoint, const QString& success, const QString& fail);
|
void keysQuery(const QString& endpoint, const QString& success, const QString& fail);
|
||||||
void signedSend(const QString& propertyName, const QByteArray& text, const QString& key, const QString& endpoint, const QString& success, const QString& fail, const bool controlled_failure = false);
|
void signedSend(const QString& propertyName, const QByteArray& text, const QString& key, const QString& endpoint, const QString& success, const QString& fail, const bool controlled_failure = false);
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,6 +29,7 @@ QmlCommerce::QmlCommerce(QQuickItem* parent) : OffscreenQmlDialog(parent) {
|
||||||
connect(wallet.data(), &Wallet::keyFilePathIfExistsResult, this, &QmlCommerce::keyFilePathIfExistsResult);
|
connect(wallet.data(), &Wallet::keyFilePathIfExistsResult, this, &QmlCommerce::keyFilePathIfExistsResult);
|
||||||
connect(ledger.data(), &Ledger::accountResult, this, &QmlCommerce::accountResult);
|
connect(ledger.data(), &Ledger::accountResult, this, &QmlCommerce::accountResult);
|
||||||
connect(wallet.data(), &Wallet::walletStatusResult, this, &QmlCommerce::walletStatusResult);
|
connect(wallet.data(), &Wallet::walletStatusResult, this, &QmlCommerce::walletStatusResult);
|
||||||
|
connect(ledger.data(), &Ledger::certificateInfoResult, this, &QmlCommerce::certificateInfoResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
void QmlCommerce::getWalletStatus() {
|
void QmlCommerce::getWalletStatus() {
|
||||||
|
@ -125,3 +126,8 @@ void QmlCommerce::account() {
|
||||||
auto ledger = DependencyManager::get<Ledger>();
|
auto ledger = DependencyManager::get<Ledger>();
|
||||||
ledger->account();
|
ledger->account();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QmlCommerce::certificateInfo(const QString& certificateId) {
|
||||||
|
auto ledger = DependencyManager::get<Ledger>();
|
||||||
|
ledger->certificateInfo(certificateId);
|
||||||
|
}
|
||||||
|
|
|
@ -43,6 +43,7 @@ signals:
|
||||||
void inventoryResult(QJsonObject result);
|
void inventoryResult(QJsonObject result);
|
||||||
void historyResult(QJsonObject result);
|
void historyResult(QJsonObject result);
|
||||||
void accountResult(QJsonObject result);
|
void accountResult(QJsonObject result);
|
||||||
|
void certificateInfoResult(QJsonObject result);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Q_INVOKABLE void getWalletStatus();
|
Q_INVOKABLE void getWalletStatus();
|
||||||
|
@ -63,6 +64,8 @@ protected:
|
||||||
Q_INVOKABLE void generateKeyPair();
|
Q_INVOKABLE void generateKeyPair();
|
||||||
Q_INVOKABLE void reset();
|
Q_INVOKABLE void reset();
|
||||||
Q_INVOKABLE void account();
|
Q_INVOKABLE void account();
|
||||||
|
|
||||||
|
Q_INVOKABLE void certificateInfo(const QString& certificateId);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_QmlCommerce_h
|
#endif // hifi_QmlCommerce_h
|
||||||
|
|
|
@ -13,23 +13,10 @@
|
||||||
|
|
||||||
#include <avatar/AvatarManager.h>
|
#include <avatar/AvatarManager.h>
|
||||||
#include <avatar/MyAvatar.h>
|
#include <avatar/MyAvatar.h>
|
||||||
#include <HFBackEvent.h>
|
|
||||||
#include <plugins/PluginManager.h>
|
#include <plugins/PluginManager.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
|
||||||
void ControllerScriptingInterface::handleMetaEvent(HFMetaEvent* event) {
|
|
||||||
if (event->type() == HFActionEvent::startType()) {
|
|
||||||
emit actionStartEvent(static_cast<HFActionEvent&>(*event));
|
|
||||||
} else if (event->type() == HFActionEvent::endType()) {
|
|
||||||
emit actionEndEvent(static_cast<HFActionEvent&>(*event));
|
|
||||||
} else if (event->type() == HFBackEvent::startType()) {
|
|
||||||
emit backStartEvent();
|
|
||||||
} else if (event->type() == HFBackEvent::endType()) {
|
|
||||||
emit backEndEvent();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool ControllerScriptingInterface::isKeyCaptured(QKeyEvent* event) const {
|
bool ControllerScriptingInterface::isKeyCaptured(QKeyEvent* event) const {
|
||||||
return isKeyCaptured(KeyEvent(*event));
|
return isKeyCaptured(KeyEvent(*event));
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,7 +17,6 @@
|
||||||
#include <controllers/UserInputMapper.h>
|
#include <controllers/UserInputMapper.h>
|
||||||
#include <controllers/ScriptingInterface.h>
|
#include <controllers/ScriptingInterface.h>
|
||||||
|
|
||||||
#include <HFActionEvent.h>
|
|
||||||
#include <KeyEvent.h>
|
#include <KeyEvent.h>
|
||||||
#include <MouseEvent.h>
|
#include <MouseEvent.h>
|
||||||
#include <SpatialEvent.h>
|
#include <SpatialEvent.h>
|
||||||
|
@ -36,8 +35,6 @@ public:
|
||||||
void emitKeyPressEvent(QKeyEvent* event);
|
void emitKeyPressEvent(QKeyEvent* event);
|
||||||
void emitKeyReleaseEvent(QKeyEvent* event);
|
void emitKeyReleaseEvent(QKeyEvent* event);
|
||||||
|
|
||||||
void handleMetaEvent(HFMetaEvent* event);
|
|
||||||
|
|
||||||
void emitMouseMoveEvent(QMouseEvent* event);
|
void emitMouseMoveEvent(QMouseEvent* event);
|
||||||
void emitMousePressEvent(QMouseEvent* event);
|
void emitMousePressEvent(QMouseEvent* event);
|
||||||
void emitMouseDoublePressEvent(QMouseEvent* event);
|
void emitMouseDoublePressEvent(QMouseEvent* event);
|
||||||
|
@ -72,12 +69,6 @@ signals:
|
||||||
void keyPressEvent(const KeyEvent& event);
|
void keyPressEvent(const KeyEvent& event);
|
||||||
void keyReleaseEvent(const KeyEvent& event);
|
void keyReleaseEvent(const KeyEvent& event);
|
||||||
|
|
||||||
void actionStartEvent(const HFActionEvent& event);
|
|
||||||
void actionEndEvent(const HFActionEvent& event);
|
|
||||||
|
|
||||||
void backStartEvent();
|
|
||||||
void backEndEvent();
|
|
||||||
|
|
||||||
void mouseMoveEvent(const MouseEvent& event);
|
void mouseMoveEvent(const MouseEvent& event);
|
||||||
void mousePressEvent(const MouseEvent& event);
|
void mousePressEvent(const MouseEvent& event);
|
||||||
void mouseDoublePressEvent(const MouseEvent& event);
|
void mouseDoublePressEvent(const MouseEvent& event);
|
||||||
|
|
|
@ -741,13 +741,6 @@ void Overlays::sendHoverLeaveOverlay(const OverlayID& id, const PointerEvent& ev
|
||||||
}
|
}
|
||||||
|
|
||||||
OverlayID Overlays::getKeyboardFocusOverlay() {
|
OverlayID Overlays::getKeyboardFocusOverlay() {
|
||||||
if (QThread::currentThread() != thread()) {
|
|
||||||
OverlayID result;
|
|
||||||
PROFILE_RANGE(script, __FUNCTION__);
|
|
||||||
BLOCKING_INVOKE_METHOD(this, "getKeyboardFocusOverlay", Q_RETURN_ARG(OverlayID, result));
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
return qApp->getKeyboardFocusOverlay();
|
return qApp->getKeyboardFocusOverlay();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,6 +78,7 @@ protected:
|
||||||
// Will be called by the lambda posted to the scene in updateInScene.
|
// Will be called by the lambda posted to the scene in updateInScene.
|
||||||
// This function will execute on the rendering thread, so you cannot use network caches to fetch
|
// This function will execute on the rendering thread, so you cannot use network caches to fetch
|
||||||
// data in this method if using multi-threaded rendering
|
// data in this method if using multi-threaded rendering
|
||||||
|
|
||||||
virtual void doRenderUpdateAsynchronous(const EntityItemPointer& entity) { }
|
virtual void doRenderUpdateAsynchronous(const EntityItemPointer& entity) { }
|
||||||
|
|
||||||
// Called by the `render` method after `needsRenderUpdate`
|
// Called by the `render` method after `needsRenderUpdate`
|
||||||
|
|
|
@ -1202,10 +1202,6 @@ gpu::TexturePointer TextureUsage::processCubeTextureColorFromImage(const QImage&
|
||||||
formatGPU = HDR_FORMAT;
|
formatGPU = HDR_FORMAT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (image.format() != QIMAGE_HDR_FORMAT) {
|
|
||||||
image = convertToHDRFormat(image, HDR_FORMAT);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Find the layout of the cubemap in the 2D image
|
// Find the layout of the cubemap in the 2D image
|
||||||
// Use the original image size since processSourceImage may have altered the size / aspect ratio
|
// Use the original image size since processSourceImage may have altered the size / aspect ratio
|
||||||
int foundLayout = CubeLayout::findLayout(srcImage.width(), srcImage.height());
|
int foundLayout = CubeLayout::findLayout(srcImage.width(), srcImage.height());
|
||||||
|
@ -1233,6 +1229,13 @@ gpu::TexturePointer TextureUsage::processCubeTextureColorFromImage(const QImage&
|
||||||
faces.push_back(faceImage);
|
faces.push_back(faceImage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (image.format() != QIMAGE_HDR_FORMAT) {
|
||||||
|
for (auto& face : faces) {
|
||||||
|
face = convertToHDRFormat(face, HDR_FORMAT);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
qCDebug(imagelogging) << "Failed to find a known cube map layout from this image:" << QString(srcImageName.c_str());
|
qCDebug(imagelogging) << "Failed to find a known cube map layout from this image:" << QString(srcImageName.c_str());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
|
@ -71,14 +71,14 @@ void GeometryMappingResource::downloadFinished(const QByteArray& data) {
|
||||||
} else {
|
} else {
|
||||||
QUrl url = _url.resolved(filename);
|
QUrl url = _url.resolved(filename);
|
||||||
|
|
||||||
QString texdir = mapping.value("texdir").toString();
|
QString texdir = mapping.value(TEXDIR_FIELD).toString();
|
||||||
if (!texdir.isNull()) {
|
if (!texdir.isNull()) {
|
||||||
if (!texdir.endsWith('/')) {
|
if (!texdir.endsWith('/')) {
|
||||||
texdir += '/';
|
texdir += '/';
|
||||||
}
|
}
|
||||||
_textureBaseUrl = resolveTextureBaseUrl(url, _url.resolved(texdir));
|
_textureBaseUrl = resolveTextureBaseUrl(url, _url.resolved(texdir));
|
||||||
} else {
|
} else {
|
||||||
_textureBaseUrl = _effectiveBaseURL;
|
_textureBaseUrl = url.resolved(QUrl("."));
|
||||||
}
|
}
|
||||||
|
|
||||||
auto animGraphVariant = mapping.value("animGraphUrl");
|
auto animGraphVariant = mapping.value("animGraphUrl");
|
||||||
|
@ -241,8 +241,10 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
void GeometryDefinitionResource::downloadFinished(const QByteArray& data) {
|
void GeometryDefinitionResource::downloadFinished(const QByteArray& data) {
|
||||||
_url = _effectiveBaseURL;
|
if (_url != _effectiveBaseURL) {
|
||||||
_textureBaseUrl = _effectiveBaseURL;
|
_url = _effectiveBaseURL;
|
||||||
|
_textureBaseUrl = _effectiveBaseURL;
|
||||||
|
}
|
||||||
QThreadPool::globalInstance()->start(new GeometryReader(_self, _effectiveBaseURL, _mapping, data, _combineParts));
|
QThreadPool::globalInstance()->start(new GeometryReader(_self, _effectiveBaseURL, _mapping, data, _combineParts));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -676,7 +676,7 @@ SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t
|
||||||
}
|
}
|
||||||
|
|
||||||
// insert the new node and release our read lock
|
// insert the new node and release our read lock
|
||||||
#ifdef Q_OS_ANDROID
|
#if defined(Q_OS_ANDROID) || (defined(__clang__) && defined(Q_OS_LINUX))
|
||||||
_nodeHash.insert(UUIDNodePair(newNode->getUUID(), newNodePointer));
|
_nodeHash.insert(UUIDNodePair(newNode->getUUID(), newNodePointer));
|
||||||
#else
|
#else
|
||||||
_nodeHash.emplace(newNode->getUUID(), newNodePointer);
|
_nodeHash.emplace(newNode->getUUID(), newNodePointer);
|
||||||
|
|
|
@ -68,8 +68,6 @@ static gpu::Stream::FormatPointer INSTANCED_SOLID_FADE_STREAM_FORMAT;
|
||||||
|
|
||||||
static const uint SHAPE_VERTEX_STRIDE = sizeof(glm::vec3) * 2; // vertices and normals
|
static const uint SHAPE_VERTEX_STRIDE = sizeof(glm::vec3) * 2; // vertices and normals
|
||||||
static const uint SHAPE_NORMALS_OFFSET = sizeof(glm::vec3);
|
static const uint SHAPE_NORMALS_OFFSET = sizeof(glm::vec3);
|
||||||
static const gpu::Type SHAPE_INDEX_TYPE = gpu::UINT32;
|
|
||||||
static const uint SHAPE_INDEX_SIZE = sizeof(gpu::uint32);
|
|
||||||
|
|
||||||
template <size_t SIDES>
|
template <size_t SIDES>
|
||||||
std::vector<vec3> polygon() {
|
std::vector<vec3> polygon() {
|
||||||
|
@ -84,67 +82,83 @@ std::vector<vec3> polygon() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryCache::ShapeData::setupVertices(gpu::BufferPointer& vertexBuffer, const geometry::VertexVector& vertices) {
|
void GeometryCache::ShapeData::setupVertices(gpu::BufferPointer& vertexBuffer, const geometry::VertexVector& vertices) {
|
||||||
|
gpu::Buffer::Size offset = vertexBuffer->getSize();
|
||||||
vertexBuffer->append(vertices);
|
vertexBuffer->append(vertices);
|
||||||
|
|
||||||
_positionView = gpu::BufferView(vertexBuffer, 0,
|
gpu::Buffer::Size viewSize = vertices.size() * 2 * sizeof(glm::vec3);
|
||||||
vertexBuffer->getSize(), SHAPE_VERTEX_STRIDE, POSITION_ELEMENT);
|
|
||||||
_normalView = gpu::BufferView(vertexBuffer, SHAPE_NORMALS_OFFSET,
|
_positionView = gpu::BufferView(vertexBuffer, offset,
|
||||||
vertexBuffer->getSize(), SHAPE_VERTEX_STRIDE, NORMAL_ELEMENT);
|
viewSize, SHAPE_VERTEX_STRIDE, POSITION_ELEMENT);
|
||||||
|
_normalView = gpu::BufferView(vertexBuffer, offset + SHAPE_NORMALS_OFFSET,
|
||||||
|
viewSize, SHAPE_VERTEX_STRIDE, NORMAL_ELEMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryCache::ShapeData::setupIndices(gpu::BufferPointer& indexBuffer, const geometry::IndexVector& indices, const geometry::IndexVector& wireIndices) {
|
void GeometryCache::ShapeData::setupIndices(gpu::BufferPointer& indexBuffer, const geometry::IndexVector& indices, const geometry::IndexVector& wireIndices) {
|
||||||
_indices = indexBuffer;
|
gpu::Buffer::Size offset = indexBuffer->getSize();
|
||||||
if (!indices.empty()) {
|
if (!indices.empty()) {
|
||||||
_indexOffset = indexBuffer->getSize() / SHAPE_INDEX_SIZE;
|
for (uint32_t i = 0; i < indices.size(); ++i) {
|
||||||
_indexCount = indices.size();
|
indexBuffer->append((uint16_t)indices[i]);
|
||||||
indexBuffer->append(indices);
|
}
|
||||||
}
|
}
|
||||||
|
gpu::Size viewSize = indices.size() * sizeof(uint16_t);
|
||||||
|
_indicesView = gpu::BufferView(indexBuffer, offset, viewSize, gpu::Element::INDEX_UINT16);
|
||||||
|
|
||||||
|
offset = indexBuffer->getSize();
|
||||||
if (!wireIndices.empty()) {
|
if (!wireIndices.empty()) {
|
||||||
_wireIndexOffset = indexBuffer->getSize() / SHAPE_INDEX_SIZE;
|
for (uint32_t i = 0; i < wireIndices.size(); ++i) {
|
||||||
_wireIndexCount = wireIndices.size();
|
indexBuffer->append((uint16_t)wireIndices[i]);
|
||||||
indexBuffer->append(wireIndices);
|
}
|
||||||
}
|
}
|
||||||
|
viewSize = wireIndices.size() * sizeof(uint16_t);
|
||||||
|
_wireIndicesView = gpu::BufferView(indexBuffer, offset, viewSize, gpu::Element::INDEX_UINT16);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryCache::ShapeData::setupBatch(gpu::Batch& batch) const {
|
void GeometryCache::ShapeData::setupBatch(gpu::Batch& batch) const {
|
||||||
batch.setInputBuffer(gpu::Stream::POSITION, _positionView);
|
batch.setInputBuffer(gpu::Stream::POSITION, _positionView);
|
||||||
batch.setInputBuffer(gpu::Stream::NORMAL, _normalView);
|
batch.setInputBuffer(gpu::Stream::NORMAL, _normalView);
|
||||||
batch.setIndexBuffer(SHAPE_INDEX_TYPE, _indices, 0);
|
batch.setIndexBuffer(_indicesView);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryCache::ShapeData::draw(gpu::Batch& batch) const {
|
void GeometryCache::ShapeData::draw(gpu::Batch& batch) const {
|
||||||
if (_indexCount) {
|
uint32_t numIndices = (uint32_t)_indicesView.getNumElements();
|
||||||
|
if (numIndices > 0) {
|
||||||
setupBatch(batch);
|
setupBatch(batch);
|
||||||
batch.drawIndexed(gpu::TRIANGLES, (gpu::uint32)_indexCount, (gpu::uint32)_indexOffset);
|
batch.drawIndexed(gpu::TRIANGLES, numIndices, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryCache::ShapeData::drawWire(gpu::Batch& batch) const {
|
void GeometryCache::ShapeData::drawWire(gpu::Batch& batch) const {
|
||||||
if (_wireIndexCount) {
|
uint32_t numIndices = (uint32_t)_wireIndicesView.getNumElements();
|
||||||
setupBatch(batch);
|
if (numIndices > 0) {
|
||||||
batch.drawIndexed(gpu::LINES, (gpu::uint32)_wireIndexCount, (gpu::uint32)_wireIndexOffset);
|
batch.setInputBuffer(gpu::Stream::POSITION, _positionView);
|
||||||
|
batch.setInputBuffer(gpu::Stream::NORMAL, _normalView);
|
||||||
|
batch.setIndexBuffer(_wireIndicesView);
|
||||||
|
batch.drawIndexed(gpu::LINES, numIndices, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryCache::ShapeData::drawInstances(gpu::Batch& batch, size_t count) const {
|
void GeometryCache::ShapeData::drawInstances(gpu::Batch& batch, size_t count) const {
|
||||||
if (_indexCount) {
|
uint32_t numIndices = (uint32_t)_indicesView.getNumElements();
|
||||||
|
if (numIndices > 0) {
|
||||||
setupBatch(batch);
|
setupBatch(batch);
|
||||||
batch.drawIndexedInstanced((gpu::uint32)count, gpu::TRIANGLES, (gpu::uint32)_indexCount, (gpu::uint32)_indexOffset);
|
batch.drawIndexedInstanced((gpu::uint32)count, gpu::TRIANGLES, numIndices, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void GeometryCache::ShapeData::drawWireInstances(gpu::Batch& batch, size_t count) const {
|
void GeometryCache::ShapeData::drawWireInstances(gpu::Batch& batch, size_t count) const {
|
||||||
if (_wireIndexCount) {
|
uint32_t numIndices = (uint32_t)_wireIndicesView.getNumElements();
|
||||||
setupBatch(batch);
|
if (numIndices > 0) {
|
||||||
batch.drawIndexedInstanced((gpu::uint32)count, gpu::LINES, (gpu::uint32)_wireIndexCount, (gpu::uint32)_wireIndexOffset);
|
batch.setInputBuffer(gpu::Stream::POSITION, _positionView);
|
||||||
|
batch.setInputBuffer(gpu::Stream::NORMAL, _normalView);
|
||||||
|
batch.setIndexBuffer(_wireIndicesView);
|
||||||
|
batch.drawIndexedInstanced((gpu::uint32)count, gpu::LINES, numIndices, 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static const size_t ICOSAHEDRON_TO_SPHERE_TESSELATION_COUNT = 3;
|
static const size_t ICOSAHEDRON_TO_SPHERE_TESSELATION_COUNT = 3;
|
||||||
|
|
||||||
size_t GeometryCache::getShapeTriangleCount(Shape shape) {
|
size_t GeometryCache::getShapeTriangleCount(Shape shape) {
|
||||||
return _shapes[shape]._indexCount / VERTICES_PER_TRIANGLE;
|
return _shapes[shape]._indicesView.getNumElements() / VERTICES_PER_TRIANGLE;
|
||||||
}
|
}
|
||||||
|
|
||||||
size_t GeometryCache::getSphereTriangleCount() {
|
size_t GeometryCache::getSphereTriangleCount() {
|
||||||
|
@ -168,7 +182,6 @@ static IndexPair indexToken(geometry::Index a, geometry::Index b) {
|
||||||
template <size_t N>
|
template <size_t N>
|
||||||
void setupFlatShape(GeometryCache::ShapeData& shapeData, const geometry::Solid<N>& shape, gpu::BufferPointer& vertexBuffer, gpu::BufferPointer& indexBuffer) {
|
void setupFlatShape(GeometryCache::ShapeData& shapeData, const geometry::Solid<N>& shape, gpu::BufferPointer& vertexBuffer, gpu::BufferPointer& indexBuffer) {
|
||||||
using namespace geometry;
|
using namespace geometry;
|
||||||
Index baseVertex = (Index)(vertexBuffer->getSize() / SHAPE_VERTEX_STRIDE);
|
|
||||||
VertexVector vertices;
|
VertexVector vertices;
|
||||||
IndexVector solidIndices, wireIndices;
|
IndexVector solidIndices, wireIndices;
|
||||||
IndexPairs wireSeenIndices;
|
IndexPairs wireSeenIndices;
|
||||||
|
@ -179,6 +192,7 @@ void setupFlatShape(GeometryCache::ShapeData& shapeData, const geometry::Solid<N
|
||||||
vertices.reserve(N * faceCount * 2);
|
vertices.reserve(N * faceCount * 2);
|
||||||
solidIndices.reserve(faceIndexCount * faceCount);
|
solidIndices.reserve(faceIndexCount * faceCount);
|
||||||
|
|
||||||
|
Index baseVertex = 0;
|
||||||
for (size_t f = 0; f < faceCount; f++) {
|
for (size_t f = 0; f < faceCount; f++) {
|
||||||
const Face<N>& face = shape.faces[f];
|
const Face<N>& face = shape.faces[f];
|
||||||
// Compute the face normal
|
// Compute the face normal
|
||||||
|
@ -219,7 +233,6 @@ void setupFlatShape(GeometryCache::ShapeData& shapeData, const geometry::Solid<N
|
||||||
template <size_t N>
|
template <size_t N>
|
||||||
void setupSmoothShape(GeometryCache::ShapeData& shapeData, const geometry::Solid<N>& shape, gpu::BufferPointer& vertexBuffer, gpu::BufferPointer& indexBuffer) {
|
void setupSmoothShape(GeometryCache::ShapeData& shapeData, const geometry::Solid<N>& shape, gpu::BufferPointer& vertexBuffer, gpu::BufferPointer& indexBuffer) {
|
||||||
using namespace geometry;
|
using namespace geometry;
|
||||||
Index baseVertex = (Index)(vertexBuffer->getSize() / SHAPE_VERTEX_STRIDE);
|
|
||||||
|
|
||||||
VertexVector vertices;
|
VertexVector vertices;
|
||||||
vertices.reserve(shape.vertices.size() * 2);
|
vertices.reserve(shape.vertices.size() * 2);
|
||||||
|
@ -236,6 +249,7 @@ void setupSmoothShape(GeometryCache::ShapeData& shapeData, const geometry::Solid
|
||||||
|
|
||||||
solidIndices.reserve(faceIndexCount * faceCount);
|
solidIndices.reserve(faceIndexCount * faceCount);
|
||||||
|
|
||||||
|
Index baseVertex = 0;
|
||||||
for (size_t f = 0; f < faceCount; f++) {
|
for (size_t f = 0; f < faceCount; f++) {
|
||||||
const Face<N>& face = shape.faces[f];
|
const Face<N>& face = shape.faces[f];
|
||||||
// Create the wire indices for unseen edges
|
// Create the wire indices for unseen edges
|
||||||
|
@ -265,7 +279,6 @@ void setupSmoothShape(GeometryCache::ShapeData& shapeData, const geometry::Solid
|
||||||
template <uint32_t N>
|
template <uint32_t N>
|
||||||
void extrudePolygon(GeometryCache::ShapeData& shapeData, gpu::BufferPointer& vertexBuffer, gpu::BufferPointer& indexBuffer, bool isConical = false) {
|
void extrudePolygon(GeometryCache::ShapeData& shapeData, gpu::BufferPointer& vertexBuffer, gpu::BufferPointer& indexBuffer, bool isConical = false) {
|
||||||
using namespace geometry;
|
using namespace geometry;
|
||||||
Index baseVertex = (Index)(vertexBuffer->getSize() / SHAPE_VERTEX_STRIDE);
|
|
||||||
VertexVector vertices;
|
VertexVector vertices;
|
||||||
IndexVector solidIndices, wireIndices;
|
IndexVector solidIndices, wireIndices;
|
||||||
|
|
||||||
|
@ -286,6 +299,7 @@ void extrudePolygon(GeometryCache::ShapeData& shapeData, gpu::BufferPointer& ver
|
||||||
vertices.push_back(vec3(v.x, -0.5f, v.z));
|
vertices.push_back(vec3(v.x, -0.5f, v.z));
|
||||||
vertices.push_back(vec3(0.0f, -1.0f, 0.0f));
|
vertices.push_back(vec3(0.0f, -1.0f, 0.0f));
|
||||||
}
|
}
|
||||||
|
Index baseVertex = 0;
|
||||||
for (uint32_t i = 2; i < N; i++) {
|
for (uint32_t i = 2; i < N; i++) {
|
||||||
solidIndices.push_back(baseVertex + 0);
|
solidIndices.push_back(baseVertex + 0);
|
||||||
solidIndices.push_back(baseVertex + i);
|
solidIndices.push_back(baseVertex + i);
|
||||||
|
@ -343,7 +357,6 @@ void drawCircle(GeometryCache::ShapeData& shapeData, gpu::BufferPointer& vertexB
|
||||||
// Draw a circle with radius 1/4th the size of the bounding box
|
// Draw a circle with radius 1/4th the size of the bounding box
|
||||||
using namespace geometry;
|
using namespace geometry;
|
||||||
|
|
||||||
Index baseVertex = (Index)(vertexBuffer->getSize() / SHAPE_VERTEX_STRIDE);
|
|
||||||
VertexVector vertices;
|
VertexVector vertices;
|
||||||
IndexVector solidIndices, wireIndices;
|
IndexVector solidIndices, wireIndices;
|
||||||
const int NUM_CIRCLE_VERTICES = 64;
|
const int NUM_CIRCLE_VERTICES = 64;
|
||||||
|
@ -354,6 +367,7 @@ void drawCircle(GeometryCache::ShapeData& shapeData, gpu::BufferPointer& vertexB
|
||||||
vertices.push_back(vec3(0.0f, 0.0f, 0.0f));
|
vertices.push_back(vec3(0.0f, 0.0f, 0.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Index baseVertex = 0;
|
||||||
for (uint32_t i = 2; i < NUM_CIRCLE_VERTICES; i++) {
|
for (uint32_t i = 2; i < NUM_CIRCLE_VERTICES; i++) {
|
||||||
solidIndices.push_back(baseVertex + 0);
|
solidIndices.push_back(baseVertex + 0);
|
||||||
solidIndices.push_back(baseVertex + i);
|
solidIndices.push_back(baseVertex + i);
|
||||||
|
@ -403,7 +417,6 @@ void GeometryCache::buildShapes() {
|
||||||
|
|
||||||
// Line
|
// Line
|
||||||
{
|
{
|
||||||
Index baseVertex = (Index)(_shapeVertices->getSize() / SHAPE_VERTEX_STRIDE);
|
|
||||||
ShapeData& shapeData = _shapes[Line];
|
ShapeData& shapeData = _shapes[Line];
|
||||||
shapeData.setupVertices(_shapeVertices, VertexVector {
|
shapeData.setupVertices(_shapeVertices, VertexVector {
|
||||||
vec3(-0.5f, 0.0f, 0.0f), vec3(-0.5f, 0.0f, 0.0f),
|
vec3(-0.5f, 0.0f, 0.0f), vec3(-0.5f, 0.0f, 0.0f),
|
||||||
|
@ -411,8 +424,8 @@ void GeometryCache::buildShapes() {
|
||||||
});
|
});
|
||||||
IndexVector wireIndices;
|
IndexVector wireIndices;
|
||||||
// Only two indices
|
// Only two indices
|
||||||
wireIndices.push_back(0 + baseVertex);
|
wireIndices.push_back(0);
|
||||||
wireIndices.push_back(1 + baseVertex);
|
wireIndices.push_back(1);
|
||||||
shapeData.setupIndices(_shapeIndices, IndexVector(), wireIndices);
|
shapeData.setupIndices(_shapeIndices, IndexVector(), wireIndices);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -339,14 +339,10 @@ public:
|
||||||
void useSimpleDrawPipeline(gpu::Batch& batch, bool noBlend = false);
|
void useSimpleDrawPipeline(gpu::Batch& batch, bool noBlend = false);
|
||||||
|
|
||||||
struct ShapeData {
|
struct ShapeData {
|
||||||
size_t _indexOffset{ 0 };
|
|
||||||
size_t _indexCount{ 0 };
|
|
||||||
size_t _wireIndexOffset{ 0 };
|
|
||||||
size_t _wireIndexCount{ 0 };
|
|
||||||
|
|
||||||
gpu::BufferView _positionView;
|
gpu::BufferView _positionView;
|
||||||
gpu::BufferView _normalView;
|
gpu::BufferView _normalView;
|
||||||
gpu::BufferPointer _indices;
|
gpu::BufferView _indicesView;
|
||||||
|
gpu::BufferView _wireIndicesView;
|
||||||
|
|
||||||
void setupVertices(gpu::BufferPointer& vertexBuffer, const geometry::VertexVector& vertices);
|
void setupVertices(gpu::BufferPointer& vertexBuffer, const geometry::VertexVector& vertices);
|
||||||
void setupIndices(gpu::BufferPointer& indexBuffer, const geometry::IndexVector& indices, const geometry::IndexVector& wireIndices);
|
void setupIndices(gpu::BufferPointer& indexBuffer, const geometry::IndexVector& indices, const geometry::IndexVector& wireIndices);
|
||||||
|
|
|
@ -9,7 +9,6 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "HFActionEvent.h"
|
|
||||||
#include "KeyEvent.h"
|
#include "KeyEvent.h"
|
||||||
#include "MouseEvent.h"
|
#include "MouseEvent.h"
|
||||||
#include "SpatialEvent.h"
|
#include "SpatialEvent.h"
|
||||||
|
@ -20,7 +19,6 @@
|
||||||
#include "EventTypes.h"
|
#include "EventTypes.h"
|
||||||
|
|
||||||
void registerEventTypes(QScriptEngine* engine) {
|
void registerEventTypes(QScriptEngine* engine) {
|
||||||
qScriptRegisterMetaType(engine, HFActionEvent::toScriptValue, HFActionEvent::fromScriptValue);
|
|
||||||
qScriptRegisterMetaType(engine, KeyEvent::toScriptValue, KeyEvent::fromScriptValue);
|
qScriptRegisterMetaType(engine, KeyEvent::toScriptValue, KeyEvent::fromScriptValue);
|
||||||
qScriptRegisterMetaType(engine, MouseEvent::toScriptValue, MouseEvent::fromScriptValue);
|
qScriptRegisterMetaType(engine, MouseEvent::toScriptValue, MouseEvent::fromScriptValue);
|
||||||
qScriptRegisterMetaType(engine, PointerEvent::toScriptValue, PointerEvent::fromScriptValue);
|
qScriptRegisterMetaType(engine, PointerEvent::toScriptValue, PointerEvent::fromScriptValue);
|
||||||
|
|
|
@ -1,40 +0,0 @@
|
||||||
//
|
|
||||||
// HFActionEvent.cpp
|
|
||||||
// script-engine/src
|
|
||||||
//
|
|
||||||
// Created by Stephen Birarda on 2014-10-27.
|
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "HFActionEvent.h"
|
|
||||||
|
|
||||||
HFActionEvent::HFActionEvent(QEvent::Type type, const PickRay& actionRay) :
|
|
||||||
HFMetaEvent(type),
|
|
||||||
actionRay(actionRay)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QEvent::Type HFActionEvent::startType() {
|
|
||||||
static QEvent::Type startType = HFMetaEvent::newEventType();
|
|
||||||
return startType;
|
|
||||||
}
|
|
||||||
|
|
||||||
QEvent::Type HFActionEvent::endType() {
|
|
||||||
static QEvent::Type endType = HFMetaEvent::newEventType();
|
|
||||||
return endType;
|
|
||||||
}
|
|
||||||
|
|
||||||
QScriptValue HFActionEvent::toScriptValue(QScriptEngine* engine, const HFActionEvent& event) {
|
|
||||||
QScriptValue obj = engine->newObject();
|
|
||||||
obj.setProperty("actionRay", pickRayToScriptValue(engine, event.actionRay));
|
|
||||||
return obj;
|
|
||||||
}
|
|
||||||
|
|
||||||
void HFActionEvent::fromScriptValue(const QScriptValue& object, HFActionEvent& event) {
|
|
||||||
// not yet implemented
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,38 +0,0 @@
|
||||||
//
|
|
||||||
// HFActionEvent.h
|
|
||||||
// script-engine/src
|
|
||||||
//
|
|
||||||
// Created by Stephen Birarda on 2014-10-27.
|
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef hifi_HFActionEvent_h
|
|
||||||
#define hifi_HFActionEvent_h
|
|
||||||
|
|
||||||
|
|
||||||
#include <qscriptengine.h>
|
|
||||||
|
|
||||||
#include <RegisteredMetaTypes.h>
|
|
||||||
|
|
||||||
#include "HFMetaEvent.h"
|
|
||||||
|
|
||||||
class HFActionEvent : public HFMetaEvent {
|
|
||||||
public:
|
|
||||||
HFActionEvent() {};
|
|
||||||
HFActionEvent(QEvent::Type type, const PickRay& actionRay);
|
|
||||||
|
|
||||||
static QEvent::Type startType();
|
|
||||||
static QEvent::Type endType();
|
|
||||||
|
|
||||||
static QScriptValue toScriptValue(QScriptEngine* engine, const HFActionEvent& event);
|
|
||||||
static void fromScriptValue(const QScriptValue& object, HFActionEvent& event);
|
|
||||||
|
|
||||||
PickRay actionRay;
|
|
||||||
};
|
|
||||||
|
|
||||||
Q_DECLARE_METATYPE(HFActionEvent)
|
|
||||||
|
|
||||||
#endif // hifi_HFActionEvent_h
|
|
|
@ -1,28 +0,0 @@
|
||||||
//
|
|
||||||
// HFBackEvent.cpp
|
|
||||||
// script-engine/src
|
|
||||||
//
|
|
||||||
// Created by Stephen Birarda on 2014-10-27.
|
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "HFBackEvent.h"
|
|
||||||
|
|
||||||
HFBackEvent::HFBackEvent(QEvent::Type type) :
|
|
||||||
HFMetaEvent(type)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
QEvent::Type HFBackEvent::startType() {
|
|
||||||
static QEvent::Type startType = HFMetaEvent::newEventType();
|
|
||||||
return startType;
|
|
||||||
}
|
|
||||||
|
|
||||||
QEvent::Type HFBackEvent::endType() {
|
|
||||||
static QEvent::Type endType = HFMetaEvent::newEventType();
|
|
||||||
return endType;
|
|
||||||
}
|
|
|
@ -1,29 +0,0 @@
|
||||||
//
|
|
||||||
// HFBackEvent.h
|
|
||||||
// script-engine/src
|
|
||||||
//
|
|
||||||
// Created by Stephen Birarda on 2014-10-27.
|
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef hifi_HFBackEvent_h
|
|
||||||
#define hifi_HFBackEvent_h
|
|
||||||
|
|
||||||
#include <qevent.h>
|
|
||||||
#include <qscriptengine.h>
|
|
||||||
|
|
||||||
#include "HFMetaEvent.h"
|
|
||||||
|
|
||||||
class HFBackEvent : public HFMetaEvent {
|
|
||||||
public:
|
|
||||||
HFBackEvent() {};
|
|
||||||
HFBackEvent(QEvent::Type type);
|
|
||||||
|
|
||||||
static QEvent::Type startType();
|
|
||||||
static QEvent::Type endType();
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // hifi_HFBackEvent_h
|
|
|
@ -1,20 +0,0 @@
|
||||||
//
|
|
||||||
// HFMetaEvent.cpp
|
|
||||||
// script-engine/src
|
|
||||||
//
|
|
||||||
// Created by Stephen Birarda on 2014-10-27.
|
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "HFMetaEvent.h"
|
|
||||||
|
|
||||||
QSet<QEvent::Type> HFMetaEvent::_types = QSet<QEvent::Type>();
|
|
||||||
|
|
||||||
QEvent::Type HFMetaEvent::newEventType() {
|
|
||||||
QEvent::Type newType = static_cast<QEvent::Type>(QEvent::registerEventType());
|
|
||||||
_types.insert(newType);
|
|
||||||
return newType;
|
|
||||||
}
|
|
|
@ -1,28 +0,0 @@
|
||||||
//
|
|
||||||
// HFMetaEvent.h
|
|
||||||
// script-engine/src
|
|
||||||
//
|
|
||||||
// Created by Stephen Birarda on 2014-10-27.
|
|
||||||
// Copyright 2014 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#ifndef hifi_HFMetaEvent_h
|
|
||||||
#define hifi_HFMetaEvent_h
|
|
||||||
|
|
||||||
#include <qevent.h>
|
|
||||||
|
|
||||||
class HFMetaEvent : public QEvent {
|
|
||||||
public:
|
|
||||||
HFMetaEvent() : QEvent(HFMetaEvent::newEventType()) {};
|
|
||||||
HFMetaEvent(QEvent::Type type) : QEvent(type) {};
|
|
||||||
static const QSet<QEvent::Type>& types() { return HFMetaEvent::_types; }
|
|
||||||
protected:
|
|
||||||
static QEvent::Type newEventType();
|
|
||||||
|
|
||||||
static QSet<QEvent::Type> _types;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // hifi_HFMetaEvent_h
|
|
|
@ -436,7 +436,6 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
this.distanceRotating = false;
|
this.distanceRotating = false;
|
||||||
|
|
||||||
if (controllerData.triggerValues[this.hand] > TRIGGER_ON_VALUE) {
|
if (controllerData.triggerValues[this.hand] > TRIGGER_ON_VALUE) {
|
||||||
this.updateLaserPointer(controllerData);
|
|
||||||
this.prepareDistanceRotatingData(controllerData);
|
this.prepareDistanceRotatingData(controllerData);
|
||||||
return makeRunningValues(true, [], []);
|
return makeRunningValues(true, [], []);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -248,17 +248,20 @@ Script.include("/~/system/libraries/controllers.js");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
this.nearGrabWantsToRun = function(controllerData) {
|
this.otherModuleNeedsToRun = function(controllerData) {
|
||||||
var moduleName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay";
|
var grabOverlayModuleName = this.hand === RIGHT_HAND ? "RightNearParentingGrabOverlay" : "LeftNearParentingGrabOverlay";
|
||||||
var module = getEnabledModuleByName(moduleName);
|
var grabOverlayModule = getEnabledModuleByName(grabOverlayModuleName);
|
||||||
var ready = module ? module.isReady(controllerData) : makeRunningValues(false, [], []);
|
var grabOverlayModuleReady = grabOverlayModule ? grabOverlayModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
||||||
return ready.active;
|
var farGrabModuleName = this.hand === RIGHT_HAND ? "RightFarActionGrabEntity" : "LeftFarActionGrabEntity";
|
||||||
|
var farGrabModule = getEnabledModuleByName(farGrabModuleName);
|
||||||
|
var farGrabModuleReady = farGrabModule ? farGrabModule.isReady(controllerData) : makeRunningValues(false, [], []);
|
||||||
|
return grabOverlayModuleReady.active || farGrabModuleReady.active;
|
||||||
};
|
};
|
||||||
|
|
||||||
this.processStylus = function(controllerData) {
|
this.processStylus = function(controllerData) {
|
||||||
this.updateStylusTip();
|
this.updateStylusTip();
|
||||||
|
|
||||||
if (!this.stylusTip.valid || this.overlayLaserActive(controllerData) || this.nearGrabWantsToRun(controllerData)) {
|
if (!this.stylusTip.valid || this.overlayLaserActive(controllerData) || this.otherModuleNeedsToRun(controllerData)) {
|
||||||
this.pointFinger(false);
|
this.pointFinger(false);
|
||||||
this.hideStylus();
|
this.hideStylus();
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -3877,7 +3877,6 @@ SelectionDisplay = (function() {
|
||||||
if (controllerPose.valid && lastControllerPoses[hand].valid) {
|
if (controllerPose.valid && lastControllerPoses[hand].valid) {
|
||||||
if (!Vec3.equal(controllerPose.position, lastControllerPoses[hand].position) ||
|
if (!Vec3.equal(controllerPose.position, lastControllerPoses[hand].position) ||
|
||||||
!Vec3.equal(controllerPose.rotation, lastControllerPoses[hand].rotation)) {
|
!Vec3.equal(controllerPose.rotation, lastControllerPoses[hand].rotation)) {
|
||||||
print("setting controller pose");
|
|
||||||
that.mouseMoveEvent({});
|
that.mouseMoveEvent({});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -134,22 +134,12 @@
|
||||||
tablet.pushOntoStack(MARKETPLACE_WALLET_QML_PATH);
|
tablet.pushOntoStack(MARKETPLACE_WALLET_QML_PATH);
|
||||||
}
|
}
|
||||||
|
|
||||||
function setCertificateInfo(currentEntityWithContextOverlay, itemMarketplaceId) {
|
function setCertificateInfo(currentEntityWithContextOverlay, itemCertificateId) {
|
||||||
wireEventBridge(true);
|
wireEventBridge(true);
|
||||||
tablet.sendToQml({
|
tablet.sendToQml({
|
||||||
method: 'inspectionCertificate_setMarketplaceId',
|
method: 'inspectionCertificate_setCertificateId',
|
||||||
marketplaceId: itemMarketplaceId || Entities.getEntityProperties(currentEntityWithContextOverlay, ['marketplaceID']).marketplaceID
|
certificateId: itemCertificateId || Entities.getEntityProperties(currentEntityWithContextOverlay, ['certificateID']).certificateID
|
||||||
});
|
});
|
||||||
// ZRF FIXME! Make a call to the endpoint to get item info instead of this silliness
|
|
||||||
Script.setTimeout(function () {
|
|
||||||
var randomNumber = Math.floor((Math.random() * 150) + 1);
|
|
||||||
tablet.sendToQml({
|
|
||||||
method: 'inspectionCertificate_setItemInfo',
|
|
||||||
itemName: "The Greatest Item",
|
|
||||||
itemOwner: "ABCDEFG1234567",
|
|
||||||
itemEdition: (Math.floor(Math.random() * randomNumber) + " / " + randomNumber)
|
|
||||||
});
|
|
||||||
}, 500);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function onUsernameChanged() {
|
function onUsernameChanged() {
|
||||||
|
@ -358,13 +348,13 @@
|
||||||
tablet.loadQMLSource("TabletAddressDialog.qml");
|
tablet.loadQMLSource("TabletAddressDialog.qml");
|
||||||
break;
|
break;
|
||||||
case 'purchases_itemCertificateClicked':
|
case 'purchases_itemCertificateClicked':
|
||||||
setCertificateInfo("", message.itemMarketplaceId);
|
setCertificateInfo("", message.itemCertificateId);
|
||||||
break;
|
break;
|
||||||
case 'inspectionCertificate_closeClicked':
|
case 'inspectionCertificate_closeClicked':
|
||||||
tablet.gotoHomeScreen();
|
tablet.gotoHomeScreen();
|
||||||
break;
|
break;
|
||||||
case 'inspectionCertificate_showInMarketplaceClicked':
|
case 'inspectionCertificate_showInMarketplaceClicked':
|
||||||
tablet.gotoWebScreen(MARKETPLACE_URL + '/items/' + message.itemId, MARKETPLACES_INJECT_SCRIPT_URL);
|
tablet.gotoWebScreen(message.marketplaceUrl, MARKETPLACES_INJECT_SCRIPT_URL);
|
||||||
break;
|
break;
|
||||||
case 'header_myItemsClicked':
|
case 'header_myItemsClicked':
|
||||||
referrerURL = MARKETPLACE_URL_INITIAL;
|
referrerURL = MARKETPLACE_URL_INITIAL;
|
||||||
|
|
|
@ -576,6 +576,10 @@
|
||||||
createNotification("Processing GIF snapshot...", NotificationType.SNAPSHOT);
|
createNotification("Processing GIF snapshot...", NotificationType.SNAPSHOT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function processingGif() {
|
||||||
|
createNotification("Your wallet isn't set up. Open the WALLET app.", NotificationType.WALLET);
|
||||||
|
}
|
||||||
|
|
||||||
function connectionAdded(connectionName) {
|
function connectionAdded(connectionName) {
|
||||||
createNotification(connectionName, NotificationType.CONNECTION);
|
createNotification(connectionName, NotificationType.CONNECTION);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue