mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-07 15:42:39 +02:00
Reverting tablet API rename, cleaning up duplicated code
This commit is contained in:
parent
64592d66d7
commit
1167be4102
73 changed files with 100 additions and 105 deletions
|
@ -29,12 +29,12 @@ Original.Button {
|
|||
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
|
||||
style: ButtonStyle {
|
||||
|
|
|
@ -31,12 +31,12 @@ Original.CheckBox {
|
|||
activeFocusOnPress: true
|
||||
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
|
||||
// TODO: doesnt works for QQC1. check with QQC2
|
||||
// onHovered: {
|
||||
// Tablets.playSound(TabletEnums.ButtonHover);
|
||||
// Tablet.playSound(TabletEnums.ButtonHover);
|
||||
// }
|
||||
|
||||
style: CheckBoxStyle {
|
||||
|
|
|
@ -36,12 +36,12 @@ CheckBox {
|
|||
hoverEnabled: true
|
||||
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,12 +27,12 @@ Original.Button {
|
|||
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
|
||||
style: ButtonStyle {
|
||||
|
|
|
@ -35,13 +35,13 @@ Item {
|
|||
|
||||
onContainsMouseChanged: {
|
||||
if (containsMouse) {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
mouse.accepted = true;
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
|
||||
webEntity.synthesizeKeyPress(glyph);
|
||||
webEntity.synthesizeKeyPress(glyph, mirrorText);
|
||||
|
|
|
@ -30,12 +30,12 @@ Original.RadioButton {
|
|||
readonly property int checkRadius: 2
|
||||
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
|
||||
// TODO: doesnt works for QQC1. check with QQC2
|
||||
// onHovered: {
|
||||
// Tablets.playSound(TabletEnums.ButtonHover);
|
||||
// Tablet.playSound(TabletEnums.ButtonHover);
|
||||
// }
|
||||
|
||||
style: RadioButtonStyle {
|
||||
|
|
|
@ -24,7 +24,7 @@ Item {
|
|||
});
|
||||
object.selected.connect(function(button) {
|
||||
if (button === OriginalDialogs.StandardButton.Ok) {
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.gotoHomeScreen()
|
||||
}
|
||||
});
|
||||
|
|
|
@ -89,10 +89,10 @@ TabletModalWindow {
|
|||
//bodyLoader.active = false
|
||||
}
|
||||
if (gotoPreviousApp) {
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.returnToPreviousApp();
|
||||
} else {
|
||||
Tablets.getTablet("com.highfidelity.interface.tablet.system").gotoHomeScreen();
|
||||
Tablet.getTablet("com.highfidelity.interface.tablet.system").gotoHomeScreen();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,13 +25,13 @@ Preference {
|
|||
id: button
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
preference.trigger();
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
width: 180
|
||||
anchors.bottom: parent.bottom
|
||||
|
|
|
@ -41,12 +41,12 @@ Preference {
|
|||
id: checkBox
|
||||
onHoveredChanged: {
|
||||
if (hovered) {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
|
||||
anchors {
|
||||
|
|
|
@ -246,12 +246,12 @@ Item {
|
|||
anchors.fill: parent;
|
||||
acceptedButtons: Qt.LeftButton;
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
goFunction("hifi://" + hifiUrl);
|
||||
}
|
||||
hoverEnabled: true;
|
||||
onEntered: {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
hoverThunk();
|
||||
}
|
||||
onExited: unhoverThunk();
|
||||
|
@ -269,7 +269,7 @@ Item {
|
|||
}
|
||||
}
|
||||
function go() {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
goFunction(drillDownToPlace ? ("/places/" + placeName) : ("/user_stories/" + storyId));
|
||||
}
|
||||
MouseArea {
|
||||
|
|
|
@ -45,7 +45,7 @@ OriginalDesktop.Desktop {
|
|||
Toolbar {
|
||||
id: sysToolbar;
|
||||
objectName: "com.highfidelity.interface.toolbar.system";
|
||||
property var tablet: Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
property var tablet: Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
anchors.horizontalCenter: settings.constrainToolbarToCenterX ? desktop.horizontalCenter : undefined;
|
||||
// Literal 50 is overwritten by settings from previous session, and sysToolbar.x comes from settings when not constrained.
|
||||
x: sysToolbar.x
|
||||
|
|
|
@ -61,12 +61,12 @@ Rectangle {
|
|||
scrollGestureEnabled: false;
|
||||
onClicked: {
|
||||
Audio.muted = !Audio.muted;
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
drag.target: dragTarget;
|
||||
onContainsMouseChanged: {
|
||||
if (containsMouse) {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -123,11 +123,11 @@ Item {
|
|||
hoverEnabled: true
|
||||
enabled: true
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
newEntityButton.clicked();
|
||||
}
|
||||
onEntered: {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
newEntityButton.state = "hover state";
|
||||
}
|
||||
onExited: {
|
||||
|
|
|
@ -72,7 +72,7 @@ StackView {
|
|||
addressLine.focus = !HMD.active;
|
||||
root.parentChanged.connect(center);
|
||||
center();
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
}
|
||||
Component.onDestruction: {
|
||||
root.parentChanged.disconnect(center);
|
||||
|
@ -149,7 +149,7 @@ StackView {
|
|||
onClicked: {
|
||||
addressBarDialog.loadHome();
|
||||
tabletRoot.shown = false;
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.gotoHomeScreen();
|
||||
}
|
||||
anchors {
|
||||
|
|
|
@ -37,7 +37,7 @@ Item {
|
|||
}
|
||||
|
||||
function closeDialog() {
|
||||
Tablets.getTablet("com.highfidelity.interface.tablet.system").gotoHomeScreen();
|
||||
Tablet.getTablet("com.highfidelity.interface.tablet.system").gotoHomeScreen();
|
||||
}
|
||||
|
||||
anchors.topMargin: hifi.dimensions.tabletMenuHeader // Space for header.
|
||||
|
|
|
@ -130,12 +130,12 @@ Item {
|
|||
}
|
||||
tabletButton.clicked();
|
||||
if (tabletRoot) {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
}
|
||||
}
|
||||
onEntered: {
|
||||
tabletButton.isEntered = true;
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
|
||||
if (tabletButton.isActive) {
|
||||
tabletButton.state = "hover active state";
|
||||
|
|
|
@ -9,7 +9,7 @@ import "../audio" as HifiAudio
|
|||
Item {
|
||||
id: tablet
|
||||
objectName: "tablet"
|
||||
property var tabletProxy: Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
property var tabletProxy: Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
Rectangle {
|
||||
id: bgTopBar
|
||||
|
|
|
@ -77,12 +77,12 @@ FocusScope {
|
|||
anchors.fill: parent
|
||||
hoverEnabled: true
|
||||
onEntered: {
|
||||
Tablets.playSound(TabletEnums.ButtonHover);
|
||||
Tablet.playSound(TabletEnums.ButtonHover);
|
||||
listView.currentIndex = index
|
||||
}
|
||||
|
||||
onClicked: {
|
||||
Tablets.playSound(TabletEnums.ButtonClick);
|
||||
Tablet.playSound(TabletEnums.ButtonClick);
|
||||
root.selected(item);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ Item {
|
|||
}
|
||||
|
||||
function closeDialog() {
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
if (gotoPreviousApp) {
|
||||
tablet.returnToPreviousApp();
|
||||
|
@ -206,7 +206,7 @@ Item {
|
|||
}
|
||||
|
||||
Component.onCompleted: {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
keyboardEnabled = HMD.active;
|
||||
}
|
||||
|
||||
|
|
|
@ -5833,10 +5833,9 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe
|
|||
qScriptRegisterMetaType(scriptEngine.data(), wrapperToScriptValue<TabletProxy>, wrapperFromScriptValue<TabletProxy>);
|
||||
qScriptRegisterMetaType(scriptEngine.data(),
|
||||
wrapperToScriptValue<TabletButtonProxy>, wrapperFromScriptValue<TabletButtonProxy>);
|
||||
scriptEngine->registerGlobalObject("Tablets", DependencyManager::get<TabletScriptingInterface>().data());
|
||||
scriptEngine->registerGlobalObject("Tablet", DependencyManager::get<TabletScriptingInterface>().data());
|
||||
// FIXME remove these deprecated names for the tablet scripting interface
|
||||
scriptEngine->registerGlobalObject("tabletInterface", DependencyManager::get<TabletScriptingInterface>().data());
|
||||
scriptEngine->registerGlobalObject("Tablet", DependencyManager::get<TabletScriptingInterface>().data());
|
||||
|
||||
auto toolbarScriptingInterface = DependencyManager::get<ToolbarScriptingInterface>().data();
|
||||
DependencyManager::get<TabletScriptingInterface>().data()->setToolbarScriptingInterface(toolbarScriptingInterface);
|
||||
|
|
|
@ -105,12 +105,6 @@ void OffscreenUi::create() {
|
|||
myContext->setContextProperty("OffscreenUi", this);
|
||||
myContext->setContextProperty("offscreenFlags", offscreenFlags = new OffscreenFlags());
|
||||
myContext->setContextProperty("fileDialogHelper", new FileDialogHelper());
|
||||
auto tabletScriptingInterface = DependencyManager::get<TabletScriptingInterface>();
|
||||
qRegisterMetaType<TabletProxy*>();
|
||||
qRegisterMetaType<TabletButtonProxy*>();
|
||||
myContext->setContextProperty("Tablets", tabletScriptingInterface.data());
|
||||
TabletProxy* tablet = tabletScriptingInterface->getTablet("com.highfidelity.interface.tablet.system");
|
||||
myContext->engine()->setObjectOwnership(tablet, QQmlEngine::CppOwnership);
|
||||
}
|
||||
|
||||
void OffscreenUi::show(const QUrl& url, const QString& name, std::function<void(QQmlContext*, QObject*)> f) {
|
||||
|
|
|
@ -391,8 +391,10 @@ void initializeQmlEngine(QQmlEngine* engine, QQuickWindow* window) {
|
|||
qRegisterMetaType<TabletProxy*>();
|
||||
qRegisterMetaType<TabletButtonProxy*>();
|
||||
});
|
||||
rootContext->setContextProperty("Tablets", DependencyManager::get<TabletScriptingInterface>().data());
|
||||
rootContext->setContextProperty("Tablet", DependencyManager::get<TabletScriptingInterface>().data());
|
||||
rootContext->setContextProperty("Toolbars", DependencyManager::get<ToolbarScriptingInterface>().data());
|
||||
TabletProxy* tablet = DependencyManager::get<TabletScriptingInterface>()->getTablet("com.highfidelity.interface.tablet.system");
|
||||
myContext->engine()->setObjectOwnership(tablet, QQmlEngine::CppOwnership);
|
||||
}
|
||||
|
||||
QQmlEngine* acquireEngine(QQuickWindow* window) {
|
||||
|
|
|
@ -227,7 +227,7 @@
|
|||
}
|
||||
|
||||
function setUp() {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
if (!tablet) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
var recording = false;
|
||||
var onRecordingScreen = false;
|
||||
var passedSaveDirectory = false;
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
text: "IRecord"
|
||||
});
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
var DYNAMICS_TESTS_URL = Script.resolvePath("dynamics-tests.html");
|
||||
var DEFAULT_LIFETIME = 120; // seconds
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
var button = tablet.addButton({
|
||||
icon: Script.resolvePath("dynamicsTests.svg"),
|
||||
|
|
|
@ -19,7 +19,7 @@ Script.include("/~/system/libraries/Xform.js");
|
|||
var TABLET_BUTTON_NAME = "PUCKTACH";
|
||||
var TABLET_APP_URL = "https://hifi-content.s3.amazonaws.com/seefo/production/puck-attach/puck-attach.html";
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tabletButton = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-i.svg",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
(function () {
|
||||
var HTML_URL = Script.resolvePath("sliderTest.html");
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
text: "SLIDER"
|
||||
});
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
/* globals Tablets */
|
||||
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tabletButton = tablet.addButton({
|
||||
text: "SOUNDS",
|
||||
icon: "http://s3.amazonaws.com/hifi-public/tony/icons/trombone-i.png",
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
// Adds a BAM! button to the tablet ui.
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
text: "BAM!!!"
|
||||
});
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
//
|
||||
|
||||
if (HMD.active && !Settings.getValue("HUDUIEnabled")) {
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var qml = Script.resolvePath("TabletStats.qml");
|
||||
tablet.loadQMLSource(qml);
|
||||
Script.stop();
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
text: TABLET_BUTTON_NAME,
|
||||
icon: ICON_URL,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
var MODEL_BOUNDING_BOX_DIMENSIONS = {x: 1.0174,y: 1.1925,z: 1.0165};
|
||||
var PhotoBooth = {};
|
||||
var photoboothCreated = false;
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/snap-i.svg",
|
||||
text: "PHOTOBOOTH"
|
||||
|
|
|
@ -54,7 +54,7 @@ function onScreenChanged(type, url) {
|
|||
button.editProperties({isActive: onAudioScreen});
|
||||
}
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: Audio.muted ? MUTE_ICONS.icon : UNMUTE_ICONS.icon,
|
||||
activeIcon: Audio.muted ? MUTE_ICONS.activeIcon : UNMUTE_ICONS.activeIcon,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
var scopePaused = AudioScope.getPause();
|
||||
var autoPause = false;
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var showScopeButton = tablet.addButton({
|
||||
icon: "icons/tablet-icons/scope.svg",
|
||||
text: "Audio Scope",
|
||||
|
|
|
@ -183,7 +183,7 @@
|
|||
|
||||
// Setup the bubble button
|
||||
var buttonName = "BUBBLE";
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/bubble-i.svg",
|
||||
activeIcon: "icons/tablet-icons/bubble-a.svg",
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
var tabletButtonIcon = "icons/tablet-icons/menu-i.svg"; // Icon for chat button.
|
||||
var tabletButtonActiveIcon = "icons/tablet-icons/menu-a.svg"; // Active icon for chat button.
|
||||
var tabletButton = null; // The button we create in the tablet.
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); // The awesome tablet.
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"); // The awesome tablet.
|
||||
var chatLog = []; // Array of chat messages in the form of [avatarID, displayName, message, data].
|
||||
var avatarIdentifiers = {}; // Map of avatar ids to dict of identifierParams.
|
||||
var speechBubbleShowing = false; // Is the speech bubble visible?
|
||||
|
|
|
@ -148,7 +148,7 @@
|
|||
var walletEnabled = Settings.getValue("commerce", false);
|
||||
function startup() {
|
||||
if (walletEnabled) {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
button = tablet.addButton({
|
||||
text: buttonName,
|
||||
icon: "icons/tablet-icons/wallet-i.svg",
|
||||
|
|
|
@ -81,7 +81,7 @@ function endGodView() {
|
|||
}
|
||||
|
||||
var button;
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
function onClicked() {
|
||||
if (godView) {
|
||||
|
|
|
@ -390,7 +390,7 @@ var toolBar = (function () {
|
|||
}
|
||||
|
||||
function fromQml(message) { // messages are {method, params}, like json-rpc. See also sendToQml.
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.popFromStack();
|
||||
switch (message.method) {
|
||||
case "newModelDialogAdd":
|
||||
|
@ -417,7 +417,7 @@ var toolBar = (function () {
|
|||
|
||||
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp() || Entities.canRezCertified() || Entities.canRezTmpCertified());
|
||||
var createButtonIconRsrc = (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON);
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
activeButton = tablet.addButton({
|
||||
captionColorOverride: hasRezPermissions ? "" : "#888888",
|
||||
icon: createButtonIconRsrc,
|
||||
|
@ -463,7 +463,7 @@ var toolBar = (function () {
|
|||
var SHAPE_TYPE_DEFAULT = SHAPE_TYPE_STATIC_MESH;
|
||||
|
||||
// tablet version of new-model dialog
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.pushOntoStack("NewModelDialog.qml");
|
||||
});
|
||||
|
||||
|
@ -644,7 +644,7 @@ var toolBar = (function () {
|
|||
isActive = active;
|
||||
activeButton.editProperties({isActive: isActive});
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
if (!isActive) {
|
||||
entityListTool.setVisible(false);
|
||||
|
@ -1850,7 +1850,7 @@ var PropertiesTool = function (opts) {
|
|||
var that = {};
|
||||
|
||||
var webView = null;
|
||||
webView = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
webView.setVisible = function(value) {};
|
||||
|
||||
var visible = false;
|
||||
|
@ -2293,7 +2293,7 @@ function selectParticleEntity(entityID) {
|
|||
particleExplorerTool.webView.emitScriptEvent(JSON.stringify(particleData));
|
||||
|
||||
// Switch to particle explorer
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet.sendToQml({method: 'selectTab', params: {id: 'particle'}});
|
||||
}
|
||||
|
||||
|
|
|
@ -414,7 +414,7 @@
|
|||
}
|
||||
|
||||
function setUp() {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
if (!tablet) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
alpha: 0.9
|
||||
});
|
||||
} else {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/goto-i.svg",
|
||||
text: buttonName,
|
||||
|
|
|
@ -37,7 +37,7 @@ if (Settings.getValue("HUDUIEnabled")) {
|
|||
alpha: 0.9
|
||||
});
|
||||
} else {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/goto-i.svg",
|
||||
activeIcon: "icons/tablet-icons/goto-a.svg",
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
|
||||
var buttonName = "HELP";
|
||||
var onHelpScreen = false;
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/help-i.svg",
|
||||
activeIcon: "icons/tablet-icons/help-a.svg",
|
||||
|
|
|
@ -38,7 +38,7 @@ function updateControllerDisplay() {
|
|||
}
|
||||
|
||||
var button;
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
// Independent and Entity mode make people sick; disable them in hmd.
|
||||
var desktopOnlyViews = ['Independent Mode', 'Entity Mode'];
|
||||
|
|
|
@ -168,7 +168,7 @@ WebTablet = function (url, width, dpi, hand, clientOnly, location, visible) {
|
|||
|
||||
this.receive = function (channel, senderID, senderUUID, localOnly) {
|
||||
if (_this.homeButtonID == senderID) {
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var onHomeScreen = tablet.onHomeScreen();
|
||||
var isMessageOpen;
|
||||
if (onHomeScreen) {
|
||||
|
@ -513,7 +513,7 @@ WebTablet.prototype.mousePressEvent = function (event) {
|
|||
entityPickResults.overlayID === this.tabletEntityID)) {
|
||||
var overlayPickResults = Overlays.findRayIntersection(pickRay, true, [this.webOverlayID, this.homeButtonID], []);
|
||||
if (overlayPickResults.intersects && overlayPickResults.overlayID === this.homeButtonID) {
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var onHomeScreen = tablet.onHomeScreen();
|
||||
var isMessageOpen = tablet.isMessageDialogOpen();
|
||||
if (onHomeScreen) {
|
||||
|
|
|
@ -15,7 +15,7 @@ EntityListTool = function(opts) {
|
|||
var that = {};
|
||||
|
||||
var webView = null;
|
||||
webView = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
webView.setVisible = function(value) {};
|
||||
|
||||
var filterInView = false;
|
||||
|
|
|
@ -237,7 +237,7 @@ GridTool = function(opts) {
|
|||
var listeners = [];
|
||||
|
||||
var webView = null;
|
||||
webView = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
webView.setVisible = function(value) {};
|
||||
|
||||
horizontalGrid.addListener(function(data) {
|
||||
|
|
|
@ -354,7 +354,7 @@ flatten = function(array) {
|
|||
|
||||
getTabletWidthFromSettings = function () {
|
||||
var DEFAULT_TABLET_WIDTH = 0.4375;
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var toolbarMode = tablet.toolbarMode;
|
||||
var DEFAULT_TABLET_SCALE = 100;
|
||||
var tabletScalePercentage = DEFAULT_TABLET_SCALE;
|
||||
|
|
|
@ -82,7 +82,7 @@ function toggleMarketplace() {
|
|||
}
|
||||
}
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
var browseExamplesButton = tablet.addButton({
|
||||
icon: "icons/tablet-icons/market-i.svg",
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var marketplaceButton = tablet.addButton({
|
||||
icon: "icons/tablet-icons/market-i.svg",
|
||||
activeIcon: "icons/tablet-icons/market-a.svg",
|
||||
|
|
|
@ -13,7 +13,7 @@ var HOME_BUTTON_TEXTURE = "http://hifi-content.s3.amazonaws.com/alan/dev/tablet-
|
|||
// var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
|
||||
|
||||
(function() {
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/menu-i.svg",
|
||||
activeIcon: "icons/tablet-icons/menu-a.svg",
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
Script.include("/~/system/libraries/controllers.js");
|
||||
|
||||
// grab the toolbar
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
var ASSETS_PATH = Script.resolvePath("assets");
|
||||
var TOOLS_PATH = Script.resolvePath("assets/images/tools/");
|
||||
|
|
|
@ -696,7 +696,7 @@
|
|||
Window.announcement.connect(onNotify);
|
||||
Window.notifyEditError = onEditError;
|
||||
Window.notify = onNotify;
|
||||
Tablets.tabletNotification.connect(tabletNotification);
|
||||
Tablet.tabletNotification.connect(tabletNotification);
|
||||
Wallet.walletNotSetup.connect(walletNotSetup);
|
||||
|
||||
Messages.subscribe(NOTIFICATIONS_MESSAGE_CHANNEL);
|
||||
|
|
|
@ -677,7 +677,7 @@ var buttonName = "PEOPLE";
|
|||
var tablet = null;
|
||||
|
||||
function startup() {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
button = tablet.addButton({
|
||||
text: buttonName,
|
||||
icon: "icons/tablet-icons/people-i.svg",
|
||||
|
|
|
@ -17,7 +17,7 @@ var PARTICLE_EXPLORER_HTML_URL = Script.resolvePath('particleExplorer.html');
|
|||
ParticleExplorerTool = function() {
|
||||
var that = {};
|
||||
that.createWebView = function() {
|
||||
that.webView = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
that.webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
that.webView.setVisible = function(value) {};
|
||||
that.webView.webEventReceived.connect(that.webEventReceived);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ var clearOverlayWhenMoving;
|
|||
var buttonName = "SNAP";
|
||||
var buttonConnected = false;
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/snap-i.svg",
|
||||
activeIcon: "icons/tablet-icons/snap-a.svg",
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
var shouldActivateButton = false;
|
||||
function ignore() { }
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var NORMAL_ICON = "icons/tablet-icons/goto-i.svg";
|
||||
var NORMAL_ACTIVE = "icons/tablet-icons/goto-a.svg";
|
||||
var WAITING_ICON = "icons/tablet-icons/goto-msg.svg";
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
function checkTablet() {
|
||||
if (gTablet === null) {
|
||||
gTablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
gTablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@
|
|||
Script.scriptEnding.connect(function () {
|
||||
|
||||
// if we reload scripts in tablet mode make sure we close the currently open window, by calling gotoHomeScreen
|
||||
var tabletProxy = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tabletProxy = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
if (tabletProxy && tabletProxy.toolbarMode) {
|
||||
tabletProxy.gotoHomeScreen();
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
GlobalServices.findableBy = myVisibility;
|
||||
}
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: "icons/tablet-icons/users-i.svg",
|
||||
activeIcon: "icons/tablet-icons/users-a.svg",
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
APP_URL = APP_OUTDATED_URL;
|
||||
}
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: APP_ICON,
|
||||
activeIcon: APP_ICON_ACTIVE,
|
||||
|
|
|
@ -162,7 +162,7 @@ var globalState = {
|
|||
function main() {
|
||||
log('initializing...', VERSION);
|
||||
|
||||
var tablet = Tablets.getTablet('com.highfidelity.interface.tablet.system'),
|
||||
var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system'),
|
||||
button = tablet.addButton(BUTTON_CONFIG);
|
||||
|
||||
Script.scriptEnding.connect(function() {
|
||||
|
@ -601,7 +601,7 @@ function _patchCameraModeSetting() {
|
|||
}
|
||||
|
||||
function getSystemMetadata() {
|
||||
var tablet = Tablets.getTablet('com.highfidelity.interface.tablet.system');
|
||||
var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system');
|
||||
return {
|
||||
mode: {
|
||||
hmd: HMD.active,
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
// Load up engine
|
||||
var APP_NAME = "CLAP";
|
||||
var ClapEngine = Script.require(Script.resolvePath("scripts/ClapEngine.js?v9"));
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
// Define Menu
|
||||
var blackIcon = Script.resolvePath("icons/tablet-icons/clap-a.svg?foxv2");
|
||||
|
|
|
@ -45,7 +45,7 @@ var buttonConfig = utils.assign({
|
|||
activeIcon: require('./doppleganger-a.svg.json'),
|
||||
});
|
||||
|
||||
var tablet = Tablets.getTablet('com.highfidelity.interface.tablet.system'),
|
||||
var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system'),
|
||||
button = tablet.addButton(buttonConfig);
|
||||
|
||||
Script.scriptEnding.connect(function() {
|
||||
|
|
|
@ -905,7 +905,7 @@ var buttonConfig = utils.assign({
|
|||
activeIcon: __webpack_require__(7),
|
||||
});
|
||||
|
||||
var tablet = Tablets.getTablet('com.highfidelity.interface.tablet.system'),
|
||||
var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system'),
|
||||
button = tablet.addButton(buttonConfig);
|
||||
|
||||
Script.scriptEnding.connect(function() {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
var DopplegangerClass = Script.require('./doppleganger.js');
|
||||
|
||||
var tablet = Tablets.getTablet('com.highfidelity.interface.tablet.system'),
|
||||
var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system'),
|
||||
button = tablet.addButton({
|
||||
icon: Script.resolvePath('./doppleganger-i.svg'),
|
||||
activeIcon: Script.resolvePath('./doppleganger-a.svg'),
|
||||
|
|
|
@ -19,7 +19,7 @@ var lib = Script.require("https://hifi-content.s3.amazonaws.com/elisalj/emoji_sc
|
|||
var APP_NAME = "EMOJIS";
|
||||
var APP_URL = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/emojiTabletUI.html?" + Date.now();
|
||||
var APP_ICON = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/icons/emoji-i.svg";
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
|
||||
var button = tablet.addButton({
|
||||
icon: APP_ICON,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
var TRIGGER_PRESSURE = 0.95;
|
||||
|
||||
var tablet = Tablets.getTablet('com.highfidelity.interface.tablet.system');
|
||||
var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system');
|
||||
|
||||
var button = tablet.addButton({
|
||||
icon: APP_ICON,
|
||||
|
|
|
@ -631,7 +631,7 @@
|
|||
}
|
||||
|
||||
function setUp() {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
if (!tablet) {
|
||||
return;
|
||||
}
|
||||
|
@ -694,7 +694,7 @@
|
|||
}
|
||||
|
||||
// FIXME: If setUp() is run immediately at Interface start-up, Interface hangs and crashes because of the line of code:
|
||||
// tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
// tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
//setUp();
|
||||
//Script.scriptEnding.connect(tearDown);
|
||||
Script.setTimeout(function () {
|
||||
|
|
|
@ -1930,7 +1930,7 @@
|
|||
function setUp() {
|
||||
var hasRezPermissions;
|
||||
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
if (!tablet) {
|
||||
App.log("ERROR: Tablet not found! App not started.");
|
||||
return;
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
icon: ICONS.icon,
|
||||
activeIcon: ICONS.activeIcon,
|
||||
|
|
|
@ -188,7 +188,7 @@
|
|||
// -tablet: The tablet instance to be modified.
|
||||
var tablet = null;
|
||||
function startup() {
|
||||
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
addOrRemoveButton(false, HMD.active);
|
||||
tablet.screenChanged.connect(onTabletScreenChanged);
|
||||
Window.domainChanged.connect(onDomainChanged);
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
var isRaiseHandButtonActive = false;
|
||||
var animHandlerId;
|
||||
|
||||
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
|
||||
var button = tablet.addButton({
|
||||
text: BUTTON_NAME,
|
||||
icon: "icons/tablet-icons/raise-hand-i.svg",
|
||||
|
|
Loading…
Reference in a new issue