mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 04:44:11 +02:00
reply => data
This commit is contained in:
parent
bcb373618f
commit
74bfea59cc
2 changed files with 11 additions and 10 deletions
|
@ -58,7 +58,7 @@ Rectangle {
|
|||
console.debug('AvatarApp.qml: fromScript: ', JSON.stringify(message, null, '\t'))
|
||||
|
||||
if(message.method === 'initialize') {
|
||||
jointNames = message.reply.jointNames;
|
||||
jointNames = message.data.jointNames;
|
||||
emitSendToScript({'method' : getAvatarsMethod});
|
||||
} else if(message.method === 'wearableUpdated') {
|
||||
adjustWearables.refreshWearable(message.entityID, message.wearableIndex, message.properties);
|
||||
|
@ -82,7 +82,7 @@ Rectangle {
|
|||
|
||||
adjustWearables.refresh(currentAvatar);
|
||||
} else if(message.method === 'bookmarkLoaded') {
|
||||
setCurrentAvatar(message.reply.currentAvatar, message.reply.name);
|
||||
setCurrentAvatar(message.data.currentAvatar, message.data.name);
|
||||
var avatarIndex = allAvatars.findAvatarIndex(currentAvatar.name);
|
||||
allAvatars.move(avatarIndex, 0, 1);
|
||||
view.setPage(0);
|
||||
|
@ -115,10 +115,10 @@ Rectangle {
|
|||
console.debug('removed ', absoluteIndex, 'newItemIndex: ', newItemIndex, 'allAvatars.count:', allAvatars.count, 'pageOfAvatars.count:', pageOfAvatars.count)
|
||||
pageOfAvatars.isUpdating = false;
|
||||
} else if(message.method === getAvatarsMethod) {
|
||||
var getAvatarsReply = message.reply;
|
||||
allAvatars.populate(getAvatarsReply.bookmarks);
|
||||
setCurrentAvatar(getAvatarsReply.currentAvatar, '');
|
||||
displayNameInput.text = getAvatarsReply.displayName;
|
||||
var getAvatarsData = message.data;
|
||||
allAvatars.populate(getAvatarsData.bookmarks);
|
||||
setCurrentAvatar(getAvatarsData.currentAvatar, '');
|
||||
displayNameInput.text = getAvatarsData.displayName;
|
||||
|
||||
console.debug('currentAvatar: ', JSON.stringify(currentAvatar, null, '\t'));
|
||||
updateCurrentAvatarInBookmarks(currentAvatar);
|
||||
|
|
|
@ -110,12 +110,13 @@ function fromQml(message) { // messages are {method, params}, like json-rpc. See
|
|||
switch (message.method) {
|
||||
case 'getAvatars':
|
||||
currentAvatar = getMyAvatar();
|
||||
message.reply = {
|
||||
message.data = {
|
||||
'bookmarks' : AvatarBookmarks.getBookmarks(),
|
||||
'currentAvatar' : currentAvatar,
|
||||
'displayName' : MyAvatar.displayName
|
||||
};
|
||||
console.debug('avatarapp.js: currentAvatar: ', JSON.stringify(message.reply.currentAvatar, null, '\t'))
|
||||
|
||||
console.debug('avatarapp.js: currentAvatar: ', JSON.stringify(message.data.currentAvatar, null, '\t'))
|
||||
sendToQml(message)
|
||||
break;
|
||||
case 'selectAvatar':
|
||||
|
@ -284,7 +285,7 @@ function onBookmarkLoaded(bookmarkName) {
|
|||
executeLater(function() {
|
||||
currentAvatar = getMyAvatar();
|
||||
console.debug('avatarapp.js: executing onBookmarkLoaded: ', JSON.stringify(currentAvatar, 0, 4));
|
||||
sendToQml({'method' : 'bookmarkLoaded', 'reply' : {'name' : bookmarkName, 'currentAvatar' : currentAvatar} });
|
||||
sendToQml({'method' : 'bookmarkLoaded', 'data' : {'name' : bookmarkName, 'currentAvatar' : currentAvatar} });
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -393,7 +394,7 @@ function onTabletScreenChanged(type, url) {
|
|||
|
||||
var message = {
|
||||
'method' : 'initialize',
|
||||
'reply' : {
|
||||
'data' : {
|
||||
'jointNames' : MyAvatar.getJointNames()
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue