diff --git a/interface/resources/qml/hifi/EditAvatarInputsBar.qml b/interface/resources/qml/hifi/EditAvatarInputsBar.qml new file mode 100644 index 0000000000..d9ba3a6fcc --- /dev/null +++ b/interface/resources/qml/hifi/EditAvatarInputsBar.qml @@ -0,0 +1,37 @@ +// +// EditAvatarInputsBar.qml +// qml/hifi +// +// Audio setup +// +// Created by Wayne Chen on 3/20/2019 +// Copyright 2019 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 +// + +import QtQuick 2.7 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.3 + +import stylesUit 1.0 +import controlsUit 1.0 as HifiControlsUit +import "../windows" + +Rectangle { + id: editRect + + HifiConstants { id: hifi; } + + color: hifi.colors.baseGray; + + signal sendToScript(var message); + function emitSendToScript(message) { + sendToScript(message); + } + + function fromScript(message) { + } + +} diff --git a/scripts/system/createAvatarInputsBarEntity.js b/scripts/system/createAvatarInputsBarEntity.js index 064bfa33e8..0b8fde4bb3 100644 --- a/scripts/system/createAvatarInputsBarEntity.js +++ b/scripts/system/createAvatarInputsBarEntity.js @@ -1,12 +1,20 @@ "use strict"; (function(){ + var AppUi = Script.require("appUi"); + + var ui; var button; var buttonName = "AVBAR"; var onCreateAvatarInputsBarEntity = false; var micBarEntity, bubbleIconEntity; var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); + var AVATAR_INPUTS_EDIT_QML_SOURCE = "hifi/EditAvatarInputsBar.qml"; + + function fromQml(message) { + console.log("message from QML: " + JSON.stringify(message)); + }; function onClicked(){ onCreateAvatarInputsBarEntity = !onCreateAvatarInputsBarEntity; @@ -24,6 +32,7 @@ if (onCreateAvatarInputsBarEntity) { var props = { type: "Web", + name: "AvatarInputsMicBarEntity", parentID: MyAvatar.SELF_ID, parentJointIndex: MyAvatar.getJointIndex("_CAMERA_MATRIX"), localPosition: micBarLocalPosition, @@ -32,6 +41,7 @@ // cutoff alpha for detecting transparency alpha: 0.98, dimensions: MIC_BAR_DIMENSIONS, + drawInFront: true, userData: { grabbable: false }, @@ -39,6 +49,7 @@ micBarEntity = Entities.addEntity(props, "local"); var props = { type: "Web", + name: "AvatarInputsBubbleIconEntity", parentID: MyAvatar.SELF_ID, parentJointIndex: MyAvatar.getJointIndex("_CAMERA_MATRIX"), localPosition: bubbleIconLocalPosition, @@ -47,11 +58,13 @@ // cutoff alpha for detecting transparency alpha: 0.98, dimensions: BUBBLE_ICON_DIMENSIONS, + drawInFront: true, userData: { grabbable: false }, }; bubbleIconEntity = Entities.addEntity(props, "local"); + tablet.loadQMLSource(AVATAR_INPUTS_EDIT_QML_SOURCE); } else { Entities.deleteEntity(micBarEntity); Entities.deleteEntity(bubbleIconEntity);