mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-08 23:12:16 +02:00
Tidying
This commit is contained in:
parent
2456fd0e99
commit
fc78d0582e
4 changed files with 3 additions and 34 deletions
Before Width: | Height: | Size: 3.9 KiB After Width: | Height: | Size: 3.9 KiB |
|
@ -32,7 +32,6 @@
|
|||
// Work around buttons staying hovered when mini tablet is replaced by tablet proper then subsequently redisplayed.
|
||||
isUnhover = true;
|
||||
|
||||
// #region Utilites ========================================================================================================
|
||||
|
||||
function setUnhover() {
|
||||
if (!isUnhover) {
|
||||
|
@ -50,9 +49,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Communications ==================================================================================================
|
||||
|
||||
function onScriptEventReceived(data) {
|
||||
var message;
|
||||
|
@ -127,9 +123,6 @@
|
|||
EventBridge.scriptEventReceived.disconnect(onScriptEventReceived);
|
||||
}
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Set-up and tear-down ============================================================================================
|
||||
|
||||
function onUnload() {
|
||||
disconnectEventBridge();
|
||||
|
@ -161,6 +154,4 @@
|
|||
|
||||
onLoad();
|
||||
|
||||
// #endregion
|
||||
|
||||
}());
|
||||
|
|
|
@ -24,7 +24,7 @@ See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.
|
|||
<img id="goto-img" />
|
||||
</div>
|
||||
<div id="expand" class="button">
|
||||
<img src="../assets/images/expand.svg" />
|
||||
<img src="./img/expand.svg" />
|
||||
</div>
|
||||
</section>
|
||||
<script src="js/miniTablet.js"></script>
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
tablet = Tablet.getTablet("com.highfidelity.interface.tablet.system"),
|
||||
DEBUG = false;
|
||||
|
||||
// #region Utilities =======================================================================================================
|
||||
|
||||
function debug(message) {
|
||||
if (!DEBUG) {
|
||||
|
@ -75,9 +74,6 @@
|
|||
return hand === LEFT_HAND ? RIGHT_HAND : LEFT_HAND;
|
||||
}
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region UI ==============================================================================================================
|
||||
|
||||
UI = function () {
|
||||
|
||||
|
@ -511,9 +507,6 @@
|
|||
|
||||
};
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region State Machine ===================================================================================================
|
||||
|
||||
State = function () {
|
||||
|
||||
|
@ -535,8 +528,6 @@
|
|||
STATE_MACHINE,
|
||||
miniState = MINI_DISABLED,
|
||||
miniHand,
|
||||
updateTimer = null,
|
||||
UPDATE_INTERVAL = 25,
|
||||
|
||||
// Mini tablet scaling.
|
||||
MINI_SCALE_DURATION = 250,
|
||||
|
@ -572,10 +563,7 @@
|
|||
|
||||
function enterMiniDisabled() {
|
||||
// Stop updates.
|
||||
if (updateTimer !== null) {
|
||||
Script.clearTimeout(updateTimer);
|
||||
updateTimer = null;
|
||||
}
|
||||
Script.update.disconnect(updateState);
|
||||
|
||||
// Stop monitoring mute changes.
|
||||
Audio.mutedChanged.disconnect(ui.updateMutedStatus);
|
||||
|
@ -593,7 +581,7 @@
|
|||
Audio.mutedChanged.connect(ui.updateMutedStatus);
|
||||
|
||||
// Start updates.
|
||||
updateTimer = Script.setTimeout(updateState, UPDATE_INTERVAL);
|
||||
Script.update.connect(updateState);
|
||||
}
|
||||
|
||||
function shouldShowMini(hand) {
|
||||
|
@ -943,7 +931,6 @@
|
|||
if (STATE_MACHINE[STATE_STRINGS[miniState]].update) {
|
||||
STATE_MACHINE[STATE_STRINGS[miniState]].update();
|
||||
}
|
||||
updateTimer = Script.setTimeout(updateState, UPDATE_INTERVAL);
|
||||
}
|
||||
|
||||
function create() {
|
||||
|
@ -966,7 +953,6 @@
|
|||
MINI_VISIBLE: MINI_VISIBLE,
|
||||
MINI_EXPANDING: MINI_EXPANDING,
|
||||
TABLET_OPEN: TABLET_OPEN,
|
||||
updateState: updateState,
|
||||
setState: setState,
|
||||
getState: getState,
|
||||
getHand: getHand,
|
||||
|
@ -974,9 +960,6 @@
|
|||
};
|
||||
};
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region External Events =================================================================================================
|
||||
|
||||
function onMessageReceived(channel, data, senderID, localOnly) {
|
||||
var message,
|
||||
|
@ -1021,9 +1004,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
// #endregion
|
||||
|
||||
// #region Set-up and tear-down ============================================================================================
|
||||
|
||||
function setUp() {
|
||||
miniState = new State();
|
||||
|
@ -1054,6 +1034,4 @@
|
|||
setUp();
|
||||
Script.scriptEnding.connect(tearDown);
|
||||
|
||||
// #endregion
|
||||
|
||||
}());
|
||||
|
|
Loading…
Reference in a new issue