// Game_Screen
// 動的ピクチャ用のプロパティを追加定義します。
//=============================================================================
var _Game_Screen_clear = Game_Screen.prototype.clear;
Game_Screen.prototype.clear = function() {
_Game_Screen_clear.call(this);
this.clearDTextPicture();
};
Game_Screen.prototype.clearDTextPicture = function() {
this.dTextValue = null;
this.dTextOriginal = null;
this.dTextRealTime = null;
this.dTextSize = 0;
this.dTextAlign = 0;
this.dTextBackColor = null;
this.dTextFont = null;
this.dUsingVariables = null;
this.dWindowFrame = null;
this.dTextGradationRight = 0;
this.dTextGradationLeft = 0;
};
Game_Screen.prototype.setDTextPicture = function(value, size) {
if (typeof TranslationManager !== 'undefined') {
TranslationManager.translateIfNeed(value, function(translatedText) {
value = translatedText;
});
}
this.dUsingVariables = (this.dUsingVariables || []).concat(getUsingVariables(value));
this.dTextValue = (this.dTextValue || '') + getArgString(value, false) + '\n';
this.dTextOriginal = (this.dTextOriginal || '') + value + '\n';
this.dTextSize = size;
};
Game_Screen.prototype.setDTextWindowCursor = function(pictureId, rect) {
var picture = this.picture(pictureId);
if (picture) {
picture.setWindowCursor(rect);
picture.setWindowCursorActive(true);
}
};
Game_Screen.prototype.setDTextWindowCursorActive = function(pictureId, value) {
var picture = this.picture(pictureId);
if (picture) {
picture.setWindowCursorActive(value);
}
};
Game_Screen.prototype.getDTextPictureInfo = function() {
return {
value : this.dTextValue,
size : this.dTextSize || 0,
align : this.dTextAlign || 0,
color : this.dTextBackColor,
font : this.dTextFont,
usingVariables: this.dUsingVariables,
realTime : this.dTextRealTime,
originalValue : this.dTextOriginal,
windowFrame : this.dWindowFrame,
gradationLeft : this.dTextGradationLeft,
gradationRight: this.dTextGradationRight,
};
};
Game_Screen.prototype.isSettingDText = function() {
return !!this.dTextValue;
};
Game_Screen.prototype.setDtextFont = function(name) {
this.dTextFont = name;
};
var _Game_Screen_updatePictures = Game_Screen.prototype.updatePictures;
Game_Screen.prototype.updatePictures = function() {
_Game_Screen_updatePictures.apply(this, arguments);
$gameVariables.clearChangedVariables();
};