2ちゃんねる ■掲示板に戻る■ 全部 1- 最新50    

■ このスレッドは過去ログ倉庫に格納されています

RPGツクールMZ_3作目

17 :名前は開発中のものです。:2020/11/16(月) 11:35:13.94 ID:f5+YBLMf.net
497行目のthis.drawText(item.name, x + textMargin, y, itemWidth);を
this.drawText(item.name, x + textMargin, y, itemWidth, "center");に変えれば
全てのアイテム/スキルが中央揃えになる(アイコン位置やコスト表示等の都合もあるからこれだけだと微妙な気もするけど)

スキルに限定するなら適当なプラグインファイルを作って中身を
Window_SkillList.prototype.drawItemName = function(item, x, y, width) {
if (item) {
const iconY = y + (this.lineHeight() - ImageManager.iconHeight) / 2;
const textMargin = ImageManager.iconWidth + 4;
const itemWidth = Math.max(0, width - textMargin);
this.resetTextColor();
this.drawIcon(item.iconIndex, x, iconY);
this.drawText(item.name, x + textMargin, y, itemWidth, "center");
}
};
とか処理内容を丸々上書きすれば良い

総レス数 1001
261 KB
新着レスの表示

掲示板に戻る 全部 前100 次100 最新50
read.cgi ver.24052200