Skip to content

Commit

Permalink
Fixed error when remoteCommand pause is without msg
Browse files Browse the repository at this point in the history
  • Loading branch information
shakty committed Jul 25, 2023
1 parent 920f759 commit 6217ef9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 52 deletions.
53 changes: 3 additions & 50 deletions build/nodegame-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -2968,23 +2968,6 @@

"use strict";

// var J = node.JSUS;

// function getElement(idOrObj, prefix) {
// var el;
// if ('string' === typeof idOrObj) {
// el = W.getElementById(idOrObj);
// }
// else if (J.isElement(idOrObj)) {
// el = idOrObj;
// }
// else {
// throw new TypeError(prefix + ': idOrObj must be string ' +
// ' or HTML Element.');
// }
// return el;
// }

var GameWindow = node.GameWindow;

/**
Expand All @@ -3009,37 +2992,6 @@
W.init(node.conf.window);
});

// node.on('HIDE', function(idOrObj) {
// var el;
// console.log('***GameWindow.on.HIDE is deprecated. Use ' +
// 'GameWindow.hide() instead.***');
// el = getElement(idOrObj, 'GameWindow.on.HIDE');
// if (el) el.style.display = 'none';
// });
//
// node.on('SHOW', function(idOrObj) {
// var el;
// console.log('***GameWindow.on.SHOW is deprecated. Use ' +
// 'GameWindow.show() instead.***');
// el = getElement(idOrObj, 'GameWindow.on.SHOW');
// if (el) el.style.display = '';
// });
//
// node.on('TOGGLE', function(idOrObj) {
// var el;
// console.log('***GameWindow.on.TOGGLE is deprecated. Use ' +
// 'GameWindow.toggle() instead.***');
// el = getElement(idOrObj, 'GameWindow.on.TOGGLE');
// if (el) {
// if (el.style.display === 'none') {
// el.style.display = '';
// }
// else {
// el.style.display = 'none';
// }
// }
// });

// Disable all the input forms found within a given id element.
node.on('INPUT_DISABLE', function(id) {
W.toggleInputs(id, true);
Expand Down Expand Up @@ -3179,7 +3131,9 @@
}

function event_PAUSED(text) {
text = text || W.waitScreen.defaultTexts.paused;
// Ignores non-string parameters.
text = 'string' === typeof text ?
text : W.waitScreen.defaultTexts.paused;
if (W.isScreenLocked()) {
W.waitScreen.beforePauseInnerHTML =
W.waitScreen.contentDiv.innerHTML;
Expand Down Expand Up @@ -4541,7 +4495,6 @@
};

GameWindow.prototype.setInnerHTML = function(search, replace, mod) {
// console.log('***deprecated: use W.html instead of W.setInnerHTML');
this.html(search, replace, mod);
};

Expand Down
2 changes: 1 addition & 1 deletion build/nodegame-window.min.js

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion lib/WaitScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@
}

function event_PAUSED(text) {
text = text || W.waitScreen.defaultTexts.paused;
// Ignores non-string parameters.
text = 'string' === typeof text ?
text : W.waitScreen.defaultTexts.paused;
if (W.isScreenLocked()) {
W.waitScreen.beforePauseInnerHTML =
W.waitScreen.contentDiv.innerHTML;
Expand Down

0 comments on commit 6217ef9

Please sign in to comment.