Merge remote-tracking branch 'origin/master'
25
interface/resources/qml/controls/qmldir
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
module controls
|
||||||
|
Button 1.0 Button.qml
|
||||||
|
ButtonAwesome 1.0 ButtonAwesome.qml
|
||||||
|
CheckBox 1.0 CheckBox.qml
|
||||||
|
ComboBox 1.0 ComboBox.qml
|
||||||
|
FlickableWebViewCore 1.0 FlickableWebViewCore.qml
|
||||||
|
FontAwesome 1.0 FontAwesome.qml
|
||||||
|
Player 1.0 Player.qml
|
||||||
|
RadioButton 1.0 RadioButton.qml
|
||||||
|
Slider 1.0 Slider.qml
|
||||||
|
Spacer 1.0 Spacer.qml
|
||||||
|
SpinBox 1.0 SpinBox.qml
|
||||||
|
TabletWebButton 1.0 TabletWebButton.qml
|
||||||
|
TabletWebScreen 1.0 TabletWebScreen.qml
|
||||||
|
TabletWebView 1.0 TabletWebView.qml
|
||||||
|
Text 1.0 Text.qml
|
||||||
|
TextAndSlider 1.0 TextAndSlider.qml
|
||||||
|
TextAndSpinBox 1.0 TextAndSpinBox.qml
|
||||||
|
TextArea 1.0 TextArea.qml
|
||||||
|
TextEdit 1.0 TextEdit.qml
|
||||||
|
TextField 1.0 TextField.qml
|
||||||
|
TextHeader 1.0 TextHeader.qml
|
||||||
|
TextInput 1.0 TextInput.qml
|
||||||
|
TextInputAndButton 1.0 TextInputAndButton.qml
|
||||||
|
WebView 1.0 WebView.qml
|
18
interface/resources/qml/hifi/dialogs/qmldir
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
module dialogs
|
||||||
|
AboutDialog 1.0 AboutDialog.qml
|
||||||
|
AdvancedPreferencesDialog 1.0 AdvancedPreferencesDialog.qml
|
||||||
|
AudioBuffers 1.0 AudioBuffers.qml
|
||||||
|
AvatarPreferencesDialog 1.0 AvatarPreferencesDialog.qml
|
||||||
|
GeneralPreferencesDialog 1.0 GeneralPreferencesDialog.qml
|
||||||
|
LodPreferencesDialog 1.0 LodPreferencesDialog.qml
|
||||||
|
ModelBrowserDialog 1.0 ModelBrowserDialog.qml
|
||||||
|
NetworkingPreferencesDialog 1.0 NetworkingPreferencesDialog.qml
|
||||||
|
RunningScripts 1.0 RunningScripts.qml
|
||||||
|
TabletAboutDialog 1.0 TabletAboutDialog.qml
|
||||||
|
TabletAssetServer 1.0 TabletAssetServer.qml
|
||||||
|
TabletDCDialog 1.0 TabletDCDialog.qml
|
||||||
|
TabletDebugWindow 1.0 TabletDebugWindow.qml
|
||||||
|
TabletEntityStatistics 1.0 TabletEntityStatistics.qml
|
||||||
|
TabletEntityStatisticsItem 1.0 TabletEntityStatisticsItem.qml
|
||||||
|
TabletLODTools 1.0 TabletLODTools.qml
|
||||||
|
TabletRunningScripts 1.0 TabletRunningScripts.qml
|
4
interface/resources/qml/hifi/toolbars/qmldir
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
module toolbars
|
||||||
|
StateImage 1.0 StateImage.qml
|
||||||
|
Toolbar 1.0 Toolbar.qml
|
||||||
|
ToolbarButton 1.0 ToolbarButton.qml
|
|
@ -9,16 +9,17 @@
|
||||||
//
|
//
|
||||||
// Helps manage the list of avatars added to the nametag list
|
// Helps manage the list of avatars added to the nametag list
|
||||||
//
|
//
|
||||||
|
var EntityMaker = Script.require('./entityMaker.js');
|
||||||
var EntityMaker = Script.require('./entityMaker.js?' + Date.now());
|
var entityProps = Script.require('./defaultLocalEntityProps.js');
|
||||||
var entityProps = Script.require('./defaultLocalEntityProps.js?' + Date.now());
|
var textHelper = new (Script.require('./textHelper.js'));
|
||||||
var textHelper = new (Script.require('./textHelper.js?' + Date.now()));
|
|
||||||
var X = 0;
|
var X = 0;
|
||||||
var Y = 1;
|
var Y = 1;
|
||||||
var Z = 2;
|
var Z = 2;
|
||||||
var HALF = 0.5;
|
var HALF = 0.5;
|
||||||
var CLEAR_ENTITY_EDIT_PROPS = true;
|
var CLEAR_ENTITY_EDIT_PROPS = true;
|
||||||
var MILISECONDS_IN_SECOND = 1000;
|
var MILISECONDS_IN_SECOND = 1000;
|
||||||
|
var SECONDS_IN_MINUTE = 60;
|
||||||
|
var ALWAYS_ON_MAX_LIFETIME_IN_SECONDS = 20 * SECONDS_IN_MINUTE; // Delete after 20 minutes in case a nametag is hanging around in on mode
|
||||||
|
|
||||||
// *************************************
|
// *************************************
|
||||||
// START UTILTY
|
// START UTILTY
|
||||||
|
@ -58,8 +59,6 @@ var distanceScaler = DISTANCE_SCALER_ON;
|
||||||
var userScaler = 1.0;
|
var userScaler = 1.0;
|
||||||
var DEFAULT_LINE_HEIGHT = entityProps.lineHeight;
|
var DEFAULT_LINE_HEIGHT = entityProps.lineHeight;
|
||||||
function calculateInitialProperties(uuid) {
|
function calculateInitialProperties(uuid) {
|
||||||
var avatar = _this.avatars[uuid];
|
|
||||||
|
|
||||||
var adjustedScaler = null;
|
var adjustedScaler = null;
|
||||||
var distance = null;
|
var distance = null;
|
||||||
var dimensions = null;
|
var dimensions = null;
|
||||||
|
@ -97,19 +96,6 @@ function calculateInitialProperties(uuid) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Used in alwaysOn mode to show or hide if they reached the max radius
|
|
||||||
function showHide(uuid, type) {
|
|
||||||
var avatar = _this.avatars[uuid];
|
|
||||||
var nametag = avatar.nametag;
|
|
||||||
|
|
||||||
if (type === "show") {
|
|
||||||
nametag.show();
|
|
||||||
} else {
|
|
||||||
nametag.hide();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Go through the selected avatar list and see if any of the avatars need a redraw
|
// Go through the selected avatar list and see if any of the avatars need a redraw
|
||||||
function checkAllSelectedForRedraw() {
|
function checkAllSelectedForRedraw() {
|
||||||
for (var avatar in _this.selectedAvatars) {
|
for (var avatar in _this.selectedAvatars) {
|
||||||
|
@ -168,6 +154,18 @@ function getDistance(uuid, checkAvatar, shouldSave) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Quick check for distance from avatar
|
||||||
|
function quickDistanceCheckForNonSelectedAvatars(uuid) {
|
||||||
|
var source = MyAvatar.position;
|
||||||
|
|
||||||
|
var target = AvatarManager.getAvatar(uuid).position;
|
||||||
|
|
||||||
|
var avatarDistance = Vec3.distance(target, source);
|
||||||
|
|
||||||
|
return avatarDistance;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check to see if we need to toggle our interval check because we went to 0 avatars
|
// Check to see if we need to toggle our interval check because we went to 0 avatars
|
||||||
// or if we got our first avatar in the select list
|
// or if we got our first avatar in the select list
|
||||||
function shouldToggleInterval() {
|
function shouldToggleInterval() {
|
||||||
|
@ -197,7 +195,9 @@ function toggleInterval() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// handle turning the peristenet mode on
|
// Handle checking to see if we should add or delete nametags in persistent mode
|
||||||
|
var alwaysOnAvatarDistanceCheck = false;
|
||||||
|
var DISTANCE_CHECK_INTERVAL_MS = 1000;
|
||||||
function handleAlwaysOnMode(shouldTurnOnAlwaysOnMode) {
|
function handleAlwaysOnMode(shouldTurnOnAlwaysOnMode) {
|
||||||
_this.reset();
|
_this.reset();
|
||||||
if (shouldTurnOnAlwaysOnMode) {
|
if (shouldTurnOnAlwaysOnMode) {
|
||||||
|
@ -205,9 +205,23 @@ function handleAlwaysOnMode(shouldTurnOnAlwaysOnMode) {
|
||||||
.getAvatarIdentifiers()
|
.getAvatarIdentifiers()
|
||||||
.forEach(function (avatar) {
|
.forEach(function (avatar) {
|
||||||
if (avatar) {
|
if (avatar) {
|
||||||
add(avatar);
|
var avatarDistance = quickDistanceCheckForNonSelectedAvatars(avatar);
|
||||||
|
if (avatarDistance < MAX_RADIUS_IGNORE_METERS) {
|
||||||
|
add(avatar);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
maybeClearAlwaysOnAvatarDistanceCheck();
|
||||||
|
alwaysOnAvatarDistanceCheck = Script.setInterval(maybeAddOrRemoveIntervalCheck, DISTANCE_CHECK_INTERVAL_MS);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Check to see if we need to clear the distance check in persistent mode
|
||||||
|
function maybeClearAlwaysOnAvatarDistanceCheck() {
|
||||||
|
if (alwaysOnAvatarDistanceCheck) {
|
||||||
|
Script.clearInterval(alwaysOnAvatarDistanceCheck);
|
||||||
|
alwaysOnAvatarDistanceCheck = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -313,12 +327,6 @@ function makeNameTag(uuid) {
|
||||||
var nameTagPosition = jointInObjectFrame.y + scaledDimenionsYHalf + ABOVE_HEAD_OFFSET;
|
var nameTagPosition = jointInObjectFrame.y + scaledDimenionsYHalf + ABOVE_HEAD_OFFSET;
|
||||||
var localPosition = [0, nameTagPosition, 0];
|
var localPosition = [0, nameTagPosition, 0];
|
||||||
|
|
||||||
var visible = true;
|
|
||||||
if (avatarNametagMode === "alwaysOn") {
|
|
||||||
var currentDistance = getDistance(uuid, CHECK_AVATAR, false);
|
|
||||||
visible = currentDistance > MAX_RADIUS_IGNORE_METERS ? false : true;
|
|
||||||
}
|
|
||||||
|
|
||||||
nametag
|
nametag
|
||||||
.add("leftMargin", lineHeight * LEFT_MARGIN_SCALER)
|
.add("leftMargin", lineHeight * LEFT_MARGIN_SCALER)
|
||||||
.add("rightMargin", lineHeight * RIGHT_MARGIN_SCALER)
|
.add("rightMargin", lineHeight * RIGHT_MARGIN_SCALER)
|
||||||
|
@ -328,7 +336,6 @@ function makeNameTag(uuid) {
|
||||||
.add("dimensions", scaledDimensions)
|
.add("dimensions", scaledDimensions)
|
||||||
.add("parentID", parentID)
|
.add("parentID", parentID)
|
||||||
.add("localPosition", localPosition)
|
.add("localPosition", localPosition)
|
||||||
.add("visible", visible)
|
|
||||||
.create(CLEAR_ENTITY_EDIT_PROPS);
|
.create(CLEAR_ENTITY_EDIT_PROPS);
|
||||||
|
|
||||||
Script.setTimeout(function () {
|
Script.setTimeout(function () {
|
||||||
|
@ -341,33 +348,45 @@ function makeNameTag(uuid) {
|
||||||
var MAX_RADIUS_IGNORE_METERS = 22;
|
var MAX_RADIUS_IGNORE_METERS = 22;
|
||||||
var MAX_ON_MODE_DISTANCE = 35;
|
var MAX_ON_MODE_DISTANCE = 35;
|
||||||
var CHECK_AVATAR = true;
|
var CHECK_AVATAR = true;
|
||||||
var MIN_DISTANCE = 0.2;
|
var MIN_DISTANCE_FOR_REDRAW_METERS = 0.1;
|
||||||
function maybeRedraw(uuid) {
|
function maybeRedraw(uuid) {
|
||||||
var avatar = _this.avatars[uuid];
|
var avatar = _this.avatars[uuid];
|
||||||
getAvatarData(uuid);
|
getAvatarData(uuid);
|
||||||
|
|
||||||
getDistance(uuid);
|
getDistance(uuid);
|
||||||
var avatarDistance = getDistance(uuid, CHECK_AVATAR, false);
|
var distanceDelta = Math.abs(avatar.currentDistance - avatar.previousDistance);
|
||||||
if (avatarNametagMode === "alwaysOn" && avatarDistance > MAX_RADIUS_IGNORE_METERS) {
|
|
||||||
showHide(uuid, "hide");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (avatarNametagMode === "alwaysOn" && avatarDistance < MAX_RADIUS_IGNORE_METERS) {
|
|
||||||
showHide(uuid, "show");
|
|
||||||
}
|
|
||||||
|
|
||||||
var name = getCorrectName(uuid);
|
var name = getCorrectName(uuid);
|
||||||
|
|
||||||
if (avatar.previousName !== name) {
|
if (avatar.previousName !== name) {
|
||||||
updateName(uuid, name);
|
updateName(uuid, name);
|
||||||
} else {
|
} else if (distanceDelta > MIN_DISTANCE_FOR_REDRAW_METERS) {
|
||||||
redraw(uuid);
|
redraw(uuid);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Check to see if we need to add or remove this avatar during always on mode
|
||||||
|
function maybeAddOrRemoveIntervalCheck() {
|
||||||
|
AvatarManager
|
||||||
|
.getAvatarIdentifiers()
|
||||||
|
.forEach(function (avatar) {
|
||||||
|
if (avatar) {
|
||||||
|
var avatarDistance = quickDistanceCheckForNonSelectedAvatars(avatar);
|
||||||
|
if (avatar && avatarNametagMode === "alwaysOn" && !(avatar in _this.avatars) && avatarDistance < MAX_RADIUS_IGNORE_METERS) {
|
||||||
|
add(avatar);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (avatarDistance > MAX_RADIUS_IGNORE_METERS) {
|
||||||
|
maybeRemove(avatar);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Handle redrawing if needed
|
// Handle redrawing if needed
|
||||||
|
var MIN_DISTANCE = 0.1;
|
||||||
function redraw(uuid) {
|
function redraw(uuid) {
|
||||||
var avatar = _this.avatars[uuid];
|
var avatar = _this.avatars[uuid];
|
||||||
|
|
||||||
|
@ -447,7 +466,7 @@ function add(uuid) {
|
||||||
|
|
||||||
_this.selectedAvatars[uuid] = true;
|
_this.selectedAvatars[uuid] = true;
|
||||||
if (avatarNametagMode === "alwaysOn") {
|
if (avatarNametagMode === "alwaysOn") {
|
||||||
entityProps.lifetime = -1;
|
entityProps.lifetime = ALWAYS_ON_MAX_LIFETIME_IN_SECONDS;
|
||||||
} else {
|
} else {
|
||||||
entityProps.lifetime = DEFAULT_LIFETIME;
|
entityProps.lifetime = DEFAULT_LIFETIME;
|
||||||
}
|
}
|
||||||
|
@ -521,16 +540,20 @@ function removeNametag(uuid) {
|
||||||
// #region API
|
// #region API
|
||||||
|
|
||||||
|
|
||||||
// Create the manager and hook up username signal
|
// Create the manager.
|
||||||
function create() {
|
function create() {
|
||||||
|
if (avatarNametagMode === "alwaysOn") {
|
||||||
|
handleAvatarNametagMode("alwaysOn");
|
||||||
|
}
|
||||||
|
|
||||||
return _this;
|
return _this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Destory the manager and disconnect from username signal
|
// Destroy the manager
|
||||||
function destroy() {
|
function destroy() {
|
||||||
_this.reset();
|
_this.reset();
|
||||||
|
|
||||||
return _this;
|
return _this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -601,7 +624,9 @@ function maybeRemove(uuid) {
|
||||||
|
|
||||||
// Check to see if we need to add this user to our list
|
// Check to see if we need to add this user to our list
|
||||||
function maybeAdd(uuid) {
|
function maybeAdd(uuid) {
|
||||||
if (uuid && avatarNametagMode === "alwaysOn" && !(uuid in _this.avatars)) {
|
var avatarDistance = quickDistanceCheckForNonSelectedAvatars(uuid);
|
||||||
|
|
||||||
|
if (uuid && avatarNametagMode === "alwaysOn" && !(uuid in _this.avatars) && avatarDistance < MAX_RADIUS_IGNORE_METERS) {
|
||||||
add(uuid);
|
add(uuid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -628,6 +653,7 @@ function reset() {
|
||||||
removeAllNametags();
|
removeAllNametags();
|
||||||
_this.avatars = {};
|
_this.avatars = {};
|
||||||
shouldToggleInterval();
|
shouldToggleInterval();
|
||||||
|
maybeClearAlwaysOnAvatarDistanceCheck();
|
||||||
|
|
||||||
return _this;
|
return _this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,8 @@
|
||||||
//
|
//
|
||||||
// Click on someone to get a nametag for them
|
// Click on someone to get a nametag for them
|
||||||
//
|
//
|
||||||
var PickRayController = Script.require('./resources/modules/pickRayController.js?' + Date.now());
|
var PickRayController = Script.require('./resources/modules/pickRayController.js');
|
||||||
var NameTagListManager = Script.require('./resources/modules/nameTagListManager.js?' + Date.now());
|
var NameTagListManager = Script.require('./resources/modules/nameTagListManager.js');
|
||||||
var pickRayController = new PickRayController();
|
var pickRayController = new PickRayController();
|
||||||
var nameTagListManager = new NameTagListManager();
|
var nameTagListManager = new NameTagListManager();
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ function selectAvatar(uuid, intersection) {
|
||||||
// Handles reset of list if you change domains
|
// Handles reset of list if you change domains
|
||||||
function onDomainChange() {
|
function onDomainChange() {
|
||||||
nameTagListManager.reset();
|
nameTagListManager.reset();
|
||||||
|
nameTagListManager.handleAvatarNametagMode(avatarNametagMode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtWebChannel 1.0
|
import QtWebChannel 1.0
|
||||||
import "../../controls"
|
import controls 1.0
|
||||||
import "../toolbars"
|
import hifi.toolbars 1.0
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import controlsUit 1.0 as HifiControls
|
import controlsUit 1.0 as HifiControls
|
||||||
import stylesUit 1.0
|
import stylesUit 1.0
|
|
@ -1,8 +1,8 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtWebChannel 1.0
|
import QtWebChannel 1.0
|
||||||
import "../../controls"
|
import controls 1.0
|
||||||
import "../toolbars"
|
import hifi.toolbars 1.0
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import controlsUit 1.0 as HifiControls
|
import controlsUit 1.0 as HifiControls
|
||||||
import stylesUit 1.0
|
import stylesUit 1.0
|
||||||
|
@ -72,7 +72,7 @@ TabBar {
|
||||||
|
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/94-model-01.svg"
|
icon: "create-icons/94-model-01.svg"
|
||||||
text: "MODEL"
|
text: "MODEL"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -84,7 +84,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/21-cube-01.svg"
|
icon: "create-icons/21-cube-01.svg"
|
||||||
text: "SHAPE"
|
text: "SHAPE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -96,7 +96,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/24-light-01.svg"
|
icon: "create-icons/24-light-01.svg"
|
||||||
text: "LIGHT"
|
text: "LIGHT"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -108,7 +108,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/20-text-01.svg"
|
icon: "create-icons/20-text-01.svg"
|
||||||
text: "TEXT"
|
text: "TEXT"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -120,7 +120,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/image.svg"
|
icon: "create-icons/image.svg"
|
||||||
text: "IMAGE"
|
text: "IMAGE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -132,7 +132,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/25-web-1-01.svg"
|
icon: "create-icons/25-web-1-01.svg"
|
||||||
text: "WEB"
|
text: "WEB"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -144,7 +144,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/23-zone-01.svg"
|
icon: "create-icons/23-zone-01.svg"
|
||||||
text: "ZONE"
|
text: "ZONE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -156,7 +156,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/90-particles-01.svg"
|
icon: "create-icons/90-particles-01.svg"
|
||||||
text: "PARTICLE"
|
text: "PARTICLE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -168,7 +168,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/126-material-01.svg"
|
icon: "create-icons/126-material-01.svg"
|
||||||
text: "MATERIAL"
|
text: "MATERIAL"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
|
@ -37,7 +37,7 @@ StackView {
|
||||||
}
|
}
|
||||||
|
|
||||||
function pushSource(path) {
|
function pushSource(path) {
|
||||||
var item = Qt.createComponent(Qt.resolvedUrl("../../" + path));
|
var item = Qt.createComponent(Qt.resolvedUrl(path));
|
||||||
editRoot.push(item, itemProperties,
|
editRoot.push(item, itemProperties,
|
||||||
StackView.Immediate);
|
StackView.Immediate);
|
||||||
editRoot.currentItem.sendToScript.connect(editRoot.sendToScript);
|
editRoot.currentItem.sendToScript.connect(editRoot.sendToScript);
|
|
@ -1,8 +1,8 @@
|
||||||
import QtQuick 2.7
|
import QtQuick 2.7
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtWebChannel 1.0
|
import QtWebChannel 1.0
|
||||||
import "../../controls"
|
import controls 1.0
|
||||||
import "../toolbars"
|
import hifi.toolbars 1.0
|
||||||
import QtGraphicalEffects 1.0
|
import QtGraphicalEffects 1.0
|
||||||
import controlsUit 1.0 as HifiControls
|
import controlsUit 1.0 as HifiControls
|
||||||
import stylesUit 1.0
|
import stylesUit 1.0
|
||||||
|
@ -78,7 +78,7 @@ TabBar {
|
||||||
|
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/94-model-01.svg"
|
icon: "create-icons/94-model-01.svg"
|
||||||
text: "MODEL"
|
text: "MODEL"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -90,7 +90,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/21-cube-01.svg"
|
icon: "create-icons/21-cube-01.svg"
|
||||||
text: "SHAPE"
|
text: "SHAPE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -102,7 +102,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/24-light-01.svg"
|
icon: "create-icons/24-light-01.svg"
|
||||||
text: "LIGHT"
|
text: "LIGHT"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -114,7 +114,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/20-text-01.svg"
|
icon: "create-icons/20-text-01.svg"
|
||||||
text: "TEXT"
|
text: "TEXT"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -126,7 +126,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/image.svg"
|
icon: "create-icons/image.svg"
|
||||||
text: "IMAGE"
|
text: "IMAGE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -138,7 +138,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/25-web-1-01.svg"
|
icon: "create-icons/25-web-1-01.svg"
|
||||||
text: "WEB"
|
text: "WEB"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -150,7 +150,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/23-zone-01.svg"
|
icon: "create-icons/23-zone-01.svg"
|
||||||
text: "ZONE"
|
text: "ZONE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -162,7 +162,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/90-particles-01.svg"
|
icon: "create-icons/90-particles-01.svg"
|
||||||
text: "PARTICLE"
|
text: "PARTICLE"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
||||||
|
@ -174,7 +174,7 @@ TabBar {
|
||||||
}
|
}
|
||||||
|
|
||||||
NewEntityButton {
|
NewEntityButton {
|
||||||
icon: "icons/create-icons/126-material-01.svg"
|
icon: "create-icons/126-material-01.svg"
|
||||||
text: "MATERIAL"
|
text: "MATERIAL"
|
||||||
onClicked: {
|
onClicked: {
|
||||||
editRoot.sendToScript({
|
editRoot.sendToScript({
|
|
@ -6,7 +6,7 @@ Item {
|
||||||
id: newEntityButton
|
id: newEntityButton
|
||||||
property var uuid;
|
property var uuid;
|
||||||
property string text: "ENTITY"
|
property string text: "ENTITY"
|
||||||
property string icon: "icons/edit-icon.svg"
|
property string icon: Path.resources + "icons/edit-icon.svg"
|
||||||
property string activeText: newEntityButton.text
|
property string activeText: newEntityButton.text
|
||||||
property string activeIcon: newEntityButton.icon
|
property string activeIcon: newEntityButton.icon
|
||||||
property bool isActive: false
|
property bool isActive: false
|
||||||
|
@ -47,14 +47,6 @@ Item {
|
||||||
anchors.topMargin: 0
|
anchors.topMargin: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
function urlHelper(src) {
|
|
||||||
if (src.match(/\bhttp/)) {
|
|
||||||
return src;
|
|
||||||
} else {
|
|
||||||
return "../../../" + src;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: buttonOutline
|
id: buttonOutline
|
||||||
color: "#00000000"
|
color: "#00000000"
|
||||||
|
@ -96,7 +88,7 @@ Item {
|
||||||
anchors.bottomMargin: 5
|
anchors.bottomMargin: 5
|
||||||
anchors.horizontalCenter: parent.horizontalCenter
|
anchors.horizontalCenter: parent.horizontalCenter
|
||||||
fillMode: Image.Stretch
|
fillMode: Image.Stretch
|
||||||
source: newEntityButton.urlHelper(newEntityButton.icon)
|
source: newEntityButton.icon
|
||||||
}
|
}
|
||||||
|
|
||||||
ColorOverlay {
|
ColorOverlay {
|
|
@ -15,7 +15,7 @@ import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
|
||||||
import stylesUit 1.0
|
import stylesUit 1.0
|
||||||
import controlsUit 1.0
|
import controlsUit 1.0
|
||||||
import "../dialogs"
|
import dialogs 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: newMaterialDialog
|
id: newMaterialDialog
|
|
@ -14,7 +14,7 @@ import QtQuick.Dialogs 1.2 as OriginalDialogs
|
||||||
|
|
||||||
import stylesUit 1.0
|
import stylesUit 1.0
|
||||||
import controlsUit 1.0
|
import controlsUit 1.0
|
||||||
import "../dialogs"
|
import dialogs 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: newModelDialog
|
id: newModelDialog
|
Before Width: | Height: | Size: 717 B After Width: | Height: | Size: 717 B |
Before Width: | Height: | Size: 2 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 3.4 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.2 KiB |
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 2.1 KiB |
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
@ -45,7 +45,7 @@ var MAX_DEFAULT_ENTITY_LIST_HEIGHT = 942;
|
||||||
var DEFAULT_IMAGE = "https://hifi-content.s3.amazonaws.com/DomainContent/production/no-image.jpg";
|
var DEFAULT_IMAGE = "https://hifi-content.s3.amazonaws.com/DomainContent/production/no-image.jpg";
|
||||||
|
|
||||||
var createToolsWindow = new CreateWindow(
|
var createToolsWindow = new CreateWindow(
|
||||||
Script.resourcesPath() + "qml/hifi/tablet/EditTools.qml",
|
Script.resolvePath("create/EditTools.qml"),
|
||||||
'Create Tools',
|
'Create Tools',
|
||||||
'com.highfidelity.create.createToolsWindow',
|
'com.highfidelity.create.createToolsWindow',
|
||||||
function () {
|
function () {
|
||||||
|
@ -812,7 +812,7 @@ var toolBar = (function () {
|
||||||
tablet.screenChanged.connect(function (type, url) {
|
tablet.screenChanged.connect(function (type, url) {
|
||||||
var isGoingToHomescreenOnDesktop = (!shouldUseEditTabletApp() &&
|
var isGoingToHomescreenOnDesktop = (!shouldUseEditTabletApp() &&
|
||||||
(url === 'hifi/tablet/TabletHome.qml' || url === ''));
|
(url === 'hifi/tablet/TabletHome.qml' || url === ''));
|
||||||
if (isActive && (type !== "QML" || url !== "hifi/tablet/Edit.qml") && !isGoingToHomescreenOnDesktop) {
|
if (isActive && (type !== "QML" || url !== Script.resolvePath("create/Edit.qml")) && !isGoingToHomescreenOnDesktop) {
|
||||||
that.setActive(false);
|
that.setActive(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -841,10 +841,10 @@ var toolBar = (function () {
|
||||||
if (shouldUseEditTabletApp()) {
|
if (shouldUseEditTabletApp()) {
|
||||||
// tablet version of new-model dialog
|
// tablet version of new-model dialog
|
||||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||||
tablet.pushOntoStack("hifi/tablet/New" + entityType + "Dialog.qml");
|
tablet.pushOntoStack(Script.resolvePath("create/New" + entityType + "Dialog.qml"));
|
||||||
} else {
|
} else {
|
||||||
closeExistingDialogWindow();
|
closeExistingDialogWindow();
|
||||||
var qmlPath = Script.resourcesPath() + "qml/hifi/tablet/New" + entityType + "Window.qml";
|
var qmlPath = Script.resolvePath("create/New" + entityType + "Window.qml");
|
||||||
var DIALOG_WINDOW_SIZE = { x: 500, y: 300 };
|
var DIALOG_WINDOW_SIZE = { x: 500, y: 300 };
|
||||||
dialogWindow = Desktop.createWindow(qmlPath, {
|
dialogWindow = Desktop.createWindow(qmlPath, {
|
||||||
title: "New " + entityType + " Entity",
|
title: "New " + entityType + " Entity",
|
||||||
|
@ -965,7 +965,7 @@ var toolBar = (function () {
|
||||||
Controller.disableMapping(CONTROLLER_MAPPING_NAME);
|
Controller.disableMapping(CONTROLLER_MAPPING_NAME);
|
||||||
} else {
|
} else {
|
||||||
if (shouldUseEditTabletApp()) {
|
if (shouldUseEditTabletApp()) {
|
||||||
tablet.loadQMLSource("hifi/tablet/Edit.qml", true);
|
tablet.loadQMLSource(Script.resolvePath("create/Edit.qml"), true);
|
||||||
} else {
|
} else {
|
||||||
// make other apps inactive while in desktop mode
|
// make other apps inactive while in desktop mode
|
||||||
tablet.gotoHomeScreen();
|
tablet.gotoHomeScreen();
|
||||||
|
|
|
@ -37,7 +37,7 @@ EntityListTool = function(shouldUseEditTabletApp) {
|
||||||
var ENTITY_LIST_WIDTH = 495;
|
var ENTITY_LIST_WIDTH = 495;
|
||||||
var MAX_DEFAULT_CREATE_TOOLS_HEIGHT = 778;
|
var MAX_DEFAULT_CREATE_TOOLS_HEIGHT = 778;
|
||||||
var entityListWindow = new CreateWindow(
|
var entityListWindow = new CreateWindow(
|
||||||
Script.resolvePath("EditEntityList.qml"),
|
Script.resolvePath("../create/EditEntityList.qml"),
|
||||||
'Entity List',
|
'Entity List',
|
||||||
'com.highfidelity.create.entityListWindow',
|
'com.highfidelity.create.entityListWindow',
|
||||||
function () {
|
function () {
|
||||||
|
|