- Joined
- Sep 6, 2016
- Messages
- 16
- Reaction score
- 1
- First Language
- English
- Primarily Uses
What is the "game screen" and what is the "window display area"? They are both set to the same values:
// rpg_managers.js
SceneManager._screenWidth = 816;
SceneManager._screenHeight = 624;
SceneManager._boxWidth = 816;
SceneManager._boxHeight = 624;
The code (and documentation) is as follows:
// rpg_core.js
/**
* The width of the game screen.
*
* @static
* @property width
* @type Number
*/
Object.defineProperty(Graphics, 'width', {
get: function() {
return this._width;
},
set: function(value) {
if (this._width !== value) {
this._width = value;
this._updateAllElements();
}
},
configurable: true
});
/**
* The height of the game screen.
*
* @static
* @property height
* @type Number
*/
Object.defineProperty(Graphics, 'height', {
get: function() {
return this._height;
},
set: function(value) {
if (this._height !== value) {
this._height = value;
this._updateAllElements();
}
},
configurable: true
});
/**
* The width of the window display area.
*
* @static
* @property boxWidth
* @type Number
*/
Object.defineProperty(Graphics, 'boxWidth', {
get: function() {
return this._boxWidth;
},
set: function(value) {
this._boxWidth = value;
},
configurable: true
});
/**
* The height of the window display area.
*
* @static
* @property boxHeight
* @type Number
*/
Object.defineProperty(Graphics, 'boxHeight', {
get: function() {
return this._boxHeight;
},
set: function(value) {
this._boxHeight = value;
},
configurable: true
});
"Window" is an overloaded term. Neither appear to be a reference to the web browser viewport window nor the size of the canvas element that everything gets rendered to.
An example of both being used:
// rpg_scenes.js
Scene_Base.prototype.createWindowLayer = function() {
var width = Graphics.boxWidth;
var height = Graphics.boxHeight;
var x = (Graphics.width - width) / 2;
var y = (Graphics.height - height) / 2;
this._windowLayer = new WindowLayer();
this._windowLayer.move(x, y, width, height);
this.addChild(this._windowLayer);
};
Can anyone provide more information and details on all 4 properties? What could cause them to have different values?
// rpg_managers.js
SceneManager._screenWidth = 816;
SceneManager._screenHeight = 624;
SceneManager._boxWidth = 816;
SceneManager._boxHeight = 624;
The code (and documentation) is as follows:
// rpg_core.js
/**
* The width of the game screen.
*
* @static
* @property width
* @type Number
*/
Object.defineProperty(Graphics, 'width', {
get: function() {
return this._width;
},
set: function(value) {
if (this._width !== value) {
this._width = value;
this._updateAllElements();
}
},
configurable: true
});
/**
* The height of the game screen.
*
* @static
* @property height
* @type Number
*/
Object.defineProperty(Graphics, 'height', {
get: function() {
return this._height;
},
set: function(value) {
if (this._height !== value) {
this._height = value;
this._updateAllElements();
}
},
configurable: true
});
/**
* The width of the window display area.
*
* @static
* @property boxWidth
* @type Number
*/
Object.defineProperty(Graphics, 'boxWidth', {
get: function() {
return this._boxWidth;
},
set: function(value) {
this._boxWidth = value;
},
configurable: true
});
/**
* The height of the window display area.
*
* @static
* @property boxHeight
* @type Number
*/
Object.defineProperty(Graphics, 'boxHeight', {
get: function() {
return this._boxHeight;
},
set: function(value) {
this._boxHeight = value;
},
configurable: true
});
"Window" is an overloaded term. Neither appear to be a reference to the web browser viewport window nor the size of the canvas element that everything gets rendered to.
An example of both being used:
// rpg_scenes.js
Scene_Base.prototype.createWindowLayer = function() {
var width = Graphics.boxWidth;
var height = Graphics.boxHeight;
var x = (Graphics.width - width) / 2;
var y = (Graphics.height - height) / 2;
this._windowLayer = new WindowLayer();
this._windowLayer.move(x, y, width, height);
this.addChild(this._windowLayer);
};
Can anyone provide more information and details on all 4 properties? What could cause them to have different values?

