mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-08 22:47:49 +02:00
Lint: White space
This commit is contained in:
parent
5a621ba015
commit
e35c6be45e
1 changed files with 64 additions and 62 deletions
|
@ -58,7 +58,6 @@
|
|||
// createNotification(welcome);
|
||||
// }
|
||||
|
||||
|
||||
var width = 340.0; //width of notification overlay
|
||||
var height = 40.0; // height of a single line notification overlay
|
||||
var windowDimensions = Controller.getViewportDimensions(); // get the size of the interface window
|
||||
|
@ -142,14 +141,12 @@ function createNotification(text) {
|
|||
};
|
||||
|
||||
Notify(overlayProperties, buttonProperties, height);
|
||||
|
||||
}
|
||||
|
||||
// Pushes data to each array and sets up data for 2nd dimension array
|
||||
// to handle auxiliary data not carried by the overlay class
|
||||
// specifically notification "heights", "times" of creation, and .
|
||||
function Notify(notice, button, height) {
|
||||
|
||||
notifications.push((Overlays.addOverlay("text", notice)));
|
||||
buttons.push((Overlays.addOverlay("image", button)));
|
||||
times.push(new Date().getTime() / 1000);
|
||||
|
@ -181,6 +178,7 @@ function fadeIn(noticeIn, buttonIn) {
|
|||
function createArrays(notice, button, createTime, height, myAlpha) {
|
||||
arrays.push([notice, button, createTime, height, myAlpha]);
|
||||
}
|
||||
|
||||
// handles mouse clicks on buttons
|
||||
function mousePressEvent(event) {
|
||||
var clickedOverlay = Overlays.getOverlayAtPoint({x: event.x, y: event.y}); //identify which overlay was clicked
|
||||
|
@ -210,6 +208,7 @@ function keyPressEvent(key) {
|
|||
if (key.key == 16777249) {
|
||||
ctrlIsPressed = true;
|
||||
}
|
||||
|
||||
if (key.text == "q") { //queries number of users online
|
||||
var numUsers = GlobalServices.onlineUsers.length;
|
||||
var welcome = "There are " + numUsers + " users online now.";
|
||||
|
@ -229,6 +228,7 @@ function wordWrap(str) {
|
|||
var result = stringDivider(str, 43.0, "\n");
|
||||
createNotification(result);
|
||||
}
|
||||
|
||||
// wraps whole word to newline
|
||||
function stringDivider(str, slotWidth, spaceReplacer) {
|
||||
if (str.length > slotWidth) {
|
||||
|
@ -265,12 +265,14 @@ function onOnlineUsersChanged(users) {
|
|||
createNotification(users[user] + " has joined");
|
||||
}
|
||||
}
|
||||
|
||||
for (user in last_users) {
|
||||
if (users.indexOf(last_users[user]) == -1.0) {
|
||||
createNotification(last_users[user] + " has left");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
last_users = users;
|
||||
}
|
||||
|
||||
|
@ -283,6 +285,7 @@ function onIncomingMessage(user, message) {
|
|||
wordWrap(thisAlert);
|
||||
}
|
||||
}
|
||||
|
||||
// Triggers mic mute notification
|
||||
function onMuteStateChanged() {
|
||||
var muteState = AudioDevice.getMuted() ? "muted" : "unmuted";
|
||||
|
@ -378,7 +381,6 @@ function isStartingUp() {
|
|||
return startingUp;
|
||||
}
|
||||
|
||||
|
||||
AudioDevice.muteToggled.connect(onMuteStateChanged);
|
||||
Controller.keyPressEvent.connect(keyPressEvent);
|
||||
Controller.mousePressEvent.connect(mousePressEvent);
|
||||
|
|
Loading…
Reference in a new issue