|
2968 | 2968 |
|
2969 | 2969 | "use strict";
|
2970 | 2970 |
|
2971 |
| - // var J = node.JSUS; |
2972 |
| - |
2973 |
| - // function getElement(idOrObj, prefix) { |
2974 |
| - // var el; |
2975 |
| - // if ('string' === typeof idOrObj) { |
2976 |
| - // el = W.getElementById(idOrObj); |
2977 |
| - // } |
2978 |
| - // else if (J.isElement(idOrObj)) { |
2979 |
| - // el = idOrObj; |
2980 |
| - // } |
2981 |
| - // else { |
2982 |
| - // throw new TypeError(prefix + ': idOrObj must be string ' + |
2983 |
| - // ' or HTML Element.'); |
2984 |
| - // } |
2985 |
| - // return el; |
2986 |
| - // } |
2987 |
| - |
2988 | 2971 | var GameWindow = node.GameWindow;
|
2989 | 2972 |
|
2990 | 2973 | /**
|
|
3009 | 2992 | W.init(node.conf.window);
|
3010 | 2993 | });
|
3011 | 2994 |
|
3012 |
| -// node.on('HIDE', function(idOrObj) { |
3013 |
| -// var el; |
3014 |
| -// console.log('***GameWindow.on.HIDE is deprecated. Use ' + |
3015 |
| -// 'GameWindow.hide() instead.***'); |
3016 |
| -// el = getElement(idOrObj, 'GameWindow.on.HIDE'); |
3017 |
| -// if (el) el.style.display = 'none'; |
3018 |
| -// }); |
3019 |
| -// |
3020 |
| -// node.on('SHOW', function(idOrObj) { |
3021 |
| -// var el; |
3022 |
| -// console.log('***GameWindow.on.SHOW is deprecated. Use ' + |
3023 |
| -// 'GameWindow.show() instead.***'); |
3024 |
| -// el = getElement(idOrObj, 'GameWindow.on.SHOW'); |
3025 |
| -// if (el) el.style.display = ''; |
3026 |
| -// }); |
3027 |
| -// |
3028 |
| -// node.on('TOGGLE', function(idOrObj) { |
3029 |
| -// var el; |
3030 |
| -// console.log('***GameWindow.on.TOGGLE is deprecated. Use ' + |
3031 |
| -// 'GameWindow.toggle() instead.***'); |
3032 |
| -// el = getElement(idOrObj, 'GameWindow.on.TOGGLE'); |
3033 |
| -// if (el) { |
3034 |
| -// if (el.style.display === 'none') { |
3035 |
| -// el.style.display = ''; |
3036 |
| -// } |
3037 |
| -// else { |
3038 |
| -// el.style.display = 'none'; |
3039 |
| -// } |
3040 |
| -// } |
3041 |
| -// }); |
3042 |
| - |
3043 | 2995 | // Disable all the input forms found within a given id element.
|
3044 | 2996 | node.on('INPUT_DISABLE', function(id) {
|
3045 | 2997 | W.toggleInputs(id, true);
|
|
3179 | 3131 | }
|
3180 | 3132 |
|
3181 | 3133 | function event_PAUSED(text) {
|
3182 |
| - text = text || W.waitScreen.defaultTexts.paused; |
| 3134 | + // Ignores non-string parameters. |
| 3135 | + text = 'string' === typeof text ? |
| 3136 | + text : W.waitScreen.defaultTexts.paused; |
3183 | 3137 | if (W.isScreenLocked()) {
|
3184 | 3138 | W.waitScreen.beforePauseInnerHTML =
|
3185 | 3139 | W.waitScreen.contentDiv.innerHTML;
|
|
4541 | 4495 | };
|
4542 | 4496 |
|
4543 | 4497 | GameWindow.prototype.setInnerHTML = function(search, replace, mod) {
|
4544 |
| - // console.log('***deprecated: use W.html instead of W.setInnerHTML'); |
4545 | 4498 | this.html(search, replace, mod);
|
4546 | 4499 | };
|
4547 | 4500 |
|
|
0 commit comments