Reverting tablet API rename, cleaning up duplicated code

This commit is contained in:
Brad Davis 2017-11-15 11:50:11 -08:00
parent 64592d66d7
commit 1167be4102
73 changed files with 100 additions and 105 deletions

View file

@ -29,12 +29,12 @@ Original.Button {
onHoveredChanged: { onHoveredChanged: {
if (hovered) { if (hovered) {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
} }
} }
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
style: ButtonStyle { style: ButtonStyle {

View file

@ -31,12 +31,12 @@ Original.CheckBox {
activeFocusOnPress: true activeFocusOnPress: true
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
// TODO: doesnt works for QQC1. check with QQC2 // TODO: doesnt works for QQC1. check with QQC2
// onHovered: { // onHovered: {
// Tablets.playSound(TabletEnums.ButtonHover); // Tablet.playSound(TabletEnums.ButtonHover);
// } // }
style: CheckBoxStyle { style: CheckBoxStyle {

View file

@ -36,12 +36,12 @@ CheckBox {
hoverEnabled: true hoverEnabled: true
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
onHoveredChanged: { onHoveredChanged: {
if (hovered) { if (hovered) {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
} }
} }

View file

@ -27,12 +27,12 @@ Original.Button {
onHoveredChanged: { onHoveredChanged: {
if (hovered) { if (hovered) {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
} }
} }
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
style: ButtonStyle { style: ButtonStyle {

View file

@ -35,13 +35,13 @@ Item {
onContainsMouseChanged: { onContainsMouseChanged: {
if (containsMouse) { if (containsMouse) {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
} }
} }
onClicked: { onClicked: {
mouse.accepted = true; mouse.accepted = true;
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
webEntity.synthesizeKeyPress(glyph); webEntity.synthesizeKeyPress(glyph);
webEntity.synthesizeKeyPress(glyph, mirrorText); webEntity.synthesizeKeyPress(glyph, mirrorText);

View file

@ -30,12 +30,12 @@ Original.RadioButton {
readonly property int checkRadius: 2 readonly property int checkRadius: 2
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
// TODO: doesnt works for QQC1. check with QQC2 // TODO: doesnt works for QQC1. check with QQC2
// onHovered: { // onHovered: {
// Tablets.playSound(TabletEnums.ButtonHover); // Tablet.playSound(TabletEnums.ButtonHover);
// } // }
style: RadioButtonStyle { style: RadioButtonStyle {

View file

@ -24,7 +24,7 @@ Item {
}); });
object.selected.connect(function(button) { object.selected.connect(function(button) {
if (button === OriginalDialogs.StandardButton.Ok) { 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() tablet.gotoHomeScreen()
} }
}); });

View file

@ -89,10 +89,10 @@ TabletModalWindow {
//bodyLoader.active = false //bodyLoader.active = false
} }
if (gotoPreviousApp) { if (gotoPreviousApp) {
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
tablet.returnToPreviousApp(); tablet.returnToPreviousApp();
} else { } else {
Tablets.getTablet("com.highfidelity.interface.tablet.system").gotoHomeScreen(); Tablet.getTablet("com.highfidelity.interface.tablet.system").gotoHomeScreen();
} }
} }

View file

@ -25,13 +25,13 @@ Preference {
id: button id: button
onHoveredChanged: { onHoveredChanged: {
if (hovered) { if (hovered) {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
} }
} }
onClicked: { onClicked: {
preference.trigger(); preference.trigger();
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
width: 180 width: 180
anchors.bottom: parent.bottom anchors.bottom: parent.bottom

View file

@ -41,12 +41,12 @@ Preference {
id: checkBox id: checkBox
onHoveredChanged: { onHoveredChanged: {
if (hovered) { if (hovered) {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
} }
} }
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
anchors { anchors {

View file

@ -246,12 +246,12 @@ Item {
anchors.fill: parent; anchors.fill: parent;
acceptedButtons: Qt.LeftButton; acceptedButtons: Qt.LeftButton;
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
goFunction("hifi://" + hifiUrl); goFunction("hifi://" + hifiUrl);
} }
hoverEnabled: true; hoverEnabled: true;
onEntered: { onEntered: {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
hoverThunk(); hoverThunk();
} }
onExited: unhoverThunk(); onExited: unhoverThunk();
@ -269,7 +269,7 @@ Item {
} }
} }
function go() { function go() {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
goFunction(drillDownToPlace ? ("/places/" + placeName) : ("/user_stories/" + storyId)); goFunction(drillDownToPlace ? ("/places/" + placeName) : ("/user_stories/" + storyId));
} }
MouseArea { MouseArea {

View file

@ -45,7 +45,7 @@ OriginalDesktop.Desktop {
Toolbar { Toolbar {
id: sysToolbar; id: sysToolbar;
objectName: "com.highfidelity.interface.toolbar.system"; 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; 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. // Literal 50 is overwritten by settings from previous session, and sysToolbar.x comes from settings when not constrained.
x: sysToolbar.x x: sysToolbar.x

View file

@ -61,12 +61,12 @@ Rectangle {
scrollGestureEnabled: false; scrollGestureEnabled: false;
onClicked: { onClicked: {
Audio.muted = !Audio.muted; Audio.muted = !Audio.muted;
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
drag.target: dragTarget; drag.target: dragTarget;
onContainsMouseChanged: { onContainsMouseChanged: {
if (containsMouse) { if (containsMouse) {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
} }
} }
} }

View file

@ -123,11 +123,11 @@ Item {
hoverEnabled: true hoverEnabled: true
enabled: true enabled: true
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
newEntityButton.clicked(); newEntityButton.clicked();
} }
onEntered: { onEntered: {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
newEntityButton.state = "hover state"; newEntityButton.state = "hover state";
} }
onExited: { onExited: {

View file

@ -72,7 +72,7 @@ StackView {
addressLine.focus = !HMD.active; addressLine.focus = !HMD.active;
root.parentChanged.connect(center); root.parentChanged.connect(center);
center(); center();
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
} }
Component.onDestruction: { Component.onDestruction: {
root.parentChanged.disconnect(center); root.parentChanged.disconnect(center);
@ -149,7 +149,7 @@ StackView {
onClicked: { onClicked: {
addressBarDialog.loadHome(); addressBarDialog.loadHome();
tabletRoot.shown = false; tabletRoot.shown = false;
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
tablet.gotoHomeScreen(); tablet.gotoHomeScreen();
} }
anchors { anchors {

View file

@ -37,7 +37,7 @@ Item {
} }
function closeDialog() { 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. anchors.topMargin: hifi.dimensions.tabletMenuHeader // Space for header.

View file

@ -130,12 +130,12 @@ Item {
} }
tabletButton.clicked(); tabletButton.clicked();
if (tabletRoot) { if (tabletRoot) {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
} }
} }
onEntered: { onEntered: {
tabletButton.isEntered = true; tabletButton.isEntered = true;
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
if (tabletButton.isActive) { if (tabletButton.isActive) {
tabletButton.state = "hover active state"; tabletButton.state = "hover active state";

View file

@ -9,7 +9,7 @@ import "../audio" as HifiAudio
Item { Item {
id: tablet id: tablet
objectName: "tablet" objectName: "tablet"
property var tabletProxy: Tablets.getTablet("com.highfidelity.interface.tablet.system"); property var tabletProxy: Tablet.getTablet("com.highfidelity.interface.tablet.system");
Rectangle { Rectangle {
id: bgTopBar id: bgTopBar

View file

@ -77,12 +77,12 @@ FocusScope {
anchors.fill: parent anchors.fill: parent
hoverEnabled: true hoverEnabled: true
onEntered: { onEntered: {
Tablets.playSound(TabletEnums.ButtonHover); Tablet.playSound(TabletEnums.ButtonHover);
listView.currentIndex = index listView.currentIndex = index
} }
onClicked: { onClicked: {
Tablets.playSound(TabletEnums.ButtonClick); Tablet.playSound(TabletEnums.ButtonClick);
root.selected(item); root.selected(item);
} }
} }

View file

@ -56,7 +56,7 @@ Item {
} }
function closeDialog() { function closeDialog() {
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
if (gotoPreviousApp) { if (gotoPreviousApp) {
tablet.returnToPreviousApp(); tablet.returnToPreviousApp();
@ -206,7 +206,7 @@ Item {
} }
Component.onCompleted: { Component.onCompleted: {
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
keyboardEnabled = HMD.active; keyboardEnabled = HMD.active;
} }

View file

@ -5833,10 +5833,9 @@ void Application::registerScriptEngineWithApplicationServices(ScriptEnginePointe
qScriptRegisterMetaType(scriptEngine.data(), wrapperToScriptValue<TabletProxy>, wrapperFromScriptValue<TabletProxy>); qScriptRegisterMetaType(scriptEngine.data(), wrapperToScriptValue<TabletProxy>, wrapperFromScriptValue<TabletProxy>);
qScriptRegisterMetaType(scriptEngine.data(), qScriptRegisterMetaType(scriptEngine.data(),
wrapperToScriptValue<TabletButtonProxy>, wrapperFromScriptValue<TabletButtonProxy>); 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 // FIXME remove these deprecated names for the tablet scripting interface
scriptEngine->registerGlobalObject("tabletInterface", DependencyManager::get<TabletScriptingInterface>().data()); scriptEngine->registerGlobalObject("tabletInterface", DependencyManager::get<TabletScriptingInterface>().data());
scriptEngine->registerGlobalObject("Tablet", DependencyManager::get<TabletScriptingInterface>().data());
auto toolbarScriptingInterface = DependencyManager::get<ToolbarScriptingInterface>().data(); auto toolbarScriptingInterface = DependencyManager::get<ToolbarScriptingInterface>().data();
DependencyManager::get<TabletScriptingInterface>().data()->setToolbarScriptingInterface(toolbarScriptingInterface); DependencyManager::get<TabletScriptingInterface>().data()->setToolbarScriptingInterface(toolbarScriptingInterface);

View file

@ -105,12 +105,6 @@ void OffscreenUi::create() {
myContext->setContextProperty("OffscreenUi", this); myContext->setContextProperty("OffscreenUi", this);
myContext->setContextProperty("offscreenFlags", offscreenFlags = new OffscreenFlags()); myContext->setContextProperty("offscreenFlags", offscreenFlags = new OffscreenFlags());
myContext->setContextProperty("fileDialogHelper", new FileDialogHelper()); 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) { void OffscreenUi::show(const QUrl& url, const QString& name, std::function<void(QQmlContext*, QObject*)> f) {

View file

@ -391,8 +391,10 @@ void initializeQmlEngine(QQmlEngine* engine, QQuickWindow* window) {
qRegisterMetaType<TabletProxy*>(); qRegisterMetaType<TabletProxy*>();
qRegisterMetaType<TabletButtonProxy*>(); qRegisterMetaType<TabletButtonProxy*>();
}); });
rootContext->setContextProperty("Tablets", DependencyManager::get<TabletScriptingInterface>().data()); rootContext->setContextProperty("Tablet", DependencyManager::get<TabletScriptingInterface>().data());
rootContext->setContextProperty("Toolbars", DependencyManager::get<ToolbarScriptingInterface>().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) { QQmlEngine* acquireEngine(QQuickWindow* window) {

View file

@ -227,7 +227,7 @@
} }
function setUp() { function setUp() {
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
if (!tablet) { if (!tablet) {
return; return;
} }

View file

@ -10,7 +10,7 @@
var recording = false; var recording = false;
var onRecordingScreen = false; var onRecordingScreen = false;
var passedSaveDirectory = 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({ var button = tablet.addButton({
text: "IRecord" text: "IRecord"
}); });

View file

@ -18,7 +18,7 @@
var DYNAMICS_TESTS_URL = Script.resolvePath("dynamics-tests.html"); var DYNAMICS_TESTS_URL = Script.resolvePath("dynamics-tests.html");
var DEFAULT_LIFETIME = 120; // seconds 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({ var button = tablet.addButton({
icon: Script.resolvePath("dynamicsTests.svg"), icon: Script.resolvePath("dynamicsTests.svg"),

View file

@ -19,7 +19,7 @@ Script.include("/~/system/libraries/Xform.js");
var TABLET_BUTTON_NAME = "PUCKTACH"; var TABLET_BUTTON_NAME = "PUCKTACH";
var TABLET_APP_URL = "https://hifi-content.s3.amazonaws.com/seefo/production/puck-attach/puck-attach.html"; 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({ var tabletButton = tablet.addButton({
text: TABLET_BUTTON_NAME, text: TABLET_BUTTON_NAME,
icon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-i.svg", icon: "https://s3.amazonaws.com/hifi-public/tony/icons/puck-i.svg",

View file

@ -1,6 +1,6 @@
(function () { (function () {
var HTML_URL = Script.resolvePath("sliderTest.html"); 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({ var button = tablet.addButton({
text: "SLIDER" text: "SLIDER"
}); });

View file

@ -14,7 +14,7 @@
/* globals Tablets */ /* globals Tablets */
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var tabletButton = tablet.addButton({ var tabletButton = tablet.addButton({
text: "SOUNDS", text: "SOUNDS",
icon: "http://s3.amazonaws.com/hifi-public/tony/icons/trombone-i.png", icon: "http://s3.amazonaws.com/hifi-public/tony/icons/trombone-i.png",

View file

@ -10,7 +10,7 @@
// Adds a BAM! button to the tablet ui. // 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({ var button = tablet.addButton({
text: "BAM!!!" text: "BAM!!!"
}); });

View file

@ -10,7 +10,7 @@
// //
if (HMD.active && !Settings.getValue("HUDUIEnabled")) { 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"); var qml = Script.resolvePath("TabletStats.qml");
tablet.loadQMLSource(qml); tablet.loadQMLSource(qml);
Script.stop(); Script.stop();

View file

@ -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({ var button = tablet.addButton({
text: TABLET_BUTTON_NAME, text: TABLET_BUTTON_NAME,
icon: ICON_URL, icon: ICON_URL,

View file

@ -16,7 +16,7 @@
var MODEL_BOUNDING_BOX_DIMENSIONS = {x: 1.0174,y: 1.1925,z: 1.0165}; var MODEL_BOUNDING_BOX_DIMENSIONS = {x: 1.0174,y: 1.1925,z: 1.0165};
var PhotoBooth = {}; var PhotoBooth = {};
var photoboothCreated = false; 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({ var button = tablet.addButton({
icon: "icons/tablet-icons/snap-i.svg", icon: "icons/tablet-icons/snap-i.svg",
text: "PHOTOBOOTH" text: "PHOTOBOOTH"

View file

@ -54,7 +54,7 @@ function onScreenChanged(type, url) {
button.editProperties({isActive: onAudioScreen}); 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({ var button = tablet.addButton({
icon: Audio.muted ? MUTE_ICONS.icon : UNMUTE_ICONS.icon, icon: Audio.muted ? MUTE_ICONS.icon : UNMUTE_ICONS.icon,
activeIcon: Audio.muted ? MUTE_ICONS.activeIcon : UNMUTE_ICONS.activeIcon, activeIcon: Audio.muted ? MUTE_ICONS.activeIcon : UNMUTE_ICONS.activeIcon,

View file

@ -17,7 +17,7 @@
var scopePaused = AudioScope.getPause(); var scopePaused = AudioScope.getPause();
var autoPause = false; 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({ var showScopeButton = tablet.addButton({
icon: "icons/tablet-icons/scope.svg", icon: "icons/tablet-icons/scope.svg",
text: "Audio Scope", text: "Audio Scope",

View file

@ -183,7 +183,7 @@
// Setup the bubble button // Setup the bubble button
var buttonName = "BUBBLE"; var buttonName = "BUBBLE";
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
button = tablet.addButton({ button = tablet.addButton({
icon: "icons/tablet-icons/bubble-i.svg", icon: "icons/tablet-icons/bubble-i.svg",
activeIcon: "icons/tablet-icons/bubble-a.svg", activeIcon: "icons/tablet-icons/bubble-a.svg",

View file

@ -19,7 +19,7 @@
var tabletButtonIcon = "icons/tablet-icons/menu-i.svg"; // Icon for chat button. 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 tabletButtonActiveIcon = "icons/tablet-icons/menu-a.svg"; // Active icon for chat button.
var tabletButton = null; // The button we create in the tablet. 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 chatLog = []; // Array of chat messages in the form of [avatarID, displayName, message, data].
var avatarIdentifiers = {}; // Map of avatar ids to dict of identifierParams. var avatarIdentifiers = {}; // Map of avatar ids to dict of identifierParams.
var speechBubbleShowing = false; // Is the speech bubble visible? var speechBubbleShowing = false; // Is the speech bubble visible?

View file

@ -148,7 +148,7 @@
var walletEnabled = Settings.getValue("commerce", false); var walletEnabled = Settings.getValue("commerce", false);
function startup() { function startup() {
if (walletEnabled) { if (walletEnabled) {
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
button = tablet.addButton({ button = tablet.addButton({
text: buttonName, text: buttonName,
icon: "icons/tablet-icons/wallet-i.svg", icon: "icons/tablet-icons/wallet-i.svg",

View file

@ -81,7 +81,7 @@ function endGodView() {
} }
var button; var button;
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
function onClicked() { function onClicked() {
if (godView) { if (godView) {

View file

@ -390,7 +390,7 @@ var toolBar = (function () {
} }
function fromQml(message) { // messages are {method, params}, like json-rpc. See also sendToQml. 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(); tablet.popFromStack();
switch (message.method) { switch (message.method) {
case "newModelDialogAdd": case "newModelDialogAdd":
@ -417,7 +417,7 @@ var toolBar = (function () {
var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp() || Entities.canRezCertified() || Entities.canRezTmpCertified()); var hasRezPermissions = (Entities.canRez() || Entities.canRezTmp() || Entities.canRezCertified() || Entities.canRezTmpCertified());
var createButtonIconRsrc = (hasRezPermissions ? CREATE_ENABLED_ICON : CREATE_DISABLED_ICON); 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({ activeButton = tablet.addButton({
captionColorOverride: hasRezPermissions ? "" : "#888888", captionColorOverride: hasRezPermissions ? "" : "#888888",
icon: createButtonIconRsrc, icon: createButtonIconRsrc,
@ -463,7 +463,7 @@ var toolBar = (function () {
var SHAPE_TYPE_DEFAULT = SHAPE_TYPE_STATIC_MESH; var SHAPE_TYPE_DEFAULT = SHAPE_TYPE_STATIC_MESH;
// tablet version of new-model dialog // 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"); tablet.pushOntoStack("NewModelDialog.qml");
}); });
@ -644,7 +644,7 @@ var toolBar = (function () {
isActive = active; isActive = active;
activeButton.editProperties({isActive: isActive}); activeButton.editProperties({isActive: isActive});
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
if (!isActive) { if (!isActive) {
entityListTool.setVisible(false); entityListTool.setVisible(false);
@ -1850,7 +1850,7 @@ var PropertiesTool = function (opts) {
var that = {}; var that = {};
var webView = null; var webView = null;
webView = Tablets.getTablet("com.highfidelity.interface.tablet.system"); webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");
webView.setVisible = function(value) {}; webView.setVisible = function(value) {};
var visible = false; var visible = false;
@ -2293,7 +2293,7 @@ function selectParticleEntity(entityID) {
particleExplorerTool.webView.emitScriptEvent(JSON.stringify(particleData)); particleExplorerTool.webView.emitScriptEvent(JSON.stringify(particleData));
// Switch to particle explorer // 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'}}); tablet.sendToQml({method: 'selectTab', params: {id: 'particle'}});
} }

View file

@ -414,7 +414,7 @@
} }
function setUp() { function setUp() {
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
if (!tablet) { if (!tablet) {
return; return;
} }

View file

@ -34,7 +34,7 @@
alpha: 0.9 alpha: 0.9
}); });
} else { } else {
tablet = Tablets.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,

View file

@ -37,7 +37,7 @@ if (Settings.getValue("HUDUIEnabled")) {
alpha: 0.9 alpha: 0.9
}); });
} else { } else {
tablet = Tablets.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",
activeIcon: "icons/tablet-icons/goto-a.svg", activeIcon: "icons/tablet-icons/goto-a.svg",

View file

@ -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 HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
var buttonName = "HELP"; var buttonName = "HELP";
var onHelpScreen = false; 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({ var button = tablet.addButton({
icon: "icons/tablet-icons/help-i.svg", icon: "icons/tablet-icons/help-i.svg",
activeIcon: "icons/tablet-icons/help-a.svg", activeIcon: "icons/tablet-icons/help-a.svg",

View file

@ -38,7 +38,7 @@ function updateControllerDisplay() {
} }
var button; 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. // Independent and Entity mode make people sick; disable them in hmd.
var desktopOnlyViews = ['Independent Mode', 'Entity Mode']; var desktopOnlyViews = ['Independent Mode', 'Entity Mode'];

View file

@ -168,7 +168,7 @@ WebTablet = function (url, width, dpi, hand, clientOnly, location, visible) {
this.receive = function (channel, senderID, senderUUID, localOnly) { this.receive = function (channel, senderID, senderUUID, localOnly) {
if (_this.homeButtonID == senderID) { 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 onHomeScreen = tablet.onHomeScreen();
var isMessageOpen; var isMessageOpen;
if (onHomeScreen) { if (onHomeScreen) {
@ -513,7 +513,7 @@ WebTablet.prototype.mousePressEvent = function (event) {
entityPickResults.overlayID === this.tabletEntityID)) { entityPickResults.overlayID === this.tabletEntityID)) {
var overlayPickResults = Overlays.findRayIntersection(pickRay, true, [this.webOverlayID, this.homeButtonID], []); var overlayPickResults = Overlays.findRayIntersection(pickRay, true, [this.webOverlayID, this.homeButtonID], []);
if (overlayPickResults.intersects && overlayPickResults.overlayID === 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 onHomeScreen = tablet.onHomeScreen();
var isMessageOpen = tablet.isMessageDialogOpen(); var isMessageOpen = tablet.isMessageDialogOpen();
if (onHomeScreen) { if (onHomeScreen) {

View file

@ -15,7 +15,7 @@ EntityListTool = function(opts) {
var that = {}; var that = {};
var webView = null; var webView = null;
webView = Tablets.getTablet("com.highfidelity.interface.tablet.system"); webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");
webView.setVisible = function(value) {}; webView.setVisible = function(value) {};
var filterInView = false; var filterInView = false;

View file

@ -237,7 +237,7 @@ GridTool = function(opts) {
var listeners = []; var listeners = [];
var webView = null; var webView = null;
webView = Tablets.getTablet("com.highfidelity.interface.tablet.system"); webView = Tablet.getTablet("com.highfidelity.interface.tablet.system");
webView.setVisible = function(value) {}; webView.setVisible = function(value) {};
horizontalGrid.addListener(function(data) { horizontalGrid.addListener(function(data) {

View file

@ -354,7 +354,7 @@ flatten = function(array) {
getTabletWidthFromSettings = function () { getTabletWidthFromSettings = function () {
var DEFAULT_TABLET_WIDTH = 0.4375; 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 toolbarMode = tablet.toolbarMode;
var DEFAULT_TABLET_SCALE = 100; var DEFAULT_TABLET_SCALE = 100;
var tabletScalePercentage = DEFAULT_TABLET_SCALE; var tabletScalePercentage = DEFAULT_TABLET_SCALE;

View file

@ -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({ var browseExamplesButton = tablet.addButton({
icon: "icons/tablet-icons/market-i.svg", icon: "icons/tablet-icons/market-i.svg",

View file

@ -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({ var marketplaceButton = tablet.addButton({
icon: "icons/tablet-icons/market-i.svg", icon: "icons/tablet-icons/market-i.svg",
activeIcon: "icons/tablet-icons/market-a.svg", activeIcon: "icons/tablet-icons/market-a.svg",

View file

@ -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"; // var HOME_BUTTON_TEXTURE = Script.resourcesPath() + "meshes/tablet-with-home-button.fbx/tablet-with-home-button.fbm/button-root.png";
(function() { (function() {
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var button = tablet.addButton({ var button = tablet.addButton({
icon: "icons/tablet-icons/menu-i.svg", icon: "icons/tablet-icons/menu-i.svg",
activeIcon: "icons/tablet-icons/menu-a.svg", activeIcon: "icons/tablet-icons/menu-a.svg",

View file

@ -18,7 +18,7 @@
Script.include("/~/system/libraries/controllers.js"); Script.include("/~/system/libraries/controllers.js");
// grab the toolbar // 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 ASSETS_PATH = Script.resolvePath("assets");
var TOOLS_PATH = Script.resolvePath("assets/images/tools/"); var TOOLS_PATH = Script.resolvePath("assets/images/tools/");

View file

@ -696,7 +696,7 @@
Window.announcement.connect(onNotify); Window.announcement.connect(onNotify);
Window.notifyEditError = onEditError; Window.notifyEditError = onEditError;
Window.notify = onNotify; Window.notify = onNotify;
Tablets.tabletNotification.connect(tabletNotification); Tablet.tabletNotification.connect(tabletNotification);
Wallet.walletNotSetup.connect(walletNotSetup); Wallet.walletNotSetup.connect(walletNotSetup);
Messages.subscribe(NOTIFICATIONS_MESSAGE_CHANNEL); Messages.subscribe(NOTIFICATIONS_MESSAGE_CHANNEL);

View file

@ -677,7 +677,7 @@ var buttonName = "PEOPLE";
var tablet = null; var tablet = null;
function startup() { function startup() {
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
button = tablet.addButton({ button = tablet.addButton({
text: buttonName, text: buttonName,
icon: "icons/tablet-icons/people-i.svg", icon: "icons/tablet-icons/people-i.svg",

View file

@ -17,7 +17,7 @@ var PARTICLE_EXPLORER_HTML_URL = Script.resolvePath('particleExplorer.html');
ParticleExplorerTool = function() { ParticleExplorerTool = function() {
var that = {}; var that = {};
that.createWebView = function() { 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.setVisible = function(value) {};
that.webView.webEventReceived.connect(that.webEventReceived); that.webView.webEventReceived.connect(that.webEventReceived);
} }

View file

@ -22,7 +22,7 @@ var clearOverlayWhenMoving;
var buttonName = "SNAP"; var buttonName = "SNAP";
var buttonConnected = false; 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({ var button = tablet.addButton({
icon: "icons/tablet-icons/snap-i.svg", icon: "icons/tablet-icons/snap-i.svg",
activeIcon: "icons/tablet-icons/snap-a.svg", activeIcon: "icons/tablet-icons/snap-a.svg",

View file

@ -30,7 +30,7 @@
var shouldActivateButton = false; var shouldActivateButton = false;
function ignore() { } 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_ICON = "icons/tablet-icons/goto-i.svg";
var NORMAL_ACTIVE = "icons/tablet-icons/goto-a.svg"; var NORMAL_ACTIVE = "icons/tablet-icons/goto-a.svg";
var WAITING_ICON = "icons/tablet-icons/goto-msg.svg"; var WAITING_ICON = "icons/tablet-icons/goto-msg.svg";

View file

@ -33,7 +33,7 @@
function checkTablet() { function checkTablet() {
if (gTablet === null) { 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 () { Script.scriptEnding.connect(function () {
// if we reload scripts in tablet mode make sure we close the currently open window, by calling gotoHomeScreen // 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) { if (tabletProxy && tabletProxy.toolbarMode) {
tabletProxy.gotoHomeScreen(); tabletProxy.gotoHomeScreen();
} }

View file

@ -33,7 +33,7 @@
GlobalServices.findableBy = myVisibility; 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({ 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",

View file

@ -26,7 +26,7 @@
APP_URL = APP_OUTDATED_URL; 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({ var button = tablet.addButton({
icon: APP_ICON, icon: APP_ICON,
activeIcon: APP_ICON_ACTIVE, activeIcon: APP_ICON_ACTIVE,

View file

@ -162,7 +162,7 @@ var globalState = {
function main() { function main() {
log('initializing...', VERSION); 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); button = tablet.addButton(BUTTON_CONFIG);
Script.scriptEnding.connect(function() { Script.scriptEnding.connect(function() {
@ -601,7 +601,7 @@ function _patchCameraModeSetting() {
} }
function getSystemMetadata() { function getSystemMetadata() {
var tablet = Tablets.getTablet('com.highfidelity.interface.tablet.system'); var tablet = Tablet.getTablet('com.highfidelity.interface.tablet.system');
return { return {
mode: { mode: {
hmd: HMD.active, hmd: HMD.active,

View file

@ -16,7 +16,7 @@
// Load up engine // Load up engine
var APP_NAME = "CLAP"; var APP_NAME = "CLAP";
var ClapEngine = Script.require(Script.resolvePath("scripts/ClapEngine.js?v9")); 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 // Define Menu
var blackIcon = Script.resolvePath("icons/tablet-icons/clap-a.svg?foxv2"); var blackIcon = Script.resolvePath("icons/tablet-icons/clap-a.svg?foxv2");

View file

@ -45,7 +45,7 @@ var buttonConfig = utils.assign({
activeIcon: require('./doppleganger-a.svg.json'), 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); button = tablet.addButton(buttonConfig);
Script.scriptEnding.connect(function() { Script.scriptEnding.connect(function() {

View file

@ -905,7 +905,7 @@ var buttonConfig = utils.assign({
activeIcon: __webpack_require__(7), 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); button = tablet.addButton(buttonConfig);
Script.scriptEnding.connect(function() { Script.scriptEnding.connect(function() {

View file

@ -12,7 +12,7 @@
var DopplegangerClass = Script.require('./doppleganger.js'); 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({ button = tablet.addButton({
icon: Script.resolvePath('./doppleganger-i.svg'), icon: Script.resolvePath('./doppleganger-i.svg'),
activeIcon: Script.resolvePath('./doppleganger-a.svg'), activeIcon: Script.resolvePath('./doppleganger-a.svg'),

View file

@ -19,7 +19,7 @@ var lib = Script.require("https://hifi-content.s3.amazonaws.com/elisalj/emoji_sc
var APP_NAME = "EMOJIS"; var APP_NAME = "EMOJIS";
var APP_URL = "https://hifi-content.s3.amazonaws.com/elisalj/emoji_scripts/emojiTabletUI.html?" + Date.now(); 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 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({ var button = tablet.addButton({
icon: APP_ICON, icon: APP_ICON,

View file

@ -17,7 +17,7 @@
var TRIGGER_PRESSURE = 0.95; 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({ var button = tablet.addButton({
icon: APP_ICON, icon: APP_ICON,

View file

@ -631,7 +631,7 @@
} }
function setUp() { function setUp() {
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
if (!tablet) { if (!tablet) {
return; 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: // 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(); //setUp();
//Script.scriptEnding.connect(tearDown); //Script.scriptEnding.connect(tearDown);
Script.setTimeout(function () { Script.setTimeout(function () {

View file

@ -1930,7 +1930,7 @@
function setUp() { function setUp() {
var hasRezPermissions; var hasRezPermissions;
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
if (!tablet) { if (!tablet) {
App.log("ERROR: Tablet not found! App not started."); App.log("ERROR: Tablet not found! App not started.");
return; return;

View file

@ -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({ var button = tablet.addButton({
icon: ICONS.icon, icon: ICONS.icon,
activeIcon: ICONS.activeIcon, activeIcon: ICONS.activeIcon,

View file

@ -188,7 +188,7 @@
// -tablet: The tablet instance to be modified. // -tablet: The tablet instance to be modified.
var tablet = null; var tablet = null;
function startup() { function startup() {
tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
addOrRemoveButton(false, HMD.active); addOrRemoveButton(false, HMD.active);
tablet.screenChanged.connect(onTabletScreenChanged); tablet.screenChanged.connect(onTabletScreenChanged);
Window.domainChanged.connect(onDomainChanged); Window.domainChanged.connect(onDomainChanged);

View file

@ -20,7 +20,7 @@
var isRaiseHandButtonActive = false; var isRaiseHandButtonActive = false;
var animHandlerId; var animHandlerId;
var tablet = Tablets.getTablet("com.highfidelity.interface.tablet.system"); var tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system");
var button = tablet.addButton({ var button = tablet.addButton({
text: BUTTON_NAME, text: BUTTON_NAME,
icon: "icons/tablet-icons/raise-hand-i.svg", icon: "icons/tablet-icons/raise-hand-i.svg",