mirror of
https://github.com/overte-org/overte.git
synced 2025-06-07 09:36:52 +02:00
Merge remote-tracking branch 'upstream/master' into android
This commit is contained in:
commit
8ae0b09ea2
44 changed files with 1194 additions and 747 deletions
|
@ -123,12 +123,12 @@ void ScriptableAvatar::update(float deltatime) {
|
||||||
AnimPose& absPose = absPoses[i];
|
AnimPose& absPose = absPoses[i];
|
||||||
if (data.rotation != absPose.rot()) {
|
if (data.rotation != absPose.rot()) {
|
||||||
data.rotation = absPose.rot();
|
data.rotation = absPose.rot();
|
||||||
data.rotationSet = true;
|
data.rotationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
AnimPose& relPose = poses[i];
|
AnimPose& relPose = poses[i];
|
||||||
if (data.translation != relPose.trans()) {
|
if (data.translation != relPose.trans()) {
|
||||||
data.translation = relPose.trans();
|
data.translation = relPose.trans();
|
||||||
data.translationSet = true;
|
data.translationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
interface/resources/icons/tablet-icons/EmoteAppIcon.svg
Normal file
21
interface/resources/icons/tablet-icons/EmoteAppIcon.svg
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 22.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 100 100.8" style="enable-background:new 0 0 100 100.8;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#FFFFFF;}
|
||||||
|
</style>
|
||||||
|
<path class="st0" d="M26.7,83.9c7.3,1.2,14.8,1.8,22.1,1.8c0.4,0,0.8,0,1.2,0c7.8-0.1,15.6-0.8,23.4-2.2l0,0
|
||||||
|
c5.7-1.1,11.3-6.6,12.5-12.3C87.3,64.2,88,57,88,50s-0.7-14.2-2.1-21.2c-1.2-5.6-6.8-11.1-12.5-12.2c-7.7-1.4-15.6-2.2-23.4-2.2
|
||||||
|
c-7.7-0.1-15.6,0.5-23.4,1.8c-5.7,1-11.4,6.5-12.6,12.3c-1.4,7.2-2.1,14.4-2.1,21.6s0.7,14.4,2.1,21.7
|
||||||
|
C15.3,77.4,20.9,82.9,26.7,83.9z M20.9,29.8c0.6-2.9,4-6.3,6.9-6.8c7-1.1,14-1.7,21-1.7c0.4,0,0.8,0,1.2,0
|
||||||
|
c7.4,0.1,14.8,0.8,22.1,2.1c2.9,0.6,6.4,3.9,6.9,6.7c1.3,6.6,1.9,13.3,1.9,19.9c0,6.6-0.6,13.3-1.9,19.8c-0.6,2.8-4,6.2-6.9,6.8
|
||||||
|
c-7.3,1.3-14.8,2.1-22.1,2.1c-7.4,0.1-14.8-0.5-22.1-1.7c-2.9-0.5-6.3-3.9-6.9-6.7c-1.3-6.7-2-13.5-2-20.3
|
||||||
|
C19,43.3,19.6,36.4,20.9,29.8z"/>
|
||||||
|
<path class="st0" d="M32.3,61.4c-0.5,1.3-0.1,2.8,0.9,3.8c0.3,0.3,7.2,6.6,15.9,6.6c0.8,0,1.7-0.1,2.6-0.2
|
||||||
|
c9.8-1.5,15.5-11.1,15.8-11.5c0.7-1.2,0.6-2.8-0.2-3.9c-0.9-1.1-2.3-1.6-3.7-1.3c-9.2,2.5-18.6,3.9-28.1,4.2
|
||||||
|
C34,59.1,32.8,60,32.3,61.4z"/>
|
||||||
|
<circle class="st0" cx="36.5" cy="42.8" r="9"/>
|
||||||
|
<path class="st0" d="M61.4,44.1h6.1c1.9,0,3.3-1.5,3.3-3.3c0-1.9-1.5-3.3-3.3-3.3h-6.1c-1.9,0-3.3,1.5-3.3,3.3
|
||||||
|
C58.1,42.7,59.6,44.1,61.4,44.1z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 1.5 KiB |
|
@ -19,7 +19,6 @@ Item {
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
|
||||||
property var hideQtMethods: true
|
property var hideQtMethods: true
|
||||||
|
|
||||||
property var maxUpdateValues: 20
|
property var maxUpdateValues: 20
|
||||||
property var maxReloadValues: 200
|
property var maxReloadValues: 200
|
||||||
property var apiMembers: []
|
property var apiMembers: []
|
||||||
|
@ -30,7 +29,7 @@ Item {
|
||||||
property Component keyboard
|
property Component keyboard
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
color: "white"
|
color: hifi.colors.baseGray
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
}
|
}
|
||||||
|
@ -51,32 +50,22 @@ Item {
|
||||||
Row {
|
Row {
|
||||||
id: topBar
|
id: topBar
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.leftMargin: 8
|
anchors.leftMargin: 30
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.topMargin: 30
|
||||||
width: parent.width
|
width: parent.width
|
||||||
height: 50
|
height: 40
|
||||||
HifiControls.GlyphButton {
|
|
||||||
id: search
|
|
||||||
enabled: true
|
|
||||||
glyph: hifi.glyphs.search
|
|
||||||
color: hifi.colors.text
|
|
||||||
size: 48
|
|
||||||
width: 50
|
|
||||||
height: 50
|
|
||||||
onClicked: {
|
|
||||||
addListElements(searchBar.text);
|
|
||||||
focus = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HifiControls.GlyphButton {
|
HifiControls.GlyphButton {
|
||||||
id: back;
|
id: back;
|
||||||
enabled: true;
|
enabled: true;
|
||||||
|
color: hifi.buttons.black
|
||||||
glyph: hifi.glyphs.backward
|
glyph: hifi.glyphs.backward
|
||||||
color: hifi.colors.text
|
size: 40
|
||||||
size: 48
|
width: 40
|
||||||
width: 30
|
height: 40
|
||||||
height: 50
|
anchors.left: search.right
|
||||||
anchors.margins: 2
|
anchors.leftMargin: 12
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var text = searchBar.text;
|
var text = searchBar.text;
|
||||||
var chain = text.split(".");
|
var chain = text.split(".");
|
||||||
|
@ -99,17 +88,20 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TextField {
|
HifiControls.TextField {
|
||||||
id: searchBar
|
id: searchBar
|
||||||
focus: true
|
focus: true
|
||||||
font.pixelSize: 16
|
isSearchField: true
|
||||||
width: 2*(parent.width-back.width-search.width-reload.width-update.width-evaluate.width-addMember.width-16)/3
|
width: parent.width - 112
|
||||||
height: parent.height
|
height: 40
|
||||||
font.family: ralewayRegular.name
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
anchors.left: back.right
|
||||||
|
anchors.leftMargin: 10
|
||||||
|
font.family: firaSansSemiBold.name
|
||||||
placeholderText: "Search"
|
placeholderText: "Search"
|
||||||
onAccepted: {
|
onAccepted: {
|
||||||
console.log("Enter Pressed");
|
console.log("Enter Pressed");
|
||||||
search.clicked();
|
addListElements(searchBar.text);
|
||||||
}
|
}
|
||||||
onActiveFocusChanged: {
|
onActiveFocusChanged: {
|
||||||
if (activeFocus && HMD.mounted) {
|
if (activeFocus && HMD.mounted) {
|
||||||
|
@ -120,14 +112,26 @@ Item {
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HifiControls.Button {
|
Row {
|
||||||
|
id: topBar2
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 30
|
||||||
|
anchors.top: topBar.bottom
|
||||||
|
anchors.topMargin: 30
|
||||||
|
width: parent.width -60
|
||||||
|
height: 40
|
||||||
|
|
||||||
|
HifiControls.GlyphButton {
|
||||||
id: addMember;
|
id: addMember;
|
||||||
enabled: true;
|
enabled: true;
|
||||||
text: "+"
|
color: hifi.buttons.black
|
||||||
width: 50
|
glyph: hifi.glyphs.maximize
|
||||||
height: 50
|
width: 40
|
||||||
anchors.margins: 2
|
height: 40
|
||||||
|
anchors.top: parent.top
|
||||||
|
anchors.left: parent.left
|
||||||
onClicked: {
|
onClicked: {
|
||||||
addNewMember();
|
addNewMember();
|
||||||
updateList.start();
|
updateList.start();
|
||||||
|
@ -138,36 +142,48 @@ Item {
|
||||||
HifiControls.Button {
|
HifiControls.Button {
|
||||||
id: evaluate;
|
id: evaluate;
|
||||||
enabled: true;
|
enabled: true;
|
||||||
|
color: hifi.buttons.black
|
||||||
text: "Eval"
|
text: "Eval"
|
||||||
width: 50
|
width: 40
|
||||||
height: 50
|
height: 40
|
||||||
anchors.margins: 2
|
anchors.left: addMember.right
|
||||||
|
anchors.leftMargin: 12
|
||||||
onClicked: {
|
onClicked: {
|
||||||
evaluateMember();
|
evaluateMember();
|
||||||
focus = true;
|
focus = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
TextField {
|
|
||||||
|
HifiControls.TextField {
|
||||||
id: valueBar
|
id: valueBar
|
||||||
focus: true
|
isSearchField: false
|
||||||
font.pixelSize: 16
|
font.pixelSize: 16
|
||||||
width: (parent.width-back.width-search.width-reload.width-update.width-evaluate.width-addMember.width-16)/3
|
width: parent.width - 208
|
||||||
height: parent.height
|
height: 40
|
||||||
font.family: ralewayRegular.name
|
colorScheme: hifi.colorSchemes.dark
|
||||||
|
font.family: firaSansSemiBold.name
|
||||||
placeholderText: "Value"
|
placeholderText: "Value"
|
||||||
textColor: "#4466DD"
|
anchors.left: evaluate.right
|
||||||
anchors.margins: 2
|
anchors.leftMargin: 12
|
||||||
|
onActiveFocusChanged: {
|
||||||
|
if (activeFocus && HMD.mounted) {
|
||||||
|
keyboard.raised = true;
|
||||||
|
} else {
|
||||||
|
keyboard.raised = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.GlyphButton {
|
HifiControls.GlyphButton {
|
||||||
id: reload;
|
id: reload;
|
||||||
enabled: false;
|
enabled: false;
|
||||||
|
color: hifi.buttons.black
|
||||||
glyph: hifi.glyphs.reload
|
glyph: hifi.glyphs.reload
|
||||||
color: hifi.colors.text
|
size: 40
|
||||||
size: 48
|
width: 40
|
||||||
width: 50
|
height: 40
|
||||||
height: 50
|
anchors.right: update.left
|
||||||
anchors.margins: 2
|
anchors.rightMargin: 12
|
||||||
onClicked: {
|
onClicked: {
|
||||||
reloadListValues();
|
reloadListValues();
|
||||||
focus = true;
|
focus = true;
|
||||||
|
@ -177,11 +193,12 @@ Item {
|
||||||
HifiControls.GlyphButton {
|
HifiControls.GlyphButton {
|
||||||
id: update;
|
id: update;
|
||||||
enabled: false;
|
enabled: false;
|
||||||
|
color: hifi.buttons.black
|
||||||
glyph: hifi.glyphs.playback_play
|
glyph: hifi.glyphs.playback_play
|
||||||
size: 48
|
size: 40
|
||||||
width: 50
|
width: 40
|
||||||
height: 50
|
height: 40
|
||||||
anchors.margins: 2
|
anchors.right: parent.right
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (isReloading) {
|
if (isReloading) {
|
||||||
update.glyph = hifi.glyphs.playback_play
|
update.glyph = hifi.glyphs.playback_play
|
||||||
|
@ -197,25 +214,49 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
id: membersBackground
|
||||||
|
anchors {
|
||||||
|
left: parent.left; right: parent.right; top: topBar2.bottom; bottom: bottomBar.top;
|
||||||
|
margins: 30
|
||||||
|
}
|
||||||
|
color: hifi.colors.tableBackgroundDark
|
||||||
|
border.color: hifi.colors.lightGray
|
||||||
|
border.width: 2
|
||||||
|
radius: 5
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
id: memberModel
|
id: memberModel
|
||||||
}
|
}
|
||||||
|
|
||||||
Component {
|
Component {
|
||||||
id: memberDelegate
|
id: memberDelegate
|
||||||
|
Item {
|
||||||
|
id: item
|
||||||
|
width: parent.width
|
||||||
|
anchors.left: parent.left
|
||||||
|
height: 26
|
||||||
|
clip: true
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
width: parent.width
|
||||||
|
height: parent.height
|
||||||
|
color: index % 2 == 0 ? hifi.colors.tableRowDarkEven : hifi.colors.tableRowDarkOdd
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
||||||
Row {
|
Row {
|
||||||
id: memberRow
|
id: memberRow
|
||||||
property var isMainKey: apiType === "class";
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
spacing: 10
|
spacing: 10
|
||||||
Rectangle {
|
|
||||||
width: isMainKey ? 20 : 40;
|
|
||||||
height: parent.height
|
|
||||||
}
|
|
||||||
|
|
||||||
RalewayRegular {
|
FiraSansSemiBold {
|
||||||
|
property var isMainKey: apiType === "class";
|
||||||
text: apiMember
|
text: apiMember
|
||||||
size: !isMainKey ? 16 : 22
|
size: isMainKey ? 17 : 15
|
||||||
|
font.bold: true
|
||||||
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
color: isMainKey ? hifi.colors.faintGray : hifi.colors.lightGrayText
|
||||||
MouseArea {
|
MouseArea {
|
||||||
width: list.width
|
width: list.width
|
||||||
height: parent.height
|
height: parent.height
|
||||||
|
@ -231,36 +272,45 @@ Item {
|
||||||
} else {
|
} else {
|
||||||
isolateElement(evaluatingIdx);
|
isolateElement(evaluatingIdx);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FiraSansRegular {
|
||||||
RalewayRegular {
|
|
||||||
text: apiType
|
text: apiType
|
||||||
size: 14
|
anchors.left: apiMember.right
|
||||||
color: hifi.colors.baseGrayHighlight
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
size: 13
|
||||||
|
color: hifi.colors.lightGrayText
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewayRegular {
|
FiraSansRegular {
|
||||||
text: !apiValue ? "" : apiValue;
|
text: !apiValue ? "" : apiValue;
|
||||||
size: 16
|
anchors.left: apiType.right
|
||||||
color: "#4466DD"
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
size: 14
|
||||||
|
color: hifi.colors.primaryHighlight
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Component {
|
||||||
|
id: highlight
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: membersBackground
|
|
||||||
anchors {
|
anchors {
|
||||||
left: parent.left; right: parent.right; top: topBar.bottom; bottom: parent.bottom;
|
left: list.left
|
||||||
margins: hifi.dimensions.contentMargin.x
|
right: scrollBar.left
|
||||||
bottomMargin: hifi.dimensions.contentSpacing.y + 40
|
leftMargin: 2
|
||||||
|
rightMargin: 2
|
||||||
}
|
}
|
||||||
color: "white"
|
color: hifi.colors.primaryHighlight
|
||||||
radius: 4
|
radius: 4
|
||||||
|
z: 10
|
||||||
|
opacity: 0.5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
ListView {
|
ListView {
|
||||||
id: list
|
id: list
|
||||||
|
@ -269,23 +319,16 @@ Item {
|
||||||
left: parent.left
|
left: parent.left
|
||||||
right: scrollBar.left
|
right: scrollBar.left
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
margins: 4
|
topMargin: 2
|
||||||
|
leftMargin: 2
|
||||||
|
bottomMargin: 2
|
||||||
}
|
}
|
||||||
clip: true
|
clip: true
|
||||||
cacheBuffer: 4000
|
cacheBuffer: 4000
|
||||||
model: memberModel
|
model: memberModel
|
||||||
delegate: memberDelegate
|
delegate: memberDelegate
|
||||||
highlightMoveDuration: 0
|
highlightMoveDuration: 0
|
||||||
|
highlight: highlight
|
||||||
highlight: Rectangle {
|
|
||||||
anchors {
|
|
||||||
left: parent ? parent.left : undefined
|
|
||||||
right: parent ? parent.right : undefined
|
|
||||||
leftMargin: hifi.dimensions.borderWidth
|
|
||||||
rightMargin: hifi.dimensions.borderWidth
|
|
||||||
}
|
|
||||||
color: "#BBDDFF"
|
|
||||||
}
|
|
||||||
onMovementStarted: {
|
onMovementStarted: {
|
||||||
scrollSlider.manual = true;
|
scrollSlider.manual = true;
|
||||||
}
|
}
|
||||||
|
@ -310,12 +353,11 @@ Item {
|
||||||
top: parent.top
|
top: parent.top
|
||||||
right: parent.right
|
right: parent.right
|
||||||
bottom: parent.bottom
|
bottom: parent.bottom
|
||||||
topMargin: 4
|
margins: 2
|
||||||
bottomMargin: 4
|
|
||||||
}
|
}
|
||||||
width: scrolling ? 18 : 0
|
width: 22
|
||||||
radius: 4
|
height: parent.height - 4
|
||||||
color: hifi.colors.baseGrayShadow
|
color: hifi.colors.tableScrollBackgroundDark
|
||||||
|
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
@ -344,14 +386,12 @@ Item {
|
||||||
y = index*(scrollBar.height - scrollSlider.height)/(list.count - 1);
|
y = index*(scrollBar.height - scrollSlider.height)/(list.count - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
anchors {
|
anchors.right: parent.right
|
||||||
right: parent.right
|
anchors.margins: 2
|
||||||
rightMargin: 3
|
width: 18
|
||||||
}
|
height: ((list.height / list.contentHeight) * list.height) < 15 ? 15 : (list.height / list.contentHeight) * list.height
|
||||||
width: 12
|
radius: 5
|
||||||
height: (list.height / list.contentHeight) * list.height
|
color: hifi.colors.tableScrollHandleDark
|
||||||
radius: width / 4
|
|
||||||
color: "white"
|
|
||||||
|
|
||||||
visible: scrollBar.scrolling;
|
visible: scrollBar.scrolling;
|
||||||
|
|
||||||
|
@ -374,17 +414,24 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Row {
|
||||||
|
id: bottomBar
|
||||||
|
anchors.left: parent.left
|
||||||
|
anchors.leftMargin: 30
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
anchors.bottomMargin: 30
|
||||||
|
width: parent.width
|
||||||
|
height: 40
|
||||||
|
|
||||||
HifiControls.GlyphButton {
|
HifiControls.GlyphButton {
|
||||||
id: clipboard;
|
id: clipboard;
|
||||||
enabled: true;
|
enabled: true;
|
||||||
|
color: hifi.buttons.black
|
||||||
glyph: hifi.glyphs.scriptNew
|
glyph: hifi.glyphs.scriptNew
|
||||||
size: 38
|
size: 25
|
||||||
width: 50
|
width: 40
|
||||||
height: 50
|
height: 40
|
||||||
anchors.left: parent.left
|
anchors.left: parent.left
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.margins: 2
|
|
||||||
anchors.leftMargin: 8
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var buffer = "";
|
var buffer = "";
|
||||||
for (var i = 0; i < memberModel.count; i++) {
|
for (var i = 0; i < memberModel.count; i++) {
|
||||||
|
@ -396,30 +443,15 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControls.Button {
|
|
||||||
id: debug;
|
|
||||||
enabled: true;
|
|
||||||
text: "Debug Script"
|
|
||||||
width: 120
|
|
||||||
height: 50
|
|
||||||
anchors.right: parent.right
|
|
||||||
anchors.bottom: parent.bottom
|
|
||||||
anchors.margins: 2
|
|
||||||
anchors.rightMargin: 8
|
|
||||||
onClicked: {
|
|
||||||
sendToScript({type: "selectScript"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
HifiControls.CheckBox {
|
HifiControls.CheckBox {
|
||||||
id: hideQt
|
id: hideQt
|
||||||
|
colorScheme: hifi.checkbox.dark
|
||||||
boxSize: 25
|
boxSize: 25
|
||||||
boxRadius: 3
|
boxRadius: 3
|
||||||
checked: true
|
checked: true
|
||||||
anchors.left: clipboard.right
|
anchors.left: clipboard.right
|
||||||
anchors.leftMargin: 8
|
anchors.leftMargin: 10
|
||||||
anchors.verticalCenter: clipboard.verticalCenter
|
anchors.verticalCenter: clipboard.verticalCenter
|
||||||
anchors.margins: 2
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
hideQtMethods = checked;
|
hideQtMethods = checked;
|
||||||
addListElements();
|
addListElements();
|
||||||
|
@ -435,6 +467,23 @@ Item {
|
||||||
text: "Hide Qt Methods"
|
text: "Hide Qt Methods"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HifiControls.Button {
|
||||||
|
id: debug;
|
||||||
|
enabled: true;
|
||||||
|
color: hifi.buttons.black
|
||||||
|
text: "Debug Script"
|
||||||
|
width: 120
|
||||||
|
height: 40
|
||||||
|
anchors.right: parent.right
|
||||||
|
anchors.rightMargin: 60
|
||||||
|
anchors.bottom: parent.bottom
|
||||||
|
|
||||||
|
onClicked: {
|
||||||
|
sendToScript({type: "selectScript"});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
HifiControls.Keyboard {
|
HifiControls.Keyboard {
|
||||||
id: keyboard;
|
id: keyboard;
|
||||||
raised: false;
|
raised: false;
|
||||||
|
|
|
@ -24,10 +24,13 @@ TextField {
|
||||||
property bool isSearchField: false
|
property bool isSearchField: false
|
||||||
property string label: ""
|
property string label: ""
|
||||||
property real controlHeight: height + (textFieldLabel.visible ? textFieldLabel.height + 1 : 0)
|
property real controlHeight: height + (textFieldLabel.visible ? textFieldLabel.height + 1 : 0)
|
||||||
|
property bool hasDefocusedBorder: true;
|
||||||
property bool hasRoundedBorder: false
|
property bool hasRoundedBorder: false
|
||||||
|
property int roundedBorderRadius: 4
|
||||||
property bool error: false;
|
property bool error: false;
|
||||||
property bool hasClearButton: false;
|
property bool hasClearButton: false;
|
||||||
property string leftPlaceholderGlyph: "";
|
property string leftPermanentGlyph: "";
|
||||||
|
property string centerPlaceholderGlyph: "";
|
||||||
|
|
||||||
placeholderText: textField.placeholderText
|
placeholderText: textField.placeholderText
|
||||||
|
|
||||||
|
@ -101,12 +104,12 @@ TextField {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
border.color: textField.error ? hifi.colors.redHighlight :
|
border.color: textField.error ? hifi.colors.redHighlight :
|
||||||
(textField.activeFocus ? hifi.colors.primaryHighlight : (isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray))
|
(textField.activeFocus ? hifi.colors.primaryHighlight : (hasDefocusedBorder ? (isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray) : color))
|
||||||
border.width: textField.activeFocus || hasRoundedBorder || textField.error ? 1 : 0
|
border.width: textField.activeFocus || hasRoundedBorder || textField.error ? 1 : 0
|
||||||
radius: isSearchField ? textField.height / 2 : (hasRoundedBorder ? 4 : 0)
|
radius: isSearchField ? textField.height / 2 : (hasRoundedBorder ? roundedBorderRadius : 0)
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
text: textField.leftPlaceholderGlyph;
|
text: textField.leftPermanentGlyph;
|
||||||
color: textColor;
|
color: textColor;
|
||||||
size: hifi.fontSizes.textFieldSearchIcon;
|
size: hifi.fontSizes.textFieldSearchIcon;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
|
@ -115,6 +118,15 @@ TextField {
|
||||||
visible: text;
|
visible: text;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HiFiGlyphs {
|
||||||
|
text: textField.centerPlaceholderGlyph;
|
||||||
|
color: textColor;
|
||||||
|
size: parent.height;
|
||||||
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
|
visible: text && !textField.focus && textField.text === "";
|
||||||
|
}
|
||||||
|
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
text: hifi.glyphs.search
|
text: hifi.glyphs.search
|
||||||
color: textColor
|
color: textColor
|
||||||
|
@ -145,7 +157,7 @@ TextField {
|
||||||
placeholderTextColor: isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray
|
placeholderTextColor: isFaintGrayColorScheme ? hifi.colors.lightGrayText : hifi.colors.lightGray
|
||||||
selectedTextColor: hifi.colors.black
|
selectedTextColor: hifi.colors.black
|
||||||
selectionColor: hifi.colors.primaryHighlight
|
selectionColor: hifi.colors.primaryHighlight
|
||||||
padding.left: ((isSearchField || textField.leftPlaceholderGlyph !== "") ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
padding.left: hasRoundedBorder ? textField.height / 2 : ((isSearchField || textField.leftPermanentGlyph !== "") ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
||||||
padding.right: (hasClearButton ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
padding.right: (hasClearButton ? textField.height - 2 : 0) + hifi.dimensions.textPadding
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -389,7 +389,7 @@ Rectangle {
|
||||||
//
|
//
|
||||||
Item {
|
Item {
|
||||||
id: tabButtonsContainer;
|
id: tabButtonsContainer;
|
||||||
visible: !needsLogIn.visible && root.activeView !== "passphraseChange" && root.activeView !== "securityImageChange";
|
visible: !needsLogIn.visible && root.activeView !== "passphraseChange" && root.activeView !== "securityImageChange" && sendMoney.currentActiveView !== "sendMoneyStep";
|
||||||
property int numTabs: 5;
|
property int numTabs: 5;
|
||||||
// Size
|
// Size
|
||||||
width: root.width;
|
width: root.width;
|
||||||
|
|
|
@ -29,13 +29,13 @@ Item {
|
||||||
property string userName;
|
property string userName;
|
||||||
property string profilePicUrl;
|
property string profilePicUrl;
|
||||||
|
|
||||||
height: 65;
|
height: 75;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: mainContainer;
|
id: mainContainer;
|
||||||
// Style
|
// Style
|
||||||
color: root.isSelected ? hifi.colors.faintGray : hifi.colors.white;
|
color: root.isSelected ? hifi.colors.faintGray80 : hifi.colors.white;
|
||||||
// Size
|
// Size
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
@ -49,7 +49,7 @@ Item {
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 36;
|
anchors.leftMargin: 36;
|
||||||
height: root.height - 15;
|
height: 50;
|
||||||
width: visible ? height : 0;
|
width: visible ? height : 0;
|
||||||
clip: true;
|
clip: true;
|
||||||
Image {
|
Image {
|
||||||
|
@ -83,15 +83,15 @@ Item {
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: userName;
|
id: userName;
|
||||||
anchors.left: avatarImage.right;
|
anchors.left: avatarImage.right;
|
||||||
anchors.leftMargin: 16;
|
anchors.leftMargin: 12;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.right: chooseButton.visible ? chooseButton.left : parent.right;
|
anchors.right: chooseButton.visible ? chooseButton.left : parent.right;
|
||||||
anchors.rightMargin: chooseButton.visible ? 10 : 0;
|
anchors.rightMargin: chooseButton.visible ? 10 : 0;
|
||||||
// Text size
|
// Text size
|
||||||
size: 20;
|
size: 18;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.blueAccent;
|
||||||
text: root.userName;
|
text: root.userName;
|
||||||
elide: Text.ElideRight;
|
elide: Text.ElideRight;
|
||||||
// Alignment
|
// Alignment
|
||||||
|
@ -107,9 +107,9 @@ Item {
|
||||||
colorScheme: hifi.colorSchemes.dark;
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 24;
|
anchors.rightMargin: 28;
|
||||||
height: root.height - 20;
|
height: 35;
|
||||||
width: 110;
|
width: 100;
|
||||||
text: "CHOOSE";
|
text: "CHOOSE";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var msg = { method: 'chooseConnection', userName: root.userName, profilePicUrl: root.profilePicUrl };
|
var msg = { method: 'chooseConnection', userName: root.userName, profilePicUrl: root.profilePicUrl };
|
||||||
|
|
|
@ -29,6 +29,7 @@ Item {
|
||||||
property string displayName;
|
property string displayName;
|
||||||
property string userName;
|
property string userName;
|
||||||
property string profilePic;
|
property string profilePic;
|
||||||
|
property string textColor: hifi.colors.white;
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
visible: root.isDisplayingNearby;
|
visible: root.isDisplayingNearby;
|
||||||
|
@ -46,7 +47,7 @@ Item {
|
||||||
// Text size
|
// Text size
|
||||||
size: 18;
|
size: 18;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: root.textColor;
|
||||||
verticalAlignment: Text.AlignBottom;
|
verticalAlignment: Text.AlignBottom;
|
||||||
elide: Text.ElideRight;
|
elide: Text.ElideRight;
|
||||||
}
|
}
|
||||||
|
@ -63,7 +64,7 @@ Item {
|
||||||
// Text size
|
// Text size
|
||||||
size: 16;
|
size: 16;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: root.textColor;
|
||||||
verticalAlignment: Text.AlignTop;
|
verticalAlignment: Text.AlignTop;
|
||||||
elide: Text.ElideRight;
|
elide: Text.ElideRight;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +109,7 @@ Item {
|
||||||
// Text size
|
// Text size
|
||||||
size: 16;
|
size: 16;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: root.textColor;
|
||||||
verticalAlignment: Text.AlignVCenter;
|
verticalAlignment: Text.AlignVCenter;
|
||||||
elide: Text.ElideRight;
|
elide: Text.ElideRight;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,8 +29,9 @@ Item {
|
||||||
property int parentAppNavBarHeight;
|
property int parentAppNavBarHeight;
|
||||||
property string currentActiveView: "sendMoneyHome";
|
property string currentActiveView: "sendMoneyHome";
|
||||||
property string nextActiveView: "";
|
property string nextActiveView: "";
|
||||||
property bool isCurrentlyFullScreen: chooseRecipientConnection.visible ||
|
property bool shouldShowTopAndBottomOfWallet: chooseRecipientConnection.visible ||
|
||||||
chooseRecipientNearby.visible || sendMoneyStep.visible || paymentSuccess.visible || paymentFailure.visible;
|
chooseRecipientNearby.visible || paymentSuccess.visible || paymentFailure.visible;
|
||||||
|
property bool shouldShowTopOfWallet: sendMoneyStep.visible;
|
||||||
property bool isCurrentlySendingMoney: false;
|
property bool isCurrentlySendingMoney: false;
|
||||||
|
|
||||||
// This object is always used in a popup or full-screen Wallet section.
|
// This object is always used in a popup or full-screen Wallet section.
|
||||||
|
@ -38,9 +39,9 @@ Item {
|
||||||
// able to click on a button/mouseArea underneath the popup/section.
|
// able to click on a button/mouseArea underneath the popup/section.
|
||||||
MouseArea {
|
MouseArea {
|
||||||
x: 0;
|
x: 0;
|
||||||
y: root.isCurrentlyFullScreen ? 0 : root.parentAppTitleBarHeight;
|
y: (root.shouldShowTopAndBottomOfWallet && !root.shouldShowTopOfWallet) ? 0 : root.parentAppTitleBarHeight;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
height: root.isCurrentlyFullScreen ? parent.height : parent.height - root.parentAppTitleBarHeight - root.parentAppNavBarHeight;
|
height: (root.shouldShowTopAndBottomOfWallet || root.shouldShowTopOfWallet) ? parent.height : parent.height - root.parentAppTitleBarHeight - root.parentAppNavBarHeight;
|
||||||
propagateComposedEvents: false;
|
propagateComposedEvents: false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -105,7 +106,8 @@ Item {
|
||||||
// Send Money Home BEGIN
|
// Send Money Home BEGIN
|
||||||
Item {
|
Item {
|
||||||
id: sendMoneyHome;
|
id: sendMoneyHome;
|
||||||
visible: root.currentActiveView === "sendMoneyHome";
|
z: 996;
|
||||||
|
visible: root.currentActiveView === "sendMoneyHome" || root.currentActiveView === "chooseRecipientConnection" || root.currentActiveView === "chooseRecipientNearby";
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
anchors.topMargin: root.parentAppTitleBarHeight;
|
anchors.topMargin: root.parentAppTitleBarHeight;
|
||||||
anchors.bottomMargin: root.parentAppNavBarHeight;
|
anchors.bottomMargin: root.parentAppNavBarHeight;
|
||||||
|
@ -195,6 +197,17 @@ Item {
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
height: 440;
|
height: 440;
|
||||||
|
|
||||||
|
|
||||||
|
LinearGradient {
|
||||||
|
anchors.fill: parent;
|
||||||
|
start: Qt.point(0, 0);
|
||||||
|
end: Qt.point(0, height);
|
||||||
|
gradient: Gradient {
|
||||||
|
GradientStop { position: 0.0; color: hifi.colors.white }
|
||||||
|
GradientStop { position: 1.0; color: hifi.colors.faintGray }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: sendMoneyText;
|
id: sendMoneyText;
|
||||||
text: "Send Money To:";
|
text: "Send Money To:";
|
||||||
|
@ -223,12 +236,13 @@ Item {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
source: "../images/wallet-bg.jpg";
|
source: "./images/connection.svg";
|
||||||
height: 60;
|
height: 70;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
fillMode: Image.PreserveAspectFit;
|
fillMode: Image.PreserveAspectFit;
|
||||||
horizontalAlignment: Image.AlignHCenter;
|
horizontalAlignment: Image.AlignHCenter;
|
||||||
verticalAlignment: Image.AlignTop;
|
verticalAlignment: Image.AlignTop;
|
||||||
|
mipmap: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
|
@ -248,6 +262,7 @@ Item {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
onClicked: {
|
onClicked: {
|
||||||
root.nextActiveView = "chooseRecipientConnection";
|
root.nextActiveView = "chooseRecipientConnection";
|
||||||
|
filterBar.text = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -264,12 +279,13 @@ Item {
|
||||||
|
|
||||||
Image {
|
Image {
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
source: "../images/wallet-bg.jpg";
|
source: "./images/nearby.svg";
|
||||||
height: 60;
|
height: 70;
|
||||||
width: parent.width;
|
width: parent.width;
|
||||||
fillMode: Image.PreserveAspectFit;
|
fillMode: Image.PreserveAspectFit;
|
||||||
horizontalAlignment: Image.AlignHCenter;
|
horizontalAlignment: Image.AlignHCenter;
|
||||||
verticalAlignment: Image.AlignTop;
|
verticalAlignment: Image.AlignTop;
|
||||||
|
mipmap: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
|
@ -299,9 +315,18 @@ Item {
|
||||||
// Choose Recipient Connection BEGIN
|
// Choose Recipient Connection BEGIN
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: chooseRecipientConnection;
|
id: chooseRecipientConnection;
|
||||||
|
z: 997;
|
||||||
visible: root.currentActiveView === "chooseRecipientConnection";
|
visible: root.currentActiveView === "chooseRecipientConnection";
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
color: "#AAAAAA";
|
color: "#80000000";
|
||||||
|
|
||||||
|
// This object is always used in a popup or full-screen Wallet section.
|
||||||
|
// This MouseArea is used to prevent a user from being
|
||||||
|
// able to click on a button/mouseArea underneath the popup/section.
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent;
|
||||||
|
propagateComposedEvents: false;
|
||||||
|
}
|
||||||
|
|
||||||
ListModel {
|
ListModel {
|
||||||
id: connectionsModel;
|
id: connectionsModel;
|
||||||
|
@ -314,6 +339,8 @@ Item {
|
||||||
anchors.centerIn: parent;
|
anchors.centerIn: parent;
|
||||||
width: parent.width - 30;
|
width: parent.width - 30;
|
||||||
height: parent.height - 30;
|
height: parent.height - 30;
|
||||||
|
color: "#FFFFFF";
|
||||||
|
radius: 8;
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: chooseRecipientText_connections;
|
id: chooseRecipientText_connections;
|
||||||
|
@ -322,11 +349,11 @@ Item {
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 26;
|
anchors.topMargin: 26;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 20;
|
anchors.leftMargin: 36;
|
||||||
width: paintedWidth;
|
width: paintedWidth;
|
||||||
height: 30;
|
height: 30;
|
||||||
// Text size
|
// Text size
|
||||||
size: 22;
|
size: 18;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
}
|
}
|
||||||
|
@ -334,6 +361,7 @@ Item {
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: closeGlyphButton_connections;
|
id: closeGlyphButton_connections;
|
||||||
text: hifi.glyphs.close;
|
text: hifi.glyphs.close;
|
||||||
|
color: hifi.colors.lightGrayText;
|
||||||
size: 26;
|
size: 26;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 10;
|
anchors.topMargin: 10;
|
||||||
|
@ -363,7 +391,7 @@ Item {
|
||||||
height: 40;
|
height: 40;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 16;
|
anchors.leftMargin: 36;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 16;
|
anchors.rightMargin: 16;
|
||||||
anchors.top: chooseRecipientText_connections.bottom;
|
anchors.top: chooseRecipientText_connections.bottom;
|
||||||
|
@ -374,8 +402,10 @@ Item {
|
||||||
colorScheme: hifi.colorSchemes.faintGray;
|
colorScheme: hifi.colorSchemes.faintGray;
|
||||||
hasClearButton: true;
|
hasClearButton: true;
|
||||||
hasRoundedBorder: true;
|
hasRoundedBorder: true;
|
||||||
|
hasDefocusedBorder: false;
|
||||||
|
roundedBorderRadius: filterBar.height/2;
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
placeholderText: "filter recipients";
|
centerPlaceholderGlyph: hifi.glyphs.search;
|
||||||
|
|
||||||
onTextChanged: {
|
onTextChanged: {
|
||||||
buildFilteredConnectionsModel();
|
buildFilteredConnectionsModel();
|
||||||
|
@ -461,17 +491,28 @@ Item {
|
||||||
// Choose Recipient Nearby BEGIN
|
// Choose Recipient Nearby BEGIN
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: chooseRecipientNearby;
|
id: chooseRecipientNearby;
|
||||||
|
z: 997;
|
||||||
|
color: "#80000000";
|
||||||
|
|
||||||
property string selectedRecipient;
|
property string selectedRecipient;
|
||||||
|
|
||||||
visible: root.currentActiveView === "chooseRecipientNearby";
|
visible: root.currentActiveView === "chooseRecipientNearby";
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
color: "#AAAAAA";
|
|
||||||
|
// This object is always used in a popup or full-screen Wallet section.
|
||||||
|
// This MouseArea is used to prevent a user from being
|
||||||
|
// able to click on a button/mouseArea underneath the popup/section.
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent;
|
||||||
|
propagateComposedEvents: false;
|
||||||
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.centerIn: parent;
|
anchors.centerIn: parent;
|
||||||
width: parent.width - 30;
|
width: parent.width - 30;
|
||||||
height: parent.height - 30;
|
height: parent.height - 30;
|
||||||
|
color: "#FFFFFF";
|
||||||
|
radius: 8;
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
text: "Choose Recipient:";
|
text: "Choose Recipient:";
|
||||||
|
@ -483,7 +524,7 @@ Item {
|
||||||
width: paintedWidth;
|
width: paintedWidth;
|
||||||
height: 30;
|
height: 30;
|
||||||
// Text size
|
// Text size
|
||||||
size: 22;
|
size: 18;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
}
|
}
|
||||||
|
@ -491,6 +532,7 @@ Item {
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: closeGlyphButton_nearby;
|
id: closeGlyphButton_nearby;
|
||||||
text: hifi.glyphs.close;
|
text: hifi.glyphs.close;
|
||||||
|
color: hifi.colors.lightGrayText;
|
||||||
size: 26;
|
size: 26;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 10;
|
anchors.topMargin: 10;
|
||||||
|
@ -512,19 +554,15 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: selectionInstructionsContainer;
|
|
||||||
visible: chooseRecipientNearby.selectedRecipient === "";
|
|
||||||
anchors.fill: parent;
|
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: selectionInstructions_deselected;
|
id: selectionInstructions;
|
||||||
text: "Click/trigger on an avatar nearby to select them...";
|
text: chooseRecipientNearby.selectedRecipient === "" ? "Trigger or click on\nsomeone nearby to select them" :
|
||||||
|
"Trigger or click on\nsomeone else to select again";
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.bottom: parent.bottom;
|
anchors.top: parent.top;
|
||||||
anchors.bottomMargin: 200;
|
anchors.topMargin: 100;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 58;
|
anchors.leftMargin: 20;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: anchors.leftMargin;
|
anchors.rightMargin: anchors.leftMargin;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
|
@ -535,134 +573,116 @@ Item {
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
horizontalAlignment: Text.AlignHCenter;
|
||||||
wrapMode: Text.Wrap;
|
wrapMode: Text.Wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
anchors.top: selectionInstructions.bottom;
|
||||||
|
anchors.topMargin: 20;
|
||||||
|
anchors.bottom: selectionMadeContainer.top;
|
||||||
|
anchors.bottomMargin: 30;
|
||||||
|
source: "./images/p2p-nearby-unselected.svg";
|
||||||
|
width: parent.width;
|
||||||
|
fillMode: Image.PreserveAspectFit;
|
||||||
|
horizontalAlignment: Image.AlignHCenter;
|
||||||
|
verticalAlignment: Image.AlignVCenter;
|
||||||
|
mipmap: true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Rectangle {
|
||||||
id: selectionMadeContainer;
|
id: selectionMadeContainer;
|
||||||
visible: !selectionInstructionsContainer.visible;
|
visible: chooseRecipientNearby.selectedRecipient !== "";
|
||||||
anchors.fill: parent;
|
anchors.bottom: parent.bottom;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.right: parent.right;
|
||||||
|
height: 190;
|
||||||
|
color: "#F3F3F3";
|
||||||
|
radius: 8;
|
||||||
|
|
||||||
|
// Used to square off the top left and top right edges of this container
|
||||||
|
Rectangle {
|
||||||
|
color: "#F3F3F3";
|
||||||
|
height: selectionMadeContainer.radius;
|
||||||
|
anchors.top: selectionMadeContainer.top;
|
||||||
|
anchors.left: selectionMadeContainer.left;
|
||||||
|
anchors.right: selectionMadeContainer.right;
|
||||||
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: sendToText;
|
id: sendToText;
|
||||||
text: "Send To:";
|
text: "Send to:";
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 120;
|
anchors.topMargin: 36;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.leftMargin: 12;
|
anchors.leftMargin: 36;
|
||||||
width: paintedWidth;
|
width: paintedWidth;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Text size
|
// Text size
|
||||||
size: 20;
|
size: 18;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Image {
|
||||||
|
id: selectedImage;
|
||||||
|
anchors.top: parent.top;
|
||||||
|
anchors.topMargin: 24;
|
||||||
|
anchors.bottom: parent.bottom;
|
||||||
|
anchors.bottomMargin: 32;
|
||||||
|
anchors.left: sendToText.right;
|
||||||
|
anchors.leftMargin: 4;
|
||||||
|
source: "./images/p2p-nearby-selected.svg";
|
||||||
|
width: 50;
|
||||||
|
fillMode: Image.PreserveAspectFit;
|
||||||
|
horizontalAlignment: Image.AlignHCenter;
|
||||||
|
verticalAlignment: Image.AlignVCenter;
|
||||||
|
mipmap: true;
|
||||||
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: avatarDisplayName;
|
id: avatarDisplayName;
|
||||||
text: '"' + AvatarList.getAvatar(chooseRecipientNearby.selectedRecipient).sessionDisplayName + '"';
|
text: '"' + AvatarList.getAvatar(chooseRecipientNearby.selectedRecipient).sessionDisplayName + '"';
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: sendToText.bottom;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 60;
|
anchors.topMargin: 34;
|
||||||
anchors.left: parent.left;
|
anchors.left: selectedImage.right;
|
||||||
anchors.leftMargin: 30;
|
anchors.leftMargin: 10;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 30;
|
anchors.rightMargin: 10;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Text size
|
// Text size
|
||||||
size: 22;
|
size: 20;
|
||||||
// Style
|
// Style
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
color: hifi.colors.blueAccent;
|
||||||
color: hifi.colors.baseGray;
|
|
||||||
}
|
|
||||||
|
|
||||||
RalewaySemiBold {
|
|
||||||
id: avatarNodeID;
|
|
||||||
text: chooseRecipientNearby.selectedRecipient;
|
|
||||||
// Anchors
|
|
||||||
anchors.top: avatarDisplayName.bottom;
|
|
||||||
anchors.topMargin: 6;
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.leftMargin: 30;
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.rightMargin: 30;
|
|
||||||
height: paintedHeight;
|
|
||||||
// Text size
|
|
||||||
size: 14;
|
|
||||||
// Style
|
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
|
||||||
color: hifi.colors.lightGrayText;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: avatarUserName;
|
id: avatarUserName;
|
||||||
text: sendMoneyStep.selectedRecipientUserName;
|
text: sendMoneyStep.selectedRecipientUserName;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: avatarNodeID.bottom;
|
anchors.top: avatarDisplayName.bottom;
|
||||||
anchors.topMargin: 12;
|
anchors.topMargin: 16;
|
||||||
anchors.left: parent.left;
|
anchors.left: selectedImage.right;
|
||||||
anchors.leftMargin: 30;
|
anchors.leftMargin: 10;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 30;
|
anchors.rightMargin: 10;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Text size
|
// Text size
|
||||||
size: 22;
|
size: 18;
|
||||||
// Style
|
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
|
||||||
color: hifi.colors.baseGray;
|
|
||||||
}
|
|
||||||
|
|
||||||
RalewaySemiBold {
|
|
||||||
id: selectionInstructions_selected;
|
|
||||||
text: "Click/trigger on another avatar nearby to select them...\n\nor press 'Next' to continue.";
|
|
||||||
// Anchors
|
|
||||||
anchors.bottom: parent.bottom;
|
|
||||||
anchors.bottomMargin: 200;
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.leftMargin: 58;
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.rightMargin: anchors.leftMargin;
|
|
||||||
height: paintedHeight;
|
|
||||||
// Text size
|
|
||||||
size: 20;
|
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
horizontalAlignment: Text.AlignHCenter;
|
|
||||||
wrapMode: Text.Wrap;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// "Cancel" button
|
// "CHOOSE" button
|
||||||
HifiControlsUit.Button {
|
HifiControlsUit.Button {
|
||||||
id: cancelButton;
|
id: chooseButton;
|
||||||
color: hifi.buttons.noneBorderless;
|
|
||||||
colorScheme: hifi.colorSchemes.dark;
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.leftMargin: 60;
|
|
||||||
anchors.bottom: parent.bottom;
|
|
||||||
anchors.bottomMargin: 80;
|
|
||||||
height: 50;
|
|
||||||
width: 120;
|
|
||||||
text: "Cancel";
|
|
||||||
onClicked: {
|
|
||||||
root.nextActiveView = "sendMoneyHome";
|
|
||||||
resetSendMoneyData();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// "Next" button
|
|
||||||
HifiControlsUit.Button {
|
|
||||||
id: nextButton;
|
|
||||||
enabled: chooseRecipientNearby.selectedRecipient !== "";
|
|
||||||
color: hifi.buttons.blue;
|
color: hifi.buttons.blue;
|
||||||
colorScheme: hifi.colorSchemes.dark;
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
anchors.right: parent.right;
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
anchors.rightMargin: 60;
|
|
||||||
anchors.bottom: parent.bottom;
|
anchors.bottom: parent.bottom;
|
||||||
anchors.bottomMargin: 80;
|
anchors.bottomMargin: 20;
|
||||||
height: 50;
|
height: 40;
|
||||||
width: 120;
|
width: 110;
|
||||||
text: "Next";
|
text: "CHOOSE";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
sendMoneyStep.referrer = "nearby";
|
sendMoneyStep.referrer = "nearby";
|
||||||
sendMoneyStep.selectedRecipientNodeID = chooseRecipientNearby.selectedRecipient;
|
sendMoneyStep.selectedRecipientNodeID = chooseRecipientNearby.selectedRecipient;
|
||||||
|
@ -673,12 +693,13 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
// Choose Recipient Nearby END
|
// Choose Recipient Nearby END
|
||||||
|
|
||||||
// Send Money Screen BEGIN
|
// Send Money Screen BEGIN
|
||||||
Rectangle {
|
Item {
|
||||||
id: sendMoneyStep;
|
id: sendMoneyStep;
|
||||||
z: 997;
|
z: 996;
|
||||||
|
|
||||||
property string referrer; // either "connections" or "nearby"
|
property string referrer; // either "connections" or "nearby"
|
||||||
property string selectedRecipientNodeID;
|
property string selectedRecipientNodeID;
|
||||||
|
@ -688,16 +709,11 @@ Item {
|
||||||
|
|
||||||
visible: root.currentActiveView === "sendMoneyStep";
|
visible: root.currentActiveView === "sendMoneyStep";
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
color: "#AAAAAA";
|
anchors.topMargin: root.parentAppTitleBarHeight;
|
||||||
|
|
||||||
Rectangle {
|
|
||||||
anchors.centerIn: parent;
|
|
||||||
width: parent.width - 30;
|
|
||||||
height: parent.height - 30;
|
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: sendMoneyText_sendMoneyStep;
|
id: sendMoneyText_sendMoneyStep;
|
||||||
text: "Send Money To:";
|
text: "Send Money";
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 26;
|
anchors.topMargin: 26;
|
||||||
|
@ -708,7 +724,7 @@ Item {
|
||||||
// Text size
|
// Text size
|
||||||
size: 22;
|
size: 22;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.white;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
@ -723,7 +739,7 @@ Item {
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: sendToText_sendMoneyStep;
|
id: sendToText_sendMoneyStep;
|
||||||
text: "Send To:";
|
text: "Send to:";
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
|
@ -732,7 +748,7 @@ Item {
|
||||||
// Text size
|
// Text size
|
||||||
size: 18;
|
size: 18;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.white;
|
||||||
verticalAlignment: Text.AlignVCenter;
|
verticalAlignment: Text.AlignVCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -753,12 +769,12 @@ Item {
|
||||||
// "CHANGE" button
|
// "CHANGE" button
|
||||||
HifiControlsUit.Button {
|
HifiControlsUit.Button {
|
||||||
id: changeButton;
|
id: changeButton;
|
||||||
color: hifi.buttons.black;
|
color: hifi.buttons.none;
|
||||||
colorScheme: hifi.colorSchemes.dark;
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
height: 35;
|
height: 35;
|
||||||
width: 120;
|
width: 100;
|
||||||
text: "CHANGE";
|
text: "CHANGE";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (sendMoneyStep.referrer === "connections") {
|
if (sendMoneyStep.referrer === "connections") {
|
||||||
|
@ -792,13 +808,13 @@ Item {
|
||||||
// Text size
|
// Text size
|
||||||
size: 18;
|
size: 18;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.white;
|
||||||
verticalAlignment: Text.AlignVCenter;
|
verticalAlignment: Text.AlignVCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
HifiControlsUit.TextField {
|
HifiControlsUit.TextField {
|
||||||
id: amountTextField;
|
id: amountTextField;
|
||||||
colorScheme: hifi.colorSchemes.light;
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
inputMethodHints: Qt.ImhDigitsOnly;
|
inputMethodHints: Qt.ImhDigitsOnly;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
|
@ -806,7 +822,7 @@ Item {
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
height: 50;
|
height: 50;
|
||||||
// Style
|
// Style
|
||||||
leftPlaceholderGlyph: hifi.glyphs.hfc;
|
leftPermanentGlyph: hifi.glyphs.hfc;
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
activeFocusOnTab: true;
|
activeFocusOnTab: true;
|
||||||
|
|
||||||
|
@ -817,6 +833,58 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FiraSansSemiBold {
|
||||||
|
visible: amountTextFieldError.text === "";
|
||||||
|
text: "Balance: ";
|
||||||
|
// Anchors
|
||||||
|
anchors.top: amountTextField.bottom;
|
||||||
|
anchors.topMargin: 2;
|
||||||
|
anchors.left: amountTextField.left;
|
||||||
|
anchors.right: sendMoneyBalanceText_HFC.left;
|
||||||
|
width: paintedWidth;
|
||||||
|
height: 40;
|
||||||
|
// Text size
|
||||||
|
size: 16;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.lightGrayText;
|
||||||
|
verticalAlignment: Text.AlignTop;
|
||||||
|
horizontalAlignment: Text.AlignRight;
|
||||||
|
}
|
||||||
|
HiFiGlyphs {
|
||||||
|
id: sendMoneyBalanceText_HFC;
|
||||||
|
visible: amountTextFieldError.text === "";
|
||||||
|
text: hifi.glyphs.hfc;
|
||||||
|
// Size
|
||||||
|
size: 16;
|
||||||
|
// Anchors
|
||||||
|
anchors.top: amountTextField.bottom;
|
||||||
|
anchors.topMargin: 2;
|
||||||
|
anchors.right: sendMoneyBalanceText.left;
|
||||||
|
width: paintedWidth;
|
||||||
|
height: 40;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.lightGrayText;
|
||||||
|
verticalAlignment: Text.AlignTop;
|
||||||
|
horizontalAlignment: Text.AlignRight;
|
||||||
|
}
|
||||||
|
FiraSansSemiBold {
|
||||||
|
id: sendMoneyBalanceText;
|
||||||
|
visible: amountTextFieldError.text === "";
|
||||||
|
text: balanceText.text;
|
||||||
|
// Anchors
|
||||||
|
anchors.top: amountTextField.bottom;
|
||||||
|
anchors.topMargin: 2;
|
||||||
|
anchors.right: amountTextField.right;
|
||||||
|
width: paintedWidth;
|
||||||
|
height: 40;
|
||||||
|
// Text size
|
||||||
|
size: 16;
|
||||||
|
// Style
|
||||||
|
color: hifi.colors.lightGrayText;
|
||||||
|
verticalAlignment: Text.AlignTop;
|
||||||
|
horizontalAlignment: Text.AlignRight;
|
||||||
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: amountTextFieldError;
|
id: amountTextFieldError;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -828,7 +896,7 @@ Item {
|
||||||
// Text size
|
// Text size
|
||||||
size: 16;
|
size: 16;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.white;
|
||||||
verticalAlignment: Text.AlignTop;
|
verticalAlignment: Text.AlignTop;
|
||||||
horizontalAlignment: Text.AlignRight;
|
horizontalAlignment: Text.AlignRight;
|
||||||
}
|
}
|
||||||
|
@ -847,9 +915,9 @@ Item {
|
||||||
FontLoader { id: firaSansSemiBold; source: "../../../../../fonts/FiraSans-SemiBold.ttf"; }
|
FontLoader { id: firaSansSemiBold; source: "../../../../../fonts/FiraSans-SemiBold.ttf"; }
|
||||||
TextArea {
|
TextArea {
|
||||||
id: optionalMessage;
|
id: optionalMessage;
|
||||||
property int maximumLength: 70;
|
property int maximumLength: 72;
|
||||||
property string previousText: text;
|
property string previousText: text;
|
||||||
placeholderText: "Optional Message";
|
placeholderText: "<i>Optional Message (" + maximumLength + " character limit)</i>";
|
||||||
font.family: firaSansSemiBold.name;
|
font.family: firaSansSemiBold.name;
|
||||||
font.pixelSize: 20;
|
font.pixelSize: 20;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -857,11 +925,11 @@ Item {
|
||||||
// Style
|
// Style
|
||||||
background: Rectangle {
|
background: Rectangle {
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
color: optionalMessage.activeFocus ? hifi.colors.white : hifi.colors.textFieldLightBackground;
|
color: optionalMessage.activeFocus ? hifi.colors.black : hifi.colors.baseGrayShadow;
|
||||||
border.width: optionalMessage.activeFocus ? 1 : 0;
|
border.width: optionalMessage.activeFocus ? 1 : 0;
|
||||||
border.color: optionalMessage.activeFocus ? hifi.colors.primaryHighlight : hifi.colors.textFieldLightBackground;
|
border.color: optionalMessage.activeFocus ? hifi.colors.primaryHighlight : hifi.colors.textFieldLightBackground;
|
||||||
}
|
}
|
||||||
color: hifi.colors.black;
|
color: hifi.colors.white;
|
||||||
textFormat: TextEdit.PlainText;
|
textFormat: TextEdit.PlainText;
|
||||||
wrapMode: TextEdit.Wrap;
|
wrapMode: TextEdit.Wrap;
|
||||||
activeFocusOnPress: true;
|
activeFocusOnPress: true;
|
||||||
|
@ -880,55 +948,57 @@ Item {
|
||||||
previousText = text;
|
previousText = text;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RalewaySemiBold {
|
FiraSansSemiBold {
|
||||||
id: optionalMessageCharacterCount;
|
id: optionalMessageCharacterCount;
|
||||||
text: optionalMessage.text.length + "/" + optionalMessage.maximumLength;
|
text: optionalMessage.text.length + "/" + optionalMessage.maximumLength;
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: optionalMessage.bottom;
|
anchors.top: optionalMessage.bottom;
|
||||||
anchors.topMargin: 2;
|
anchors.topMargin: 4;
|
||||||
anchors.right: optionalMessage.right;
|
anchors.right: optionalMessage.right;
|
||||||
height: paintedHeight;
|
height: paintedHeight;
|
||||||
// Text size
|
// Text size
|
||||||
size: 16;
|
size: 16;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: optionalMessage.text.length === optionalMessage.maximumLength ? "#ea89a5" : hifi.colors.lightGrayText;
|
||||||
verticalAlignment: Text.AlignTop;
|
verticalAlignment: Text.AlignTop;
|
||||||
horizontalAlignment: Text.AlignRight;
|
horizontalAlignment: Text.AlignRight;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Item {
|
|
||||||
id: bottomBarContainer;
|
|
||||||
anchors.top: messageContainer.bottom;
|
|
||||||
anchors.topMargin: 30;
|
|
||||||
anchors.left: parent.left;
|
|
||||||
anchors.leftMargin: 20;
|
|
||||||
anchors.right: parent.right;
|
|
||||||
anchors.rightMargin: 20;
|
|
||||||
height: 80;
|
|
||||||
|
|
||||||
HifiControlsUit.CheckBox {
|
HifiControlsUit.CheckBox {
|
||||||
id: sendPubliclyCheckbox;
|
id: sendPubliclyCheckbox;
|
||||||
visible: false; // FIXME ONCE PARTICLE EFFECTS ARE IN
|
visible: false; // FIXME ONCE PARTICLE EFFECTS ARE IN
|
||||||
text: "Send Publicly"
|
text: "Send Publicly"
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.top: messageContainer.bottom;
|
||||||
|
anchors.topMargin: 16;
|
||||||
anchors.left: parent.left;
|
anchors.left: parent.left;
|
||||||
anchors.right: cancelButton_sendMoneyStep.left;
|
anchors.leftMargin: 20;
|
||||||
|
anchors.right: parent.right;
|
||||||
anchors.rightMargin: 16;
|
anchors.rightMargin: 16;
|
||||||
boxSize: 24;
|
boxSize: 24;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Item {
|
||||||
|
id: bottomBarContainer;
|
||||||
|
anchors.left: parent.left;
|
||||||
|
anchors.leftMargin: 20;
|
||||||
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 20;
|
||||||
|
anchors.bottom: parent.bottom;
|
||||||
|
anchors.bottomMargin: 20;
|
||||||
|
height: 60;
|
||||||
|
|
||||||
// "CANCEL" button
|
// "CANCEL" button
|
||||||
HifiControlsUit.Button {
|
HifiControlsUit.Button {
|
||||||
id: cancelButton_sendMoneyStep;
|
id: cancelButton_sendMoneyStep;
|
||||||
color: hifi.buttons.noneBorderless;
|
color: hifi.buttons.noneBorderlessWhite;
|
||||||
colorScheme: hifi.colorSchemes.dark;
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
anchors.right: sendButton.left;
|
anchors.left: parent.left;
|
||||||
anchors.rightMargin: 16;
|
anchors.leftMargin: 24;
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
height: 35;
|
height: 40;
|
||||||
width: 100;
|
width: 150;
|
||||||
text: "CANCEL";
|
text: "CANCEL";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
resetSendMoneyData();
|
resetSendMoneyData();
|
||||||
|
@ -942,10 +1012,11 @@ Item {
|
||||||
color: hifi.buttons.blue;
|
color: hifi.buttons.blue;
|
||||||
colorScheme: hifi.colorSchemes.dark;
|
colorScheme: hifi.colorSchemes.dark;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
|
anchors.rightMargin: 24;
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
height: 35;
|
height: 40;
|
||||||
width: 100;
|
width: 150;
|
||||||
text: "SEND";
|
text: "SUBMIT";
|
||||||
onClicked: {
|
onClicked: {
|
||||||
if (parseInt(amountTextField.text) > parseInt(balanceText.text)) {
|
if (parseInt(amountTextField.text) > parseInt(balanceText.text)) {
|
||||||
amountTextField.focus = true;
|
amountTextField.focus = true;
|
||||||
|
@ -971,7 +1042,6 @@ Item {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
// Send Money Screen END
|
// Send Money Screen END
|
||||||
|
|
||||||
// Sending Money Overlay START
|
// Sending Money Overlay START
|
||||||
|
@ -981,7 +1051,7 @@ Item {
|
||||||
|
|
||||||
visible: root.isCurrentlySendingMoney;
|
visible: root.isCurrentlySendingMoney;
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
color: Qt.rgba(0.0, 0.0, 0.0, 0.5);
|
color: Qt.rgba(0.0, 0.0, 0.0, 0.8);
|
||||||
|
|
||||||
// This object is always used in a popup or full-screen Wallet section.
|
// This object is always used in a popup or full-screen Wallet section.
|
||||||
// This MouseArea is used to prevent a user from being
|
// This MouseArea is used to prevent a user from being
|
||||||
|
@ -993,11 +1063,10 @@ Item {
|
||||||
|
|
||||||
AnimatedImage {
|
AnimatedImage {
|
||||||
id: sendingMoneyImage;
|
id: sendingMoneyImage;
|
||||||
source: "../../../../../icons/profilePicLoading.gif"
|
source: "./images/loader.gif"
|
||||||
width: 160;
|
width: 96;
|
||||||
height: width;
|
height: width;
|
||||||
anchors.top: parent.top;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
anchors.topMargin: 185;
|
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1005,11 +1074,11 @@ Item {
|
||||||
text: "Sending";
|
text: "Sending";
|
||||||
// Anchors
|
// Anchors
|
||||||
anchors.top: sendingMoneyImage.bottom;
|
anchors.top: sendingMoneyImage.bottom;
|
||||||
anchors.topMargin: 22;
|
anchors.topMargin: 4;
|
||||||
anchors.horizontalCenter: parent.horizontalCenter;
|
anchors.horizontalCenter: parent.horizontalCenter;
|
||||||
width: paintedWidth;
|
width: paintedWidth;
|
||||||
// Text size
|
// Text size
|
||||||
size: 24;
|
size: 26;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.white;
|
color: hifi.colors.white;
|
||||||
verticalAlignment: Text.AlignVCenter;
|
verticalAlignment: Text.AlignVCenter;
|
||||||
|
@ -1018,17 +1087,17 @@ Item {
|
||||||
// Sending Money Overlay END
|
// Sending Money Overlay END
|
||||||
|
|
||||||
// Payment Success BEGIN
|
// Payment Success BEGIN
|
||||||
Rectangle {
|
Item {
|
||||||
id: paymentSuccess;
|
id: paymentSuccess;
|
||||||
|
|
||||||
visible: root.currentActiveView === "paymentSuccess";
|
visible: root.currentActiveView === "paymentSuccess";
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
color: "#AAAAAA";
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.centerIn: parent;
|
anchors.centerIn: parent;
|
||||||
width: parent.width - 30;
|
width: parent.width - 30;
|
||||||
height: parent.height - 30;
|
height: parent.height - 30;
|
||||||
|
color: "#FFFFFF";
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: paymentSentText;
|
id: paymentSentText;
|
||||||
|
@ -1049,6 +1118,7 @@ Item {
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: closeGlyphButton_paymentSuccess;
|
id: closeGlyphButton_paymentSuccess;
|
||||||
text: hifi.glyphs.close;
|
text: hifi.glyphs.close;
|
||||||
|
color: hifi.colors.lightGrayText;
|
||||||
size: 26;
|
size: 26;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 10;
|
anchors.topMargin: 10;
|
||||||
|
@ -1100,6 +1170,7 @@ Item {
|
||||||
anchors.left: sendToText_paymentSuccess.right;
|
anchors.left: sendToText_paymentSuccess.right;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
|
textColor: hifi.colors.blueAccent;
|
||||||
|
|
||||||
displayName: sendMoneyStep.selectedRecipientDisplayName;
|
displayName: sendMoneyStep.selectedRecipientDisplayName;
|
||||||
userName: sendMoneyStep.selectedRecipientUserName;
|
userName: sendMoneyStep.selectedRecipientUserName;
|
||||||
|
@ -1145,10 +1216,10 @@ Item {
|
||||||
anchors.verticalCenter: parent.verticalCenter;
|
anchors.verticalCenter: parent.verticalCenter;
|
||||||
height: 50;
|
height: 50;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.blueAccent;
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
FiraSansSemiBold {
|
||||||
id: amountSentText;
|
id: amountSentText;
|
||||||
text: amountTextField.text;
|
text: amountTextField.text;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
@ -1159,7 +1230,7 @@ Item {
|
||||||
height: 50;
|
height: 50;
|
||||||
// Style
|
// Style
|
||||||
size: 22;
|
size: 22;
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.blueAccent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1177,7 +1248,7 @@ Item {
|
||||||
// Text size
|
// Text size
|
||||||
size: 22;
|
size: 22;
|
||||||
// Style
|
// Style
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.blueAccent;
|
||||||
wrapMode: Text.Wrap;
|
wrapMode: Text.Wrap;
|
||||||
verticalAlignment: Text.AlignTop;
|
verticalAlignment: Text.AlignTop;
|
||||||
}
|
}
|
||||||
|
@ -1203,17 +1274,17 @@ Item {
|
||||||
// Payment Success END
|
// Payment Success END
|
||||||
|
|
||||||
// Payment Failure BEGIN
|
// Payment Failure BEGIN
|
||||||
Rectangle {
|
Item {
|
||||||
id: paymentFailure;
|
id: paymentFailure;
|
||||||
|
|
||||||
visible: root.currentActiveView === "paymentFailure";
|
visible: root.currentActiveView === "paymentFailure";
|
||||||
anchors.fill: parent;
|
anchors.fill: parent;
|
||||||
color: "#AAAAAA";
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.centerIn: parent;
|
anchors.centerIn: parent;
|
||||||
width: parent.width - 30;
|
width: parent.width - 30;
|
||||||
height: parent.height - 30;
|
height: parent.height - 30;
|
||||||
|
color: "#FFFFFF";
|
||||||
|
|
||||||
RalewaySemiBold {
|
RalewaySemiBold {
|
||||||
id: paymentFailureText;
|
id: paymentFailureText;
|
||||||
|
@ -1234,6 +1305,7 @@ Item {
|
||||||
HiFiGlyphs {
|
HiFiGlyphs {
|
||||||
id: closeGlyphButton_paymentFailure;
|
id: closeGlyphButton_paymentFailure;
|
||||||
text: hifi.glyphs.close;
|
text: hifi.glyphs.close;
|
||||||
|
color: hifi.colors.lightGrayText;
|
||||||
size: 26;
|
size: 26;
|
||||||
anchors.top: parent.top;
|
anchors.top: parent.top;
|
||||||
anchors.topMargin: 10;
|
anchors.topMargin: 10;
|
||||||
|
@ -1303,6 +1375,7 @@ Item {
|
||||||
anchors.left: sentToText_paymentFailure.right;
|
anchors.left: sentToText_paymentFailure.right;
|
||||||
anchors.right: parent.right;
|
anchors.right: parent.right;
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
|
textColor: hifi.colors.baseGray;
|
||||||
|
|
||||||
displayName: sendMoneyStep.selectedRecipientDisplayName;
|
displayName: sendMoneyStep.selectedRecipientDisplayName;
|
||||||
userName: sendMoneyStep.selectedRecipientUserName;
|
userName: sendMoneyStep.selectedRecipientUserName;
|
||||||
|
@ -1351,7 +1424,7 @@ Item {
|
||||||
color: hifi.colors.baseGray;
|
color: hifi.colors.baseGray;
|
||||||
}
|
}
|
||||||
|
|
||||||
RalewaySemiBold {
|
FiraSansSemiBold {
|
||||||
id: amountSentText_paymentFailure;
|
id: amountSentText_paymentFailure;
|
||||||
text: amountTextField.text;
|
text: amountTextField.text;
|
||||||
// Anchors
|
// Anchors
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#1398BB;}
|
||||||
|
</style>
|
||||||
|
<path class="st0" d="M256.8,42C138.5,42,42.2,138.3,42.2,256.6s96.3,214.6,214.6,214.6c118.3,0,214.6-96.3,214.6-214.6
|
||||||
|
S375.1,42,256.8,42z M256.8,444.4C153.2,444.4,69,360.1,69,256.6C69,153,153.2,68.7,256.8,68.7c103.6,0,187.8,84.3,187.8,187.8
|
||||||
|
C444.6,360.1,360.4,444.4,256.8,444.4z"/>
|
||||||
|
<circle class="st0" cx="260.6" cy="189.4" r="60.6"/>
|
||||||
|
<path class="st0" d="M306.4,282.6h-87.6c-36.5,0-66.4,30.2-66.4,66.7v33.9c29.3,22.6,65.4,36.1,105,36.1c44.4,0,84.7-17,115.2-44.7
|
||||||
|
v-25.3C372.7,312.7,342.9,282.6,306.4,282.6z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 921 B |
Binary file not shown.
After Width: | Height: | Size: 58 KiB |
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#1398BB;}
|
||||||
|
</style>
|
||||||
|
<path class="st0" d="M144.3,155c-8.7-8.8-16.7-17.1-25.2-25.7c-22.4,25.4-36.6,53.9-43.6,86.2c-26.9,125.7,81.2,241.5,208.6,223.4
|
||||||
|
C385.9,424.4,458,329.2,443.5,228.2c-4.4-30.6-15.4-58.9-34.1-83.9c-1.6-2.2-3.3-4.3-4.7-6.6c-4.4-7.4-3.1-14.9,3-19.5
|
||||||
|
c6-4.5,14.2-3.6,19.2,3.5c8.2,11.7,16.6,23.4,22.9,36.1c41.9,84.9,25.7,181.7-41,248.7c-67,67.4-175.1,81.3-257.1,33.3
|
||||||
|
c-35.3-20.7-63.1-48.6-82.7-84.5c-41-75-31.5-172.5,23.4-237.9c2.2-2.7,4.4-5.4,7.1-8.7c-8.1-8.5-16.1-16.9-24-25.3
|
||||||
|
c-7.2-7.7-7.9-16.1-1.9-22.1c5.9-5.9,15-5.1,22.1,2.4c56.8,59.5,113.6,119,170.4,178.6c7.2,7.6,7.8,15.4,1.9,21.4
|
||||||
|
c-6.1,6.2-14.7,5.5-22-2c-10.2-10.4-20.2-21-30.3-31.5c-17.4,24.7-3.3,62,27.2,72.5c23,7.9,48.8-2,60.7-23.1
|
||||||
|
c1.2-2.1,2.3-4.3,3.7-6.3c4.5-6.6,11.7-8.6,18.3-5c6.6,3.5,8.9,10.5,5.9,18.1c-12.4,31.6-47.9,52.2-82.3,47.7
|
||||||
|
c-36.1-4.8-64.3-32.6-68.4-67.7c-2.4-20.7,2.4-39.7,14.9-57.5c-10.4-10.9-20.8-21.6-31.7-33c-9.7,10.8-16.2,22.7-20.9,35.7
|
||||||
|
c-31.3,86.4,38.9,175.1,130.1,164.3c74-8.7,122.3-80.9,103.3-154.3c-3.4-13.1-1-20.2,7.8-22.7c9.5-2.8,15.2,1.8,19.2,15.4
|
||||||
|
c20.1,67.4-16,144.8-79.8,175.3c-67.5,32.2-147.5,9.7-188.8-49c-37.8-53.8-36.1-127.7,4.7-179.1C141.2,159.4,142.5,157.4,144.3,155z
|
||||||
|
"/>
|
||||||
|
<path class="st0" d="M236.2,262.2c-4.2-13.6,3.4-28.2,16.8-32.4c13.5-4.2,28.1,3.3,32.5,16.8c4.5,13.9-3.1,28.4-17.2,32.7
|
||||||
|
C254.6,283.5,240.4,275.9,236.2,262.2z"/>
|
||||||
|
<path class="st0" d="M319.6,101.9c-3.7-11,1.8-22.3,12.7-26c11.3-3.9,22.8,1.9,26.4,13.2c3.5,11-2.3,22.2-13.2,25.8
|
||||||
|
C334.5,118.5,323.3,112.9,319.6,101.9z"/>
|
||||||
|
<path class="st0" d="M214.9,66.2c3.2,10.2-2.2,20.5-12.5,23.6c-9.8,3-20-2.3-23.3-12c-3.3-9.9,2.2-20.8,12-24
|
||||||
|
C201.1,50.5,211.8,56.2,214.9,66.2z"/>
|
||||||
|
<path class="st0" d="M230.8,164.6c-3.7-11,1.8-22.3,12.7-26c11.3-3.9,22.8,1.9,26.4,13.2c3.5,11-2.3,22.2-13.2,25.8
|
||||||
|
C245.7,181.2,234.5,175.6,230.8,164.6z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.1 KiB |
|
@ -0,0 +1,27 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 143.1 414.2" style="enable-background:new 0 0 143.1 414.2;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#B9B9B9;}
|
||||||
|
.st1{fill:#EE982D;}
|
||||||
|
.st2{fill:#FF630A;}
|
||||||
|
</style>
|
||||||
|
<path class="st0" d="M78.8,7.1c3.9,4.3,7.7,8.7,11.8,12.9c3.7,3.8,5.1,7.9,4.4,12.9c-1,7.1-1.8,14-7.1,20.1
|
||||||
|
c-4.2,4.7-1.3,12,4.6,14.5c5.6,2.3,11.1,4.6,16.7,7c8.1,3.5,12.3,9.6,13.2,17.4c0.8,6.3,0.8,12.6,1.2,18.9c0.1,2.2,0.3,4.3,0.7,6.4
|
||||||
|
c0.3,2.2,1.9,4.4-1.3,6.1c-0.6,0.3-0.6,2.2-0.3,3.3c5.4,25.1-0.3,49.7-4.9,74.3c-1.2,6.3-3.1,12-5.5,17.9
|
||||||
|
c-2.3,5.5-0.9,12.4-0.4,18.7c0.6,7.8,2,15.5,3.2,23.7c-2.5,0.5-4.5,1.4-6.3,1.2c-6.1-0.5-6.8,2.6-6.4,6.7c0.7,6.6,1.1,13.3,2.4,19.8
|
||||||
|
c0.6,3.3,3.5,6.1,4.5,9.4c5,15.6,1.1,30.9-1.3,46.5c-1.7,10.6-0.6,21.5-1.5,32.2c-0.5,6.5-1.5,13.3-4,19.4c-2.2,5.4-9,3.9-14.1,4
|
||||||
|
c-2.8,0.1-5.6-0.3-8.2-1.1c-1.2-0.3-2.6-2.2-2.5-3.3c0.1-1.9,0.7-4.1,1.9-5.7c11.5-16,9.1-33.7,8.2-51.2c-0.5-9.8-1.6-19.6-2.9-29.3
|
||||||
|
c-1.2-8.8-3.1-17.5-5-26.2c-1.2-5.5-3.4-10.9-4.4-16.5c-0.8-3.9-2.4-5.3-7.4-3.8c-0.5,8.5-3.1,17.7-0.9,25.9
|
||||||
|
c2.7,10.1,4.5,20,3.3,30.2c-1,8.8-2.9,17.5-3.9,26.2c-0.7,6.6-1.1,13,1.7,19.8c2.4,5.9,0.6,13.1,0.3,19.7c0,0.9-2.1,2.3-3.4,2.5
|
||||||
|
c-4.8,0.7-9.8,0.8-14.5,1.6c-5.1,0.9-9.9,3-15,3.6c-5.7,0.6-11.5,0.1-17.3,0.1c-2.4-4,0-6.2,3.2-8.4c6.9-4.5,13.7-9,20.5-13.6
|
||||||
|
c6.4-4.4,7.5-10.2,6.6-17.1c-2.1-17.2-6.4-34.1-5.2-51.6c0.8-11.3-0.7-22.5-4.2-33.5c-1.7-5.2-3.4-9.1-10.4-7.8
|
||||||
|
c-0.4-0.8-0.9-1.2-0.9-1.7c-0.4-17.6-1.7-35.3-0.9-52.9c0.6-12.6,3.9-25,6-37.5c0.1-0.6,0.9-1.5,0.7-1.8c-5-8,2.9-15.7,0.6-23.9
|
||||||
|
c-2.2-8-3.5-16.4-3.7-24.6c-0.2-6.9,2.3-13.8,2.8-20.7c0.8-12.2,8.8-18.8,20.6-23c7.3-2.6,9.1-5.2,8.2-11.3c-0.1-1.1-0.6-2.7-1.4-3
|
||||||
|
c-10-4.1-8.9-12.3-9.9-19.9c-0.9-7.2-2.7-14.2-3.6-21.4c-0.3-2.9,0.2-5.9,3.6-8.1c6.4-4,13.1-5.3,20.7-3.4
|
||||||
|
C73.7,8.3,76.3,7.4,78.8,7.1z M107.1,130.2c-1,0-2,0.1-3.1,0.1c0,3.1-0.2,6.1,0,9.2c0.7,9.3,5.9,19-2.4,27.7
|
||||||
|
c-0.2,0.2-0.2,0.6-0.1,0.9c1.9,7.2,3.8,14.5,5.6,21.7c0.7-0.1,1.4-0.1,2.1-0.2C108.5,169.9,107.8,150,107.1,130.2z"/>
|
||||||
|
<circle class="st1" cx="70.9" cy="109.9" r="26"/>
|
||||||
|
<circle class="st2" cx="70.9" cy="109.9" r="19"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
|
@ -0,0 +1,30 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 143.1 414.2" style="enable-background:new 0 0 143.1 414.2;" xml:space="preserve">
|
||||||
|
<style type="text/css">
|
||||||
|
.st0{fill:#B9B9B9;}
|
||||||
|
.st1{fill:#009175;}
|
||||||
|
.st2{fill:#1FC6A6;}
|
||||||
|
.st3{fill:#FFFFFF;}
|
||||||
|
</style>
|
||||||
|
<path class="st0" d="M78.8,7.1c3.9,4.3,7.7,8.7,11.8,12.9c3.7,3.8,5.1,7.9,4.4,12.9c-1,7.1-1.8,14-7.1,20.1
|
||||||
|
c-4.2,4.7-1.3,12,4.6,14.5c5.6,2.3,11.1,4.6,16.7,7c8.1,3.5,12.3,9.6,13.2,17.4c0.8,6.3,0.8,12.6,1.2,18.9c0.1,2.2,0.3,4.3,0.7,6.4
|
||||||
|
c0.3,2.2,1.9,4.4-1.3,6.1c-0.6,0.3-0.6,2.2-0.3,3.3c5.4,25.1-0.3,49.7-4.9,74.3c-1.2,6.3-3.1,12-5.5,17.9
|
||||||
|
c-2.3,5.5-0.9,12.4-0.4,18.7c0.6,7.8,2,15.5,3.2,23.7c-2.5,0.5-4.5,1.4-6.3,1.2c-6.1-0.5-6.8,2.6-6.4,6.7c0.7,6.6,1.1,13.3,2.4,19.8
|
||||||
|
c0.6,3.3,3.5,6.1,4.5,9.4c5,15.6,1.1,30.9-1.3,46.5c-1.7,10.6-0.6,21.5-1.5,32.2c-0.5,6.5-1.5,13.3-4,19.4c-2.2,5.4-9,3.9-14.1,4
|
||||||
|
c-2.8,0.1-5.6-0.3-8.2-1.1c-1.2-0.3-2.6-2.2-2.5-3.3c0.1-1.9,0.7-4.1,1.9-5.7c11.5-16,9.1-33.7,8.2-51.2c-0.5-9.8-1.6-19.6-2.9-29.3
|
||||||
|
c-1.2-8.8-3.1-17.5-5-26.2c-1.2-5.5-3.4-10.9-4.4-16.5c-0.8-3.9-2.4-5.3-7.4-3.8c-0.5,8.5-3.1,17.7-0.9,25.9
|
||||||
|
c2.7,10.1,4.5,20,3.3,30.2c-1,8.8-2.9,17.5-3.9,26.2c-0.7,6.6-1.1,13,1.7,19.8c2.4,5.9,0.6,13.1,0.3,19.7c0,0.9-2.1,2.3-3.4,2.5
|
||||||
|
c-4.8,0.7-9.8,0.8-14.5,1.6c-5.1,0.9-9.9,3-15,3.6c-5.7,0.6-11.5,0.1-17.3,0.1c-2.4-4,0-6.2,3.2-8.4c6.9-4.5,13.7-9,20.5-13.6
|
||||||
|
c6.4-4.4,7.5-10.2,6.6-17.1c-2.1-17.2-6.4-34.1-5.2-51.6c0.8-11.3-0.7-22.5-4.2-33.5c-1.7-5.2-3.4-9.1-10.4-7.8
|
||||||
|
c-0.4-0.8-0.9-1.2-0.9-1.7c-0.4-17.6-1.7-35.3-0.9-52.9c0.6-12.6,3.9-25,6-37.5c0.1-0.6,0.9-1.5,0.7-1.8c-5-8,2.9-15.7,0.6-23.9
|
||||||
|
c-2.2-8-3.5-16.4-3.7-24.6c-0.2-6.9,2.3-13.8,2.8-20.7c0.8-12.2,8.8-18.8,20.6-23c7.3-2.6,9.1-5.2,8.2-11.3c-0.1-1.1-0.6-2.7-1.4-3
|
||||||
|
c-10-4.1-8.9-12.3-9.9-19.9c-0.9-7.2-2.7-14.2-3.6-21.4c-0.3-2.9,0.2-5.9,3.6-8.1c6.4-4,13.1-5.3,20.7-3.4
|
||||||
|
C73.7,8.3,76.3,7.4,78.8,7.1z M107.1,130.2c-1,0-2,0.1-3.1,0.1c0,3.1-0.2,6.1,0,9.2c0.7,9.3,5.9,19-2.4,27.7
|
||||||
|
c-0.2,0.2-0.2,0.6-0.1,0.9c1.9,7.2,3.8,14.5,5.6,21.7c0.7-0.1,1.4-0.1,2.1-0.2C108.5,169.9,107.8,150,107.1,130.2z"/>
|
||||||
|
<circle class="st1" cx="70.9" cy="109.9" r="26"/>
|
||||||
|
<circle class="st2" cx="70.9" cy="109.9" r="23"/>
|
||||||
|
<path class="st3" d="M70.9,127.8c-9.9,0-17.9-8-17.9-17.9s8-17.9,17.9-17.9s17.9,8,17.9,17.9S80.7,127.8,70.9,127.8z M70.9,94.8
|
||||||
|
c-8.3,0-15.1,6.8-15.1,15.1s6.8,15.1,15.1,15.1S86,118.3,86,109.9S79.2,94.8,70.9,94.8z"/>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 2.5 KiB |
|
@ -521,9 +521,15 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if (message->message == WM_DEVICECHANGE) {
|
if (message->message == WM_DEVICECHANGE) {
|
||||||
|
const float MIN_DELTA_SECONDS = 2.0f; // de-bounce signal
|
||||||
|
static float lastTriggerTime = 0.0f;
|
||||||
|
const float deltaSeconds = secTimestampNow() - lastTriggerTime;
|
||||||
|
lastTriggerTime = secTimestampNow();
|
||||||
|
if (deltaSeconds > MIN_DELTA_SECONDS) {
|
||||||
Midi::USBchanged(); // re-scan the MIDI bus
|
Midi::USBchanged(); // re-scan the MIDI bus
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -2019,8 +2019,7 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
||||||
_smoothOrientationTimer = 0.0f;
|
_smoothOrientationTimer = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
getHead()->setBasePitch(getHead()->getBasePitch() + getDriveKey(PITCH) * _pitchSpeed * deltaTime);
|
Head* head = getHead();
|
||||||
|
|
||||||
auto headPose = getControllerPoseInAvatarFrame(controller::Action::HEAD);
|
auto headPose = getControllerPoseInAvatarFrame(controller::Action::HEAD);
|
||||||
if (headPose.isValid()) {
|
if (headPose.isValid()) {
|
||||||
glm::quat localOrientation = headPose.rotation * Quaternions::Y_180;
|
glm::quat localOrientation = headPose.rotation * Quaternions::Y_180;
|
||||||
|
@ -2032,6 +2031,10 @@ void MyAvatar::updateOrientation(float deltaTime) {
|
||||||
head->setBaseYaw(YAW(euler));
|
head->setBaseYaw(YAW(euler));
|
||||||
head->setBasePitch(PITCH(euler));
|
head->setBasePitch(PITCH(euler));
|
||||||
head->setBaseRoll(ROLL(euler));
|
head->setBaseRoll(ROLL(euler));
|
||||||
|
} else {
|
||||||
|
head->setBaseYaw(0.0f);
|
||||||
|
head->setBasePitch(getHead()->getBasePitch() + getDriveKey(PITCH) * _pitchSpeed * deltaTime);
|
||||||
|
head->setBaseRoll(0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -564,9 +564,9 @@ void ModelOverlay::animate() {
|
||||||
rotationMat * fbxJoints[index].postTransform);
|
rotationMat * fbxJoints[index].postTransform);
|
||||||
auto& jointData = jointsData[j];
|
auto& jointData = jointsData[j];
|
||||||
jointData.translation = extractTranslation(finalMat);
|
jointData.translation = extractTranslation(finalMat);
|
||||||
jointData.translationSet = true;
|
jointData.translationIsDefaultPose = false;
|
||||||
jointData.rotation = glmExtractRotation(finalMat);
|
jointData.rotation = glmExtractRotation(finalMat);
|
||||||
jointData.rotationSet = true;
|
jointData.rotationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Set the data in the model
|
// Set the data in the model
|
||||||
|
|
|
@ -1705,16 +1705,16 @@ void Rig::copyJointsIntoJointData(QVector<JointData>& jointDataVec) const {
|
||||||
// rotations are in absolute rig frame.
|
// rotations are in absolute rig frame.
|
||||||
glm::quat defaultAbsRot = geometryToRigPose.rot() * _animSkeleton->getAbsoluteDefaultPose(i).rot();
|
glm::quat defaultAbsRot = geometryToRigPose.rot() * _animSkeleton->getAbsoluteDefaultPose(i).rot();
|
||||||
data.rotation = _internalPoseSet._absolutePoses[i].rot();
|
data.rotation = _internalPoseSet._absolutePoses[i].rot();
|
||||||
data.rotationSet = !isEqual(data.rotation, defaultAbsRot);
|
data.rotationIsDefaultPose = isEqual(data.rotation, defaultAbsRot);
|
||||||
|
|
||||||
// translations are in relative frame but scaled so that they are in meters,
|
// translations are in relative frame but scaled so that they are in meters,
|
||||||
// instead of geometry units.
|
// instead of geometry units.
|
||||||
glm::vec3 defaultRelTrans = _geometryOffset.scale() * _animSkeleton->getRelativeDefaultPose(i).trans();
|
glm::vec3 defaultRelTrans = _geometryOffset.scale() * _animSkeleton->getRelativeDefaultPose(i).trans();
|
||||||
data.translation = _geometryOffset.scale() * _internalPoseSet._relativePoses[i].trans();
|
data.translation = _geometryOffset.scale() * _internalPoseSet._relativePoses[i].trans();
|
||||||
data.translationSet = !isEqual(data.translation, defaultRelTrans);
|
data.translationIsDefaultPose = isEqual(data.translation, defaultRelTrans);
|
||||||
} else {
|
} else {
|
||||||
data.translationSet = false;
|
data.translationIsDefaultPose = true;
|
||||||
data.rotationSet = false;
|
data.rotationIsDefaultPose = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1739,11 +1739,11 @@ void Rig::copyJointsFromJointData(const QVector<JointData>& jointDataVec) {
|
||||||
const glm::quat rigToGeometryRot(glmExtractRotation(_rigToGeometryTransform));
|
const glm::quat rigToGeometryRot(glmExtractRotation(_rigToGeometryTransform));
|
||||||
for (int i = 0; i < numJoints; i++) {
|
for (int i = 0; i < numJoints; i++) {
|
||||||
const JointData& data = jointDataVec.at(i);
|
const JointData& data = jointDataVec.at(i);
|
||||||
if (data.rotationSet) {
|
if (data.rotationIsDefaultPose) {
|
||||||
|
rotations.push_back(absoluteDefaultPoses[i].rot());
|
||||||
|
} else {
|
||||||
// JointData rotations are in absolute rig-frame so we rotate them to absolute geometry-frame
|
// JointData rotations are in absolute rig-frame so we rotate them to absolute geometry-frame
|
||||||
rotations.push_back(rigToGeometryRot * data.rotation);
|
rotations.push_back(rigToGeometryRot * data.rotation);
|
||||||
} else {
|
|
||||||
rotations.push_back(absoluteDefaultPoses[i].rot());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1759,11 +1759,11 @@ void Rig::copyJointsFromJointData(const QVector<JointData>& jointDataVec) {
|
||||||
const JointData& data = jointDataVec.at(i);
|
const JointData& data = jointDataVec.at(i);
|
||||||
_internalPoseSet._relativePoses[i].scale() = Vectors::ONE;
|
_internalPoseSet._relativePoses[i].scale() = Vectors::ONE;
|
||||||
_internalPoseSet._relativePoses[i].rot() = rotations[i];
|
_internalPoseSet._relativePoses[i].rot() = rotations[i];
|
||||||
if (data.translationSet) {
|
if (data.translationIsDefaultPose) {
|
||||||
|
_internalPoseSet._relativePoses[i].trans() = relativeDefaultPoses[i].trans();
|
||||||
|
} else {
|
||||||
// JointData translations are in scaled relative-frame so we scale back to regular relative-frame
|
// JointData translations are in scaled relative-frame so we scale back to regular relative-frame
|
||||||
_internalPoseSet._relativePoses[i].trans() = _invGeometryOffset.scale() * data.translation;
|
_internalPoseSet._relativePoses[i].trans() = _invGeometryOffset.scale() * data.translation;
|
||||||
} else {
|
|
||||||
_internalPoseSet._relativePoses[i].trans() = relativeDefaultPoses[i].trans();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
#include <AudioHelpers.h>
|
#include <AudioHelpers.h>
|
||||||
#include <Profile.h>
|
#include <Profile.h>
|
||||||
#include <VariantMapToScriptValue.h>
|
#include <VariantMapToScriptValue.h>
|
||||||
|
#include <BitVectorHelpers.h>
|
||||||
|
|
||||||
#include "AvatarLogging.h"
|
#include "AvatarLogging.h"
|
||||||
|
|
||||||
|
@ -77,6 +78,16 @@ size_t AvatarDataPacket::maxJointDataSize(size_t numJoints) {
|
||||||
return totalSize;
|
return totalSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
size_t AvatarDataPacket::maxJointDefaultPoseFlagsSize(size_t numJoints) {
|
||||||
|
const size_t bitVectorSize = calcBitVectorSize((int)numJoints);
|
||||||
|
size_t totalSize = sizeof(uint8_t); // numJoints
|
||||||
|
|
||||||
|
// one set of bits for rotation and one for translation
|
||||||
|
const size_t NUM_BIT_VECTORS_IN_DEFAULT_POSE_FLAGS_SECTION = 2;
|
||||||
|
totalSize += NUM_BIT_VECTORS_IN_DEFAULT_POSE_FLAGS_SECTION * bitVectorSize;
|
||||||
|
|
||||||
|
return totalSize;
|
||||||
|
}
|
||||||
|
|
||||||
AvatarData::AvatarData() :
|
AvatarData::AvatarData() :
|
||||||
SpatiallyNestable(NestableType::Avatar, QUuid()),
|
SpatiallyNestable(NestableType::Avatar, QUuid()),
|
||||||
|
@ -272,6 +283,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
|
|
||||||
bool hasFaceTrackerInfo = false;
|
bool hasFaceTrackerInfo = false;
|
||||||
bool hasJointData = false;
|
bool hasJointData = false;
|
||||||
|
bool hasJointDefaultPoseFlags = false;
|
||||||
|
|
||||||
if (sendPALMinimum) {
|
if (sendPALMinimum) {
|
||||||
hasAudioLoudness = true;
|
hasAudioLoudness = true;
|
||||||
|
@ -290,6 +302,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
|
|
||||||
hasFaceTrackerInfo = !dropFaceTracking && hasFaceTracker() && (sendAll || faceTrackerInfoChangedSince(lastSentTime));
|
hasFaceTrackerInfo = !dropFaceTracking && hasFaceTracker() && (sendAll || faceTrackerInfoChangedSince(lastSentTime));
|
||||||
hasJointData = sendAll || !sendMinimum;
|
hasJointData = sendAll || !sendMinimum;
|
||||||
|
hasJointDefaultPoseFlags = hasJointData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -314,7 +327,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
| (hasParentInfo ? AvatarDataPacket::PACKET_HAS_PARENT_INFO : 0)
|
| (hasParentInfo ? AvatarDataPacket::PACKET_HAS_PARENT_INFO : 0)
|
||||||
| (hasAvatarLocalPosition ? AvatarDataPacket::PACKET_HAS_AVATAR_LOCAL_POSITION : 0)
|
| (hasAvatarLocalPosition ? AvatarDataPacket::PACKET_HAS_AVATAR_LOCAL_POSITION : 0)
|
||||||
| (hasFaceTrackerInfo ? AvatarDataPacket::PACKET_HAS_FACE_TRACKER_INFO : 0)
|
| (hasFaceTrackerInfo ? AvatarDataPacket::PACKET_HAS_FACE_TRACKER_INFO : 0)
|
||||||
| (hasJointData ? AvatarDataPacket::PACKET_HAS_JOINT_DATA : 0);
|
| (hasJointData ? AvatarDataPacket::PACKET_HAS_JOINT_DATA : 0)
|
||||||
|
| (hasJointDefaultPoseFlags ? AvatarDataPacket::PACKET_HAS_JOINT_DEFAULT_POSE_FLAGS : 0);
|
||||||
|
|
||||||
memcpy(destinationBuffer, &packetStateFlags, sizeof(packetStateFlags));
|
memcpy(destinationBuffer, &packetStateFlags, sizeof(packetStateFlags));
|
||||||
destinationBuffer += sizeof(packetStateFlags);
|
destinationBuffer += sizeof(packetStateFlags);
|
||||||
|
@ -541,14 +555,19 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
|
|
||||||
for (int i = 0; i < _jointData.size(); i++) {
|
for (int i = 0; i < _jointData.size(); i++) {
|
||||||
const JointData& data = _jointData[i];
|
const JointData& data = _jointData[i];
|
||||||
|
const JointData& last = lastSentJointData[i];
|
||||||
|
|
||||||
|
if (!data.rotationIsDefaultPose) {
|
||||||
|
if (sendAll || last.rotationIsDefaultPose || last.rotation != data.rotation) {
|
||||||
|
|
||||||
|
bool largeEnoughRotation = true;
|
||||||
|
if (cullSmallChanges) {
|
||||||
// The dot product for smaller rotations is a smaller number.
|
// The dot product for smaller rotations is a smaller number.
|
||||||
// So if the dot() is less than the value, then the rotation is a larger angle of rotation
|
// So if the dot() is less than the value, then the rotation is a larger angle of rotation
|
||||||
bool largeEnoughRotation = fabsf(glm::dot(data.rotation, lastSentJointData[i].rotation)) < minRotationDOT;
|
largeEnoughRotation = fabsf(glm::dot(last.rotation, data.rotation)) < minRotationDOT;
|
||||||
|
}
|
||||||
|
|
||||||
if (sendAll || lastSentJointData[i].rotation != data.rotation) {
|
|
||||||
if (sendAll || !cullSmallChanges || largeEnoughRotation) {
|
if (sendAll || !cullSmallChanges || largeEnoughRotation) {
|
||||||
if (data.rotationSet) {
|
|
||||||
validity |= (1 << validityBit);
|
validity |= (1 << validityBit);
|
||||||
#ifdef WANT_DEBUG
|
#ifdef WANT_DEBUG
|
||||||
rotationSentCount++;
|
rotationSentCount++;
|
||||||
|
@ -557,8 +576,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
|
|
||||||
if (sentJointDataOut) {
|
if (sentJointDataOut) {
|
||||||
localSentJointDataOut[i].rotation = data.rotation;
|
localSentJointDataOut[i].rotation = data.rotation;
|
||||||
|
localSentJointDataOut[i].rotationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -588,11 +607,10 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
float maxTranslationDimension = 0.0;
|
float maxTranslationDimension = 0.0;
|
||||||
for (int i = 0; i < _jointData.size(); i++) {
|
for (int i = 0; i < _jointData.size(); i++) {
|
||||||
const JointData& data = _jointData[i];
|
const JointData& data = _jointData[i];
|
||||||
|
|
||||||
|
if (!data.translationIsDefaultPose) {
|
||||||
if (sendAll || lastSentJointData[i].translation != data.translation) {
|
if (sendAll || lastSentJointData[i].translation != data.translation) {
|
||||||
if (sendAll ||
|
if (sendAll || !cullSmallChanges || glm::distance(data.translation, lastSentJointData[i].translation) > minTranslation) {
|
||||||
!cullSmallChanges ||
|
|
||||||
glm::distance(data.translation, lastSentJointData[i].translation) > minTranslation) {
|
|
||||||
if (data.translationSet) {
|
|
||||||
validity |= (1 << validityBit);
|
validity |= (1 << validityBit);
|
||||||
#ifdef WANT_DEBUG
|
#ifdef WANT_DEBUG
|
||||||
translationSentCount++;
|
translationSentCount++;
|
||||||
|
@ -606,8 +624,8 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
|
|
||||||
if (sentJointDataOut) {
|
if (sentJointDataOut) {
|
||||||
localSentJointDataOut[i].translation = data.translation;
|
localSentJointDataOut[i].translation = data.translation;
|
||||||
|
localSentJointDataOut[i].translationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -655,6 +673,30 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasJointDefaultPoseFlags) {
|
||||||
|
auto startSection = destinationBuffer;
|
||||||
|
QReadLocker readLock(&_jointDataLock);
|
||||||
|
|
||||||
|
// write numJoints
|
||||||
|
int numJoints = _jointData.size();
|
||||||
|
*destinationBuffer++ = (uint8_t)numJoints;
|
||||||
|
|
||||||
|
// write rotationIsDefaultPose bits
|
||||||
|
destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) {
|
||||||
|
return _jointData[i].rotationIsDefaultPose;
|
||||||
|
});
|
||||||
|
|
||||||
|
// write translationIsDefaultPose bits
|
||||||
|
destinationBuffer += writeBitVector(destinationBuffer, numJoints, [&](int i) {
|
||||||
|
return _jointData[i].translationIsDefaultPose;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (outboundDataRateOut) {
|
||||||
|
size_t numBytes = destinationBuffer - startSection;
|
||||||
|
outboundDataRateOut->jointDefaultPoseFlagsRate.increment(numBytes);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int avatarDataSize = destinationBuffer - startPosition;
|
int avatarDataSize = destinationBuffer - startPosition;
|
||||||
|
|
||||||
if (avatarDataSize > (int)byteArraySize) {
|
if (avatarDataSize > (int)byteArraySize) {
|
||||||
|
@ -664,6 +706,7 @@ QByteArray AvatarData::toByteArray(AvatarDataDetail dataDetail, quint64 lastSent
|
||||||
|
|
||||||
return avatarDataByteArray.left(avatarDataSize);
|
return avatarDataByteArray.left(avatarDataSize);
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: This is never used in a "distanceAdjust" mode, so it's ok that it doesn't use a variable minimum rotation/translation
|
// NOTE: This is never used in a "distanceAdjust" mode, so it's ok that it doesn't use a variable minimum rotation/translation
|
||||||
void AvatarData::doneEncoding(bool cullSmallChanges) {
|
void AvatarData::doneEncoding(bool cullSmallChanges) {
|
||||||
// The server has finished sending this version of the joint-data to other nodes. Update _lastSentJointData.
|
// The server has finished sending this version of the joint-data to other nodes. Update _lastSentJointData.
|
||||||
|
@ -674,7 +717,7 @@ void AvatarData::doneEncoding(bool cullSmallChanges) {
|
||||||
if (_lastSentJointData[i].rotation != data.rotation) {
|
if (_lastSentJointData[i].rotation != data.rotation) {
|
||||||
if (!cullSmallChanges ||
|
if (!cullSmallChanges ||
|
||||||
fabsf(glm::dot(data.rotation, _lastSentJointData[i].rotation)) <= AVATAR_MIN_ROTATION_DOT) {
|
fabsf(glm::dot(data.rotation, _lastSentJointData[i].rotation)) <= AVATAR_MIN_ROTATION_DOT) {
|
||||||
if (data.rotationSet) {
|
if (!data.rotationIsDefaultPose) {
|
||||||
_lastSentJointData[i].rotation = data.rotation;
|
_lastSentJointData[i].rotation = data.rotation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -682,7 +725,7 @@ void AvatarData::doneEncoding(bool cullSmallChanges) {
|
||||||
if (_lastSentJointData[i].translation != data.translation) {
|
if (_lastSentJointData[i].translation != data.translation) {
|
||||||
if (!cullSmallChanges ||
|
if (!cullSmallChanges ||
|
||||||
glm::distance(data.translation, _lastSentJointData[i].translation) > AVATAR_MIN_TRANSLATION) {
|
glm::distance(data.translation, _lastSentJointData[i].translation) > AVATAR_MIN_TRANSLATION) {
|
||||||
if (data.translationSet) {
|
if (!data.translationIsDefaultPose) {
|
||||||
_lastSentJointData[i].translation = data.translation;
|
_lastSentJointData[i].translation = data.translation;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -730,6 +773,7 @@ const unsigned char* unpackFauxJoint(const unsigned char* sourceBuffer, ThreadSa
|
||||||
|
|
||||||
// read data in packet starting at byte offset and return number of bytes parsed
|
// read data in packet starting at byte offset and return number of bytes parsed
|
||||||
int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
|
|
||||||
// lazily allocate memory for HeadData in case we're not an Avatar instance
|
// lazily allocate memory for HeadData in case we're not an Avatar instance
|
||||||
lazyInitHeadData();
|
lazyInitHeadData();
|
||||||
|
|
||||||
|
@ -757,6 +801,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
bool hasAvatarLocalPosition = HAS_FLAG(packetStateFlags, AvatarDataPacket::PACKET_HAS_AVATAR_LOCAL_POSITION);
|
bool hasAvatarLocalPosition = HAS_FLAG(packetStateFlags, AvatarDataPacket::PACKET_HAS_AVATAR_LOCAL_POSITION);
|
||||||
bool hasFaceTrackerInfo = HAS_FLAG(packetStateFlags, AvatarDataPacket::PACKET_HAS_FACE_TRACKER_INFO);
|
bool hasFaceTrackerInfo = HAS_FLAG(packetStateFlags, AvatarDataPacket::PACKET_HAS_FACE_TRACKER_INFO);
|
||||||
bool hasJointData = HAS_FLAG(packetStateFlags, AvatarDataPacket::PACKET_HAS_JOINT_DATA);
|
bool hasJointData = HAS_FLAG(packetStateFlags, AvatarDataPacket::PACKET_HAS_JOINT_DATA);
|
||||||
|
bool hasJointDefaultPoseFlags = HAS_FLAG(packetStateFlags, AvatarDataPacket::PACKET_HAS_JOINT_DEFAULT_POSE_FLAGS);
|
||||||
|
|
||||||
quint64 now = usecTimestampNow();
|
quint64 now = usecTimestampNow();
|
||||||
|
|
||||||
|
@ -1055,7 +1100,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
if (validRotations[i]) {
|
if (validRotations[i]) {
|
||||||
sourceBuffer += unpackOrientationQuatFromSixBytes(sourceBuffer, data.rotation);
|
sourceBuffer += unpackOrientationQuatFromSixBytes(sourceBuffer, data.rotation);
|
||||||
_hasNewJointData = true;
|
_hasNewJointData = true;
|
||||||
data.rotationSet = true;
|
data.rotationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1090,7 +1135,7 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
if (validTranslations[i]) {
|
if (validTranslations[i]) {
|
||||||
sourceBuffer += unpackFloatVec3FromSignedTwoByteFixed(sourceBuffer, data.translation, TRANSLATION_COMPRESSION_RADIX);
|
sourceBuffer += unpackFloatVec3FromSignedTwoByteFixed(sourceBuffer, data.translation, TRANSLATION_COMPRESSION_RADIX);
|
||||||
_hasNewJointData = true;
|
_hasNewJointData = true;
|
||||||
data.translationSet = true;
|
data.translationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1110,6 +1155,32 @@ int AvatarData::parseDataFromBuffer(const QByteArray& buffer) {
|
||||||
_jointDataUpdateRate.increment();
|
_jointDataUpdateRate.increment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasJointDefaultPoseFlags) {
|
||||||
|
auto startSection = sourceBuffer;
|
||||||
|
|
||||||
|
QWriteLocker writeLock(&_jointDataLock);
|
||||||
|
|
||||||
|
PACKET_READ_CHECK(JointDefaultPoseFlagsNumJoints, sizeof(uint8_t));
|
||||||
|
int numJoints = (int)*sourceBuffer++;
|
||||||
|
|
||||||
|
_jointData.resize(numJoints);
|
||||||
|
|
||||||
|
size_t bitVectorSize = calcBitVectorSize(numJoints);
|
||||||
|
PACKET_READ_CHECK(JointDefaultPoseFlagsRotationFlags, bitVectorSize);
|
||||||
|
sourceBuffer += readBitVector(sourceBuffer, numJoints, [&](int i, bool value) {
|
||||||
|
_jointData[i].rotationIsDefaultPose = value;
|
||||||
|
});
|
||||||
|
|
||||||
|
PACKET_READ_CHECK(JointDefaultPoseFlagsTranslationFlags, bitVectorSize);
|
||||||
|
sourceBuffer += readBitVector(sourceBuffer, numJoints, [&](int i, bool value) {
|
||||||
|
_jointData[i].translationIsDefaultPose = value;
|
||||||
|
});
|
||||||
|
|
||||||
|
int numBytesRead = sourceBuffer - startSection;
|
||||||
|
_jointDefaultPoseFlagsRate.increment(numBytesRead);
|
||||||
|
_jointDefaultPoseFlagsUpdateRate.increment();
|
||||||
|
}
|
||||||
|
|
||||||
int numBytesRead = sourceBuffer - startPosition;
|
int numBytesRead = sourceBuffer - startPosition;
|
||||||
_averageBytesReceived.updateAverage(numBytesRead);
|
_averageBytesReceived.updateAverage(numBytesRead);
|
||||||
|
|
||||||
|
@ -1146,6 +1217,8 @@ float AvatarData::getDataRate(const QString& rateName) const {
|
||||||
return _faceTrackerRate.rate() / BYTES_PER_KILOBIT;
|
return _faceTrackerRate.rate() / BYTES_PER_KILOBIT;
|
||||||
} else if (rateName == "jointData") {
|
} else if (rateName == "jointData") {
|
||||||
return _jointDataRate.rate() / BYTES_PER_KILOBIT;
|
return _jointDataRate.rate() / BYTES_PER_KILOBIT;
|
||||||
|
} else if (rateName == "jointDefaultPoseFlagsRate") {
|
||||||
|
return _jointDefaultPoseFlagsRate.rate() / BYTES_PER_KILOBIT;
|
||||||
} else if (rateName == "globalPositionOutbound") {
|
} else if (rateName == "globalPositionOutbound") {
|
||||||
return _outboundDataRate.globalPositionRate.rate() / BYTES_PER_KILOBIT;
|
return _outboundDataRate.globalPositionRate.rate() / BYTES_PER_KILOBIT;
|
||||||
} else if (rateName == "localPositionOutbound") {
|
} else if (rateName == "localPositionOutbound") {
|
||||||
|
@ -1170,6 +1243,8 @@ float AvatarData::getDataRate(const QString& rateName) const {
|
||||||
return _outboundDataRate.faceTrackerRate.rate() / BYTES_PER_KILOBIT;
|
return _outboundDataRate.faceTrackerRate.rate() / BYTES_PER_KILOBIT;
|
||||||
} else if (rateName == "jointDataOutbound") {
|
} else if (rateName == "jointDataOutbound") {
|
||||||
return _outboundDataRate.jointDataRate.rate() / BYTES_PER_KILOBIT;
|
return _outboundDataRate.jointDataRate.rate() / BYTES_PER_KILOBIT;
|
||||||
|
} else if (rateName == "jointDefaultPoseFlagsOutbound") {
|
||||||
|
return _outboundDataRate.jointDefaultPoseFlagsRate.rate() / BYTES_PER_KILOBIT;
|
||||||
}
|
}
|
||||||
return 0.0f;
|
return 0.0f;
|
||||||
}
|
}
|
||||||
|
@ -1236,9 +1311,9 @@ void AvatarData::setJointData(int index, const glm::quat& rotation, const glm::v
|
||||||
}
|
}
|
||||||
JointData& data = _jointData[index];
|
JointData& data = _jointData[index];
|
||||||
data.rotation = rotation;
|
data.rotation = rotation;
|
||||||
data.rotationSet = true;
|
data.rotationIsDefaultPose = false;
|
||||||
data.translation = translation;
|
data.translation = translation;
|
||||||
data.translationSet = true;
|
data.translationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarData::clearJointData(int index) {
|
void AvatarData::clearJointData(int index) {
|
||||||
|
@ -1294,7 +1369,8 @@ void AvatarData::setJointData(const QString& name, const glm::quat& rotation, co
|
||||||
auto& jointData = _jointData[index];
|
auto& jointData = _jointData[index];
|
||||||
jointData.rotation = rotation;
|
jointData.rotation = rotation;
|
||||||
jointData.translation = translation;
|
jointData.translation = translation;
|
||||||
jointData.rotationSet = jointData.translationSet = true;
|
jointData.rotationIsDefaultPose = false;
|
||||||
|
jointData.translationIsDefaultPose = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1304,7 +1380,7 @@ void AvatarData::setJointRotation(const QString& name, const glm::quat& rotation
|
||||||
writeLockWithNamedJointIndex(name, [&](int index) {
|
writeLockWithNamedJointIndex(name, [&](int index) {
|
||||||
auto& data = _jointData[index];
|
auto& data = _jointData[index];
|
||||||
data.rotation = rotation;
|
data.rotation = rotation;
|
||||||
data.rotationSet = true;
|
data.rotationIsDefaultPose = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1314,7 +1390,7 @@ void AvatarData::setJointTranslation(const QString& name, const glm::vec3& trans
|
||||||
writeLockWithNamedJointIndex(name, [&](int index) {
|
writeLockWithNamedJointIndex(name, [&](int index) {
|
||||||
auto& data = _jointData[index];
|
auto& data = _jointData[index];
|
||||||
data.translation = translation;
|
data.translation = translation;
|
||||||
data.translationSet = true;
|
data.translationIsDefaultPose = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1328,7 +1404,7 @@ void AvatarData::setJointRotation(int index, const glm::quat& rotation) {
|
||||||
}
|
}
|
||||||
JointData& data = _jointData[index];
|
JointData& data = _jointData[index];
|
||||||
data.rotation = rotation;
|
data.rotation = rotation;
|
||||||
data.rotationSet = true;
|
data.rotationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarData::setJointTranslation(int index, const glm::vec3& translation) {
|
void AvatarData::setJointTranslation(int index, const glm::vec3& translation) {
|
||||||
|
@ -1341,7 +1417,7 @@ void AvatarData::setJointTranslation(int index, const glm::vec3& translation) {
|
||||||
}
|
}
|
||||||
JointData& data = _jointData[index];
|
JointData& data = _jointData[index];
|
||||||
data.translation = translation;
|
data.translation = translation;
|
||||||
data.translationSet = true;
|
data.translationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarData::clearJointData(const QString& name) {
|
void AvatarData::clearJointData(const QString& name) {
|
||||||
|
@ -1397,7 +1473,7 @@ void AvatarData::setJointRotations(const QVector<glm::quat>& jointRotations) {
|
||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
auto& data = _jointData[i];
|
auto& data = _jointData[i];
|
||||||
data.rotation = jointRotations[i];
|
data.rotation = jointRotations[i];
|
||||||
data.rotationSet = true;
|
data.rotationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1419,7 +1495,7 @@ void AvatarData::setJointTranslations(const QVector<glm::vec3>& jointTranslation
|
||||||
for (int i = 0; i < size; ++i) {
|
for (int i = 0; i < size; ++i) {
|
||||||
auto& data = _jointData[i];
|
auto& data = _jointData[i];
|
||||||
data.translation = jointTranslations[i];
|
data.translation = jointTranslations[i];
|
||||||
data.translationSet = true;
|
data.translationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1996,9 +2072,9 @@ JointData jointDataFromJsonValue(const QJsonValue& json) {
|
||||||
if (json.isArray()) {
|
if (json.isArray()) {
|
||||||
QJsonArray array = json.toArray();
|
QJsonArray array = json.toArray();
|
||||||
result.rotation = quatFromJsonValue(array[0]);
|
result.rotation = quatFromJsonValue(array[0]);
|
||||||
result.rotationSet = true;
|
result.rotationIsDefaultPose = false;
|
||||||
result.translation = vec3FromJsonValue(array[1]);
|
result.translation = vec3FromJsonValue(array[1]);
|
||||||
result.translationSet = true;
|
result.translationIsDefaultPose = false;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,7 @@ namespace AvatarDataPacket {
|
||||||
const HasFlags PACKET_HAS_AVATAR_LOCAL_POSITION = 1U << 9;
|
const HasFlags PACKET_HAS_AVATAR_LOCAL_POSITION = 1U << 9;
|
||||||
const HasFlags PACKET_HAS_FACE_TRACKER_INFO = 1U << 10;
|
const HasFlags PACKET_HAS_FACE_TRACKER_INFO = 1U << 10;
|
||||||
const HasFlags PACKET_HAS_JOINT_DATA = 1U << 11;
|
const HasFlags PACKET_HAS_JOINT_DATA = 1U << 11;
|
||||||
|
const HasFlags PACKET_HAS_JOINT_DEFAULT_POSE_FLAGS = 1U << 12;
|
||||||
const size_t AVATAR_HAS_FLAGS_SIZE = 2;
|
const size_t AVATAR_HAS_FLAGS_SIZE = 2;
|
||||||
|
|
||||||
using SixByteQuat = uint8_t[6];
|
using SixByteQuat = uint8_t[6];
|
||||||
|
@ -256,6 +257,15 @@ namespace AvatarDataPacket {
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
size_t maxJointDataSize(size_t numJoints);
|
size_t maxJointDataSize(size_t numJoints);
|
||||||
|
|
||||||
|
/*
|
||||||
|
struct JointDefaultPoseFlags {
|
||||||
|
uint8_t numJoints;
|
||||||
|
uint8_t rotationIsDefaultPoseBits[ceil(numJoints / 8)];
|
||||||
|
uint8_t translationIsDefaultPoseBits[ceil(numJoints / 8)];
|
||||||
|
};
|
||||||
|
*/
|
||||||
|
size_t maxJointDefaultPoseFlagsSize(size_t numJoints);
|
||||||
}
|
}
|
||||||
|
|
||||||
const float MAX_AUDIO_LOUDNESS = 1000.0f; // close enough for mouth animation
|
const float MAX_AUDIO_LOUDNESS = 1000.0f; // close enough for mouth animation
|
||||||
|
@ -321,6 +331,7 @@ public:
|
||||||
RateCounter<> parentInfoRate;
|
RateCounter<> parentInfoRate;
|
||||||
RateCounter<> faceTrackerRate;
|
RateCounter<> faceTrackerRate;
|
||||||
RateCounter<> jointDataRate;
|
RateCounter<> jointDataRate;
|
||||||
|
RateCounter<> jointDefaultPoseFlagsRate;
|
||||||
};
|
};
|
||||||
|
|
||||||
class AvatarPriority {
|
class AvatarPriority {
|
||||||
|
@ -810,6 +821,7 @@ protected:
|
||||||
RateCounter<> _parentInfoRate;
|
RateCounter<> _parentInfoRate;
|
||||||
RateCounter<> _faceTrackerRate;
|
RateCounter<> _faceTrackerRate;
|
||||||
RateCounter<> _jointDataRate;
|
RateCounter<> _jointDataRate;
|
||||||
|
RateCounter<> _jointDefaultPoseFlagsRate;
|
||||||
|
|
||||||
// Some rate data for incoming data updates
|
// Some rate data for incoming data updates
|
||||||
RateCounter<> _parseBufferUpdateRate;
|
RateCounter<> _parseBufferUpdateRate;
|
||||||
|
@ -825,6 +837,7 @@ protected:
|
||||||
RateCounter<> _parentInfoUpdateRate;
|
RateCounter<> _parentInfoUpdateRate;
|
||||||
RateCounter<> _faceTrackerUpdateRate;
|
RateCounter<> _faceTrackerUpdateRate;
|
||||||
RateCounter<> _jointDataUpdateRate;
|
RateCounter<> _jointDataUpdateRate;
|
||||||
|
RateCounter<> _jointDefaultPoseFlagsUpdateRate;
|
||||||
|
|
||||||
// Some rate data for outgoing data
|
// Some rate data for outgoing data
|
||||||
AvatarDataRate _outboundDataRate;
|
AvatarDataRate _outboundDataRate;
|
||||||
|
|
|
@ -1050,7 +1050,7 @@ void ModelEntityRenderer::animate(const TypedEntityPointer& entity) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<JointData> jointsData;
|
QVector<EntityJointData> jointsData;
|
||||||
|
|
||||||
const QVector<FBXAnimationFrame>& frames = _animation->getFramesReference(); // NOTE: getFrames() is too heavy
|
const QVector<FBXAnimationFrame>& frames = _animation->getFramesReference(); // NOTE: getFrames() is too heavy
|
||||||
int frameCount = frames.size();
|
int frameCount = frames.size();
|
||||||
|
|
|
@ -452,7 +452,7 @@ void ModelEntityItem::resizeJointArrays(int newSize) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelEntityItem::setAnimationJointsData(const QVector<JointData>& jointsData) {
|
void ModelEntityItem::setAnimationJointsData(const QVector<EntityJointData>& jointsData) {
|
||||||
resizeJointArrays(jointsData.size());
|
resizeJointArrays(jointsData.size());
|
||||||
_jointDataLock.withWriteLock([&] {
|
_jointDataLock.withWriteLock([&] {
|
||||||
for (auto index = 0; index < jointsData.size(); ++index) {
|
for (auto index = 0; index < jointsData.size(); ++index) {
|
||||||
|
|
|
@ -124,7 +124,7 @@ public:
|
||||||
virtual void setJointTranslations(const QVector<glm::vec3>& translations);
|
virtual void setJointTranslations(const QVector<glm::vec3>& translations);
|
||||||
virtual void setJointTranslationsSet(const QVector<bool>& translationsSet);
|
virtual void setJointTranslationsSet(const QVector<bool>& translationsSet);
|
||||||
|
|
||||||
virtual void setAnimationJointsData(const QVector<JointData>& jointsData);
|
virtual void setAnimationJointsData(const QVector<EntityJointData>& jointsData);
|
||||||
|
|
||||||
QVector<glm::quat> getJointRotations() const;
|
QVector<glm::quat> getJointRotations() const;
|
||||||
QVector<bool> getJointRotationsSet() const;
|
QVector<bool> getJointRotationsSet() const;
|
||||||
|
@ -150,7 +150,7 @@ protected:
|
||||||
bool _jointTranslationsExplicitlySet{ false }; // were the joints set as a property or just side effect of animations
|
bool _jointTranslationsExplicitlySet{ false }; // were the joints set as a property or just side effect of animations
|
||||||
|
|
||||||
struct ModelJointData {
|
struct ModelJointData {
|
||||||
JointData joint;
|
EntityJointData joint;
|
||||||
bool rotationDirty { false };
|
bool rotationDirty { false };
|
||||||
bool translationDirty { false };
|
bool translationDirty { false };
|
||||||
};
|
};
|
||||||
|
|
|
@ -163,7 +163,7 @@ void Midi::sendRawMessage(int device, int raw) {
|
||||||
void Midi::sendMessage(int device, int channel, int type, int note, int velocity) {
|
void Midi::sendMessage(int device, int channel, int type, int note, int velocity) {
|
||||||
int message = (channel - 1) | (type << MIDI_SHIFT_STATUS);
|
int message = (channel - 1) | (type << MIDI_SHIFT_STATUS);
|
||||||
if (broadcastEnabled) {
|
if (broadcastEnabled) {
|
||||||
for (int i = 0; i < midihout.size(); i++) {
|
for (int i = 1; i < midihout.size(); i++) { // Skip 0 (Microsoft GS Wavetable Synth)
|
||||||
if (midihout[i] != NULL) {
|
if (midihout[i] != NULL) {
|
||||||
midiOutShortMsg(midihout[i], message | (note << MIDI_SHIFT_NOTE) | (velocity << MIDI_SHIFT_VELOCITY));
|
midiOutShortMsg(midihout[i], message | (note << MIDI_SHIFT_NOTE) | (velocity << MIDI_SHIFT_VELOCITY));
|
||||||
}
|
}
|
||||||
|
@ -174,9 +174,9 @@ void Midi::sendMessage(int device, int channel, int type, int note, int velocity
|
||||||
}
|
}
|
||||||
|
|
||||||
void Midi::sendNote(int status, int note, int velocity) {
|
void Midi::sendNote(int status, int note, int velocity) {
|
||||||
for (int i = 0; i < midihout.size(); i++) {
|
for (int i = 1; i < midihout.size(); i++) { // Skip 0 (Microsoft GS Wavetable Synth)
|
||||||
if (midihout[i] != NULL) {
|
if (midihout[i] != NULL) {
|
||||||
midiOutShortMsg(midihout[i], status + (note << MIDI_SHIFT_NOTE) + (velocity << MIDI_SHIFT_VELOCITY));
|
midiOutShortMsg(midihout[i], status | (note << MIDI_SHIFT_NOTE) | (velocity << MIDI_SHIFT_VELOCITY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -283,9 +283,6 @@ void Midi::midiHardwareChange() {
|
||||||
|
|
||||||
Midi::Midi() {
|
Midi::Midi() {
|
||||||
instance = this;
|
instance = this;
|
||||||
#if defined Q_OS_WIN32
|
|
||||||
midiOutExclude.push_back("Microsoft GS Wavetable Synth"); // we don't want to hear this thing (Lags)
|
|
||||||
#endif
|
|
||||||
MidiSetup();
|
MidiSetup();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ PacketVersion versionForPacketType(PacketType packetType) {
|
||||||
case PacketType::AvatarData:
|
case PacketType::AvatarData:
|
||||||
case PacketType::BulkAvatarData:
|
case PacketType::BulkAvatarData:
|
||||||
case PacketType::KillAvatar:
|
case PacketType::KillAvatar:
|
||||||
return static_cast<PacketVersion>(AvatarMixerPacketVersion::UpdatedMannequinDefaultAvatar);
|
return static_cast<PacketVersion>(AvatarMixerPacketVersion::AvatarJointDefaultPoseFlags);
|
||||||
case PacketType::MessagesData:
|
case PacketType::MessagesData:
|
||||||
return static_cast<PacketVersion>(MessageDataVersion::TextOrBinaryData);
|
return static_cast<PacketVersion>(MessageDataVersion::TextOrBinaryData);
|
||||||
case PacketType::ICEServerHeartbeat:
|
case PacketType::ICEServerHeartbeat:
|
||||||
|
|
|
@ -247,7 +247,8 @@ enum class AvatarMixerPacketVersion : PacketVersion {
|
||||||
AvatarIdentitySequenceFront,
|
AvatarIdentitySequenceFront,
|
||||||
IsReplicatedInAvatarIdentity,
|
IsReplicatedInAvatarIdentity,
|
||||||
AvatarIdentityLookAtSnapping,
|
AvatarIdentityLookAtSnapping,
|
||||||
UpdatedMannequinDefaultAvatar
|
UpdatedMannequinDefaultAvatar,
|
||||||
|
AvatarJointDefaultPoseFlags
|
||||||
};
|
};
|
||||||
|
|
||||||
enum class DomainConnectRequestVersion : PacketVersion {
|
enum class DomainConnectRequestVersion : PacketVersion {
|
||||||
|
|
58
libraries/shared/src/BitVectorHelpers.h
Normal file
58
libraries/shared/src/BitVectorHelpers.h
Normal file
|
@ -0,0 +1,58 @@
|
||||||
|
//
|
||||||
|
// BitVectorHelpers.h
|
||||||
|
// libraries/shared/src
|
||||||
|
//
|
||||||
|
// Created by Anthony Thibault on 1/19/18.
|
||||||
|
// Copyright 2018 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_BitVectorHelpers_h
|
||||||
|
#define hifi_BitVectorHelpers_h
|
||||||
|
|
||||||
|
size_t calcBitVectorSize(int numBits) {
|
||||||
|
return ((numBits - 1) >> 3) + 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// func should be of type bool func(int index)
|
||||||
|
template <typename F>
|
||||||
|
size_t writeBitVector(uint8_t* destinationBuffer, int numBits, const F& func) {
|
||||||
|
size_t totalBytes = ((numBits - 1) >> 3) + 1;
|
||||||
|
uint8_t* cursor = destinationBuffer;
|
||||||
|
uint8_t byte = 0;
|
||||||
|
uint8_t bit = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < numBits; i++) {
|
||||||
|
if (func(i)) {
|
||||||
|
byte |= (1 << bit);
|
||||||
|
}
|
||||||
|
if (++bit == BITS_IN_BYTE) {
|
||||||
|
*cursor++ = byte;
|
||||||
|
byte = 0;
|
||||||
|
bit = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return totalBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
// func should be of type 'void func(int index, bool value)'
|
||||||
|
template <typename F>
|
||||||
|
size_t readBitVector(const uint8_t* sourceBuffer, int numBits, const F& func) {
|
||||||
|
size_t totalBytes = ((numBits - 1) >> 3) + 1;
|
||||||
|
const uint8_t* cursor = sourceBuffer;
|
||||||
|
uint8_t bit = 0;
|
||||||
|
|
||||||
|
for (int i = 0; i < numBits; i++) {
|
||||||
|
bool value = (bool)(*cursor & (1 << bit));
|
||||||
|
func(i, value);
|
||||||
|
if (++bit == BITS_IN_BYTE) {
|
||||||
|
cursor++;
|
||||||
|
bit = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return totalBytes;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
|
@ -5,14 +5,27 @@
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
#include <glm/gtc/quaternion.hpp>
|
#include <glm/gtc/quaternion.hpp>
|
||||||
|
|
||||||
// Used by the avatar mixer to describe a single joint
|
class EntityJointData {
|
||||||
// These are relative to their parent and translations are in meters
|
|
||||||
class JointData {
|
|
||||||
public:
|
public:
|
||||||
glm::quat rotation;
|
glm::quat rotation;
|
||||||
|
glm::vec3 translation;
|
||||||
bool rotationSet = false;
|
bool rotationSet = false;
|
||||||
glm::vec3 translation; // meters
|
|
||||||
bool translationSet = false;
|
bool translationSet = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Used by the avatar mixer to describe a single joint
|
||||||
|
// Translations relative to their parent and are in meters.
|
||||||
|
// Rotations are absolute (i.e. not relative to parent) and are in rig space.
|
||||||
|
class JointData {
|
||||||
|
public:
|
||||||
|
glm::quat rotation;
|
||||||
|
glm::vec3 translation;
|
||||||
|
|
||||||
|
// This indicates that the rotation or translation is the same as the defaultPose for the avatar.
|
||||||
|
// if true, it also means that the rotation or translation value in this structure is not valid and
|
||||||
|
// should be replaced by the avatar's actual default pose value.
|
||||||
|
bool rotationIsDefaultPose = true;
|
||||||
|
bool translationIsDefaultPose = true;
|
||||||
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -31,6 +31,8 @@
|
||||||
const QString SYSTEM_TOOLBAR = "com.highfidelity.interface.toolbar.system";
|
const QString SYSTEM_TOOLBAR = "com.highfidelity.interface.toolbar.system";
|
||||||
const QString SYSTEM_TABLET = "com.highfidelity.interface.tablet.system";
|
const QString SYSTEM_TABLET = "com.highfidelity.interface.tablet.system";
|
||||||
const QString TabletScriptingInterface::QML = "hifi/tablet/TabletRoot.qml";
|
const QString TabletScriptingInterface::QML = "hifi/tablet/TabletRoot.qml";
|
||||||
|
const QString BUTTON_SORT_ORDER_KEY = "sortOrder";
|
||||||
|
const int DEFAULT_BUTTON_SORT_ORDER = 100;
|
||||||
|
|
||||||
static QString getUsername() {
|
static QString getUsername() {
|
||||||
QString username = "Unknown user";
|
QString username = "Unknown user";
|
||||||
|
@ -74,11 +76,21 @@ QVariant TabletButtonListModel::data(const QModelIndex& index, int role) const {
|
||||||
}
|
}
|
||||||
|
|
||||||
TabletButtonProxy* TabletButtonListModel::addButton(const QVariant& properties) {
|
TabletButtonProxy* TabletButtonListModel::addButton(const QVariant& properties) {
|
||||||
auto tabletButtonProxy = QSharedPointer<TabletButtonProxy>(new TabletButtonProxy(properties.toMap()));
|
QVariantMap newProperties = properties.toMap();
|
||||||
|
if (newProperties.find(BUTTON_SORT_ORDER_KEY) == newProperties.end()) {
|
||||||
|
newProperties[BUTTON_SORT_ORDER_KEY] = DEFAULT_BUTTON_SORT_ORDER;
|
||||||
|
}
|
||||||
|
int index = computeNewButtonIndex(newProperties);
|
||||||
|
auto button = QSharedPointer<TabletButtonProxy>(new TabletButtonProxy(newProperties));
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
_buttons.push_back(tabletButtonProxy);
|
int numButtons = (int)_buttons.size();
|
||||||
|
if (index < numButtons) {
|
||||||
|
_buttons.insert(_buttons.begin() + index, button);
|
||||||
|
} else {
|
||||||
|
_buttons.push_back(button);
|
||||||
|
}
|
||||||
endResetModel();
|
endResetModel();
|
||||||
return tabletButtonProxy.data();
|
return button.data();
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabletButtonListModel::removeButton(TabletButtonProxy* button) {
|
void TabletButtonListModel::removeButton(TabletButtonProxy* button) {
|
||||||
|
@ -92,6 +104,20 @@ void TabletButtonListModel::removeButton(TabletButtonProxy* button) {
|
||||||
endResetModel();
|
endResetModel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int TabletButtonListModel::computeNewButtonIndex(const QVariantMap& newButtonProperties) {
|
||||||
|
int numButtons = (int)_buttons.size();
|
||||||
|
int newButtonSortOrder = newButtonProperties[BUTTON_SORT_ORDER_KEY].toInt();
|
||||||
|
if (newButtonSortOrder == DEFAULT_BUTTON_SORT_ORDER) return numButtons;
|
||||||
|
for (int i = 0; i < numButtons; i++) {
|
||||||
|
QVariantMap tabletButtonProperties = _buttons[i]->getProperties();
|
||||||
|
int tabletButtonSortOrder = tabletButtonProperties[BUTTON_SORT_ORDER_KEY].toInt();
|
||||||
|
if (newButtonSortOrder <= tabletButtonSortOrder) {
|
||||||
|
return i;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return numButtons;
|
||||||
|
}
|
||||||
|
|
||||||
TabletButtonsProxyModel::TabletButtonsProxyModel(QObject *parent)
|
TabletButtonsProxyModel::TabletButtonsProxyModel(QObject *parent)
|
||||||
: QSortFilterProxyModel(parent) {
|
: QSortFilterProxyModel(parent) {
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,6 +115,7 @@ protected:
|
||||||
friend class TabletProxy;
|
friend class TabletProxy;
|
||||||
TabletButtonProxy* addButton(const QVariant& properties);
|
TabletButtonProxy* addButton(const QVariant& properties);
|
||||||
void removeButton(TabletButtonProxy* button);
|
void removeButton(TabletButtonProxy* button);
|
||||||
|
int computeNewButtonIndex(const QVariantMap& newButtonProperties);
|
||||||
using List = std::list<QSharedPointer<TabletButtonProxy>>;
|
using List = std::list<QSharedPointer<TabletButtonProxy>>;
|
||||||
static QHash<int, QByteArray> _roles;
|
static QHash<int, QByteArray> _roles;
|
||||||
static Qt::ItemFlags _flags;
|
static Qt::ItemFlags _flags;
|
||||||
|
|
|
@ -22,8 +22,7 @@
|
||||||
|
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
icon: Script.resolvePath("dynamicsTests.svg"),
|
icon: Script.resolvePath("dynamicsTests.svg"),
|
||||||
text: "Dynamics",
|
text: "Dynamics"
|
||||||
sortOrder: 15
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,7 @@
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
text: TABLET_BUTTON_NAME,
|
text: TABLET_BUTTON_NAME,
|
||||||
icon: ICON_URL,
|
icon: ICON_URL,
|
||||||
activeIcon: ACTIVE_ICON_URL,
|
activeIcon: ACTIVE_ICON_URL
|
||||||
sortOrder: 1
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var hasEventBridge = false;
|
var hasEventBridge = false;
|
||||||
|
|
|
@ -30,8 +30,7 @@
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
text: TABLET_BUTTON_NAME,
|
text: TABLET_BUTTON_NAME,
|
||||||
icon: ICON_URL,
|
icon: ICON_URL,
|
||||||
activeIcon: ACTIVE_ICON_URL,
|
activeIcon: ACTIVE_ICON_URL
|
||||||
sortOrder: 1
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var hasEventBridge = false;
|
var hasEventBridge = false;
|
||||||
|
|
|
@ -31,8 +31,7 @@
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
text: TABLET_BUTTON_NAME,
|
text: TABLET_BUTTON_NAME,
|
||||||
icon: ICON_URL,
|
icon: ICON_URL,
|
||||||
activeIcon: ACTIVE_ICON_URL,
|
activeIcon: ACTIVE_ICON_URL
|
||||||
sortOrder: 1
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var hasEventBridge = false;
|
var hasEventBridge = false;
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
var window = new OverlayWindow({
|
var window = new OverlayWindow({
|
||||||
title: 'API Debugger',
|
title: 'API Debugger',
|
||||||
source: qml,
|
source: qml,
|
||||||
width: 1200,
|
width: 500,
|
||||||
height: 500
|
height: 700
|
||||||
});
|
});
|
||||||
|
|
||||||
window.closed.connect(function () {
|
window.closed.connect(function () {
|
||||||
|
|
|
@ -945,8 +945,7 @@
|
||||||
tabletButton = tablet.addButton({
|
tabletButton = tablet.addButton({
|
||||||
icon: tabletButtonIcon,
|
icon: tabletButtonIcon,
|
||||||
activeIcon: tabletButtonActiveIcon,
|
activeIcon: tabletButtonActiveIcon,
|
||||||
text: tabletButtonName,
|
text: tabletButtonName
|
||||||
sortOrder: 0
|
|
||||||
});
|
});
|
||||||
|
|
||||||
Messages.subscribe(channelName);
|
Messages.subscribe(channelName);
|
||||||
|
|
|
@ -593,10 +593,16 @@
|
||||||
getConnectionData(false);
|
getConnectionData(false);
|
||||||
break;
|
break;
|
||||||
case 'enable_ChooseRecipientNearbyMode':
|
case 'enable_ChooseRecipientNearbyMode':
|
||||||
|
if (!isUpdateOverlaysWired) {
|
||||||
Script.update.connect(updateOverlays);
|
Script.update.connect(updateOverlays);
|
||||||
|
isUpdateOverlaysWired = true;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'disable_ChooseRecipientNearbyMode':
|
case 'disable_ChooseRecipientNearbyMode':
|
||||||
|
if (isUpdateOverlaysWired) {
|
||||||
Script.update.disconnect(updateOverlays);
|
Script.update.disconnect(updateOverlays);
|
||||||
|
isUpdateOverlaysWired = false;
|
||||||
|
}
|
||||||
removeOverlays();
|
removeOverlays();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -681,14 +687,18 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var isWired = false;
|
var isWired = false;
|
||||||
|
var isUpdateOverlaysWired = false;
|
||||||
function off() {
|
function off() {
|
||||||
if (isWired) { // It is not ok to disconnect these twice, hence guard.
|
if (isWired) { // It is not ok to disconnect these twice, hence guard.
|
||||||
Users.usernameFromIDReply.disconnect(usernameFromIDReply);
|
Users.usernameFromIDReply.disconnect(usernameFromIDReply);
|
||||||
Script.update.disconnect(updateOverlays);
|
|
||||||
Controller.mousePressEvent.disconnect(handleMouseEvent);
|
Controller.mousePressEvent.disconnect(handleMouseEvent);
|
||||||
Controller.mouseMoveEvent.disconnect(handleMouseMoveEvent);
|
Controller.mouseMoveEvent.disconnect(handleMouseMoveEvent);
|
||||||
isWired = false;
|
isWired = false;
|
||||||
}
|
}
|
||||||
|
if (isUpdateOverlaysWired) {
|
||||||
|
Script.update.disconnect(updateOverlays);
|
||||||
|
isUpdateOverlaysWired = false;
|
||||||
|
}
|
||||||
triggerMapping.disable(); // It's ok if we disable twice.
|
triggerMapping.disable(); // It's ok if we disable twice.
|
||||||
triggerPressMapping.disable(); // see above
|
triggerPressMapping.disable(); // see above
|
||||||
removeOverlays();
|
removeOverlays();
|
||||||
|
|
|
@ -43,7 +43,7 @@ var activeTimer = false; // used to cancel active timer if a user plays an amima
|
||||||
var activeEmote = false; // to keep track of the currently playing emote
|
var activeEmote = false; // to keep track of the currently playing emote
|
||||||
|
|
||||||
button = tablet.addButton({
|
button = tablet.addButton({
|
||||||
//icon: "icons/tablet-icons/emote.svg", // TODO - we need graphics for this
|
icon: "icons/tablet-icons/EmoteAppIcon.svg",
|
||||||
text: EMOTE_LABEL,
|
text: EMOTE_LABEL,
|
||||||
sortOrder: EMOTE_APP_SORT_ORDER
|
sortOrder: EMOTE_APP_SORT_ORDER
|
||||||
});
|
});
|
||||||
|
|
|
@ -37,8 +37,7 @@
|
||||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
button = tablet.addButton({
|
button = tablet.addButton({
|
||||||
icon: "icons/tablet-icons/goto-i.svg",
|
icon: "icons/tablet-icons/goto-i.svg",
|
||||||
text: buttonName,
|
text: buttonName
|
||||||
sortOrder: 8
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,8 +41,7 @@ if (Settings.getValue("HUDUIEnabled")) {
|
||||||
button = tablet.addButton({
|
button = tablet.addButton({
|
||||||
icon: "icons/tablet-icons/goto-i.svg",
|
icon: "icons/tablet-icons/goto-i.svg",
|
||||||
activeIcon: "icons/tablet-icons/goto-a.svg",
|
activeIcon: "icons/tablet-icons/goto-a.svg",
|
||||||
text: buttonName,
|
text: buttonName
|
||||||
sortOrder: 8
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,11 +44,11 @@
|
||||||
input[type=button] {
|
input[type=button] {
|
||||||
font-family: 'Raleway';
|
font-family: 'Raleway';
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
font-size: 13px;
|
font-size: 20px;
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
vertical-align: top;
|
vertical-align: top;
|
||||||
height: 28px;
|
height: 105px;
|
||||||
min-width: 120px;
|
min-width: 190px;
|
||||||
padding: 0px 18px;
|
padding: 0px 18px;
|
||||||
margin-right: 6px;
|
margin-right: 6px;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
|
@ -98,14 +98,14 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<p>Click an emotion to Emote:<p>
|
<p>Click an emotion to Emote:<p>
|
||||||
<p><input type="button" class="emote-button white" value="Crying"></p>
|
<p><input type="button" class="emote-button white" value="Crying">
|
||||||
<p><input type="button" class="emote-button white" value="Surprised"></p>
|
<input type="button" class="emote-button white" value="Surprised"></p>
|
||||||
<p><input type="button" class="emote-button white" value="Dancing"></p>
|
<p><input type="button" class="emote-button white" value="Dancing">
|
||||||
<p><input type="button" class="emote-button white" value="Cheering"></p>
|
<input type="button" class="emote-button white" value="Cheering"></p>
|
||||||
<p><input type="button" class="emote-button white" value="Waving"></p>
|
<p><input type="button" class="emote-button white" value="Waving">
|
||||||
<p><input type="button" class="emote-button white" value="Fall"></p>
|
<input type="button" class="emote-button white" value="Fall"></p>
|
||||||
<p><input type="button" class="emote-button white" value="Pointing"></p>
|
<p><input type="button" class="emote-button white" value="Pointing">
|
||||||
<p><input type="button" class="emote-button white" value="Clapping"></p>
|
<input type="button" class="emote-button white" value="Clapping"></p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
|
||||||
|
|
|
@ -10,8 +10,7 @@
|
||||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
icon: Script.resolvePath("assets/images/run.svg"),
|
icon: Script.resolvePath("assets/images/run.svg"),
|
||||||
text: "RUN",
|
text: "RUN"
|
||||||
sortOrder: 15
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function onClicked() {
|
function onClicked() {
|
||||||
|
|
|
@ -37,8 +37,7 @@
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
icon: "icons/tablet-icons/users-i.svg",
|
icon: "icons/tablet-icons/users-i.svg",
|
||||||
activeIcon: "icons/tablet-icons/users-a.svg",
|
activeIcon: "icons/tablet-icons/users-a.svg",
|
||||||
text: "USERS",
|
text: "USERS"
|
||||||
sortOrder: 11
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var onUsersScreen = false;
|
var onUsersScreen = false;
|
||||||
|
|
|
@ -31,8 +31,7 @@ var activeButton = tablet.addButton({
|
||||||
icon: whiteIcon,
|
icon: whiteIcon,
|
||||||
activeIcon: blackIcon,
|
activeIcon: blackIcon,
|
||||||
text: APP_NAME,
|
text: APP_NAME,
|
||||||
isActive: isActive,
|
isActive: isActive
|
||||||
sortOrder: 11
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (isActive) {
|
if (isActive) {
|
||||||
|
|
|
@ -32,8 +32,7 @@
|
||||||
var button = tablet.addButton({
|
var button = tablet.addButton({
|
||||||
icon: ICONS.icon,
|
icon: ICONS.icon,
|
||||||
activeIcon: ICONS.activeIcon,
|
activeIcon: ICONS.activeIcon,
|
||||||
text: TABLET_BUTTON_NAME,
|
text: TABLET_BUTTON_NAME
|
||||||
sortOrder: 1
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var hasEventBridge = false;
|
var hasEventBridge = false;
|
||||||
|
|
Loading…
Reference in a new issue