[Thảo Luận] edit script rpg maker mv
luonyeu357
Posts: 84Registered
in RPG Maker
đoạn này mình muốn tách ra 2 bảng, bảng trên bảng dưới thì làm thế nào ạ
mình chỉ cần biết vị tri chiều rộng và chiều cao hay trong đoạn script này thôi cũng dc
//
// Window_CardBattleStatus
//
function Window_CardBattleStatus() {
this.initialize.apply(this, arguments);
}
Window_CardBattleStatus.prototype = Object.create(Window_Base.prototype);
Window_CardBattleStatus.prototype.constructor = Window_CardBattleStatus;
Window_CardBattleStatus.prototype.initialize = function(x, y) {
var width = this.windowWidth();
var height = this.lineHeight() + 20 + this.standardPadding() * 2;
Window_Base.prototype.initialize.call(this, x, y, width, height);
this.refresh();
};
Window_CardBattleStatus.prototype.windowWidth = function() {
return Graphics.boxWidth;
};
Window_CardBattleStatus.prototype.refresh = function() {
this.contents.clear();
var x = this.textPadding();
var width = this.contents.width - x * 2;
var lineHeight = this.lineHeight();
this.contents.fontSize = 28;
this.drawText($gameCardBattle.playerDeck().userName(), x, 0, width, 'left');
this.drawText($gameCardBattle.enemyDeck().userName(), x, 0, width, 'right');
this.contents.fontSize = 16;
this.contents.drawText('Tổng ' + TMPlugin.Card.ParamNames[2] + ': ' +
$gameCardBattle.playerDeck().cost(), x, lineHeight,
width, 20, 'left');
this.contents.drawText('Tổng ' + TMPlugin.Card.ParamNames[2] + ': ' +
$gameCardBattle.enemyDeck().cost(), x, lineHeight,
width, 20, 'right');
};
mình chỉ cần biết vị tri chiều rộng và chiều cao hay trong đoạn script này thôi cũng dc
//
// Window_CardBattleStatus
//
function Window_CardBattleStatus() {
this.initialize.apply(this, arguments);
}
Window_CardBattleStatus.prototype = Object.create(Window_Base.prototype);
Window_CardBattleStatus.prototype.constructor = Window_CardBattleStatus;
Window_CardBattleStatus.prototype.initialize = function(x, y) {
var width = this.windowWidth();
var height = this.lineHeight() + 20 + this.standardPadding() * 2;
Window_Base.prototype.initialize.call(this, x, y, width, height);
this.refresh();
};
Window_CardBattleStatus.prototype.windowWidth = function() {
return Graphics.boxWidth;
};
Window_CardBattleStatus.prototype.refresh = function() {
this.contents.clear();
var x = this.textPadding();
var width = this.contents.width - x * 2;
var lineHeight = this.lineHeight();
this.contents.fontSize = 28;
this.drawText($gameCardBattle.playerDeck().userName(), x, 0, width, 'left');
this.drawText($gameCardBattle.enemyDeck().userName(), x, 0, width, 'right');
this.contents.fontSize = 16;
this.contents.drawText('Tổng ' + TMPlugin.Card.ParamNames[2] + ': ' +
$gameCardBattle.playerDeck().cost(), x, lineHeight,
width, 20, 'left');
this.contents.drawText('Tổng ' + TMPlugin.Card.ParamNames[2] + ': ' +
$gameCardBattle.enemyDeck().cost(), x, lineHeight,
width, 20, 'right');
};