一つ目は、変数の表示についてなのですが、現在一桁目が
1
ここの位置の場合
1234
とケタが右に増えていくわけですが
1234
のように左に増えていくようにしたいです。
やり方があれば教えてください。
二つ目は、時間計測のためにこちらの記事(http://tm.yumineko.com/viewtopic.php?f= ... 3%BC#p2825)でfftfanttさんが作られた「オリジナルタイマープラグイン」を使っていてそのカウントアップをウインドウ内で表示する方法があれば教えてください。
もし表示する方法がないのであれば、ウインドウよりカウントを上に表示する方法を教えていただけるとありがたいです。
三つ目は、行ごとにフォントのサイズを変える方法を教えていただきたいのですが、可能でしょうか?
表題の件に関する質問は以上の三つになります。
どれか一つでも教えていただけるとすごく助かりますので、返答お待ちしております。
よろしくお願いします。
それと表題とは関係ないのですが、こういった質問の場合、コードを載せるのと、jsファイルを添付するのではどちらがいいのでしょうか?
いちおうまずは以下にコードを全文載せておきます。
コード: 全て選択
(function() {
// マップ上にウィンドウ表示するよ宣言
var Scene_map_start = Scene_Map.prototype.start;
Scene_Map.prototype.start = function() {
Scene_map_start.call(this);
this._InfoWindow = new Window_Info();
this.addWindow(this._InfoWindow);
};
var _Scene_Map_update = Scene_Map.prototype.update;
Scene_Map.prototype.update = function() {
_Scene_Map_update.call(this);
this._InfoWindow.setText();
// 指定スイッチで起動
if($gameSwitches.value(2)){
this._InfoWindow.show();
}else{
this._InfoWindow.hide();
}
};
// ここからメニューウィンドウ作り始まります。
function Window_Info() {
this.initialize.apply(this, arguments);
}
Window_Info.prototype = Object.create(Window_Base.prototype);
Window_Info.prototype.constructor = Window_Info;
Window_Info.prototype.initialize = function() {
var x = 0;
var y = 0;
var width = 180;
var height = 624;
Window_Base.prototype.initialize.call(this, x, y, width, height);
};
Window_Info.prototype.setText = function(str) {
this._text = str;
this.refresh();
};
// ウィンドウに載せる内容
Window_Info.prototype.refresh = function() {
this.contents.clear();
this.changeTextColor(this.textColor(16));
this.drawText("COMBO",0, 0);
this.resetTextColor();
this.drawText($gameVariables.value(39),100,40);
this.changeTextColor(this.textColor(16));
this.drawText("COMBO BONUS",0, 100);
this.resetTextColor();
this.drawText($gameVariables.value(56),100,140);
this.changeTextColor(this.textColor(16));
this.drawText("SCORE",0, 200);
this.resetTextColor();
this.drawText($gameVariables.value(57),100,240);
this.changeTextColor(this.textColor(16));
this.drawText("TIME",0, 300);
this.drawText("LIFE",0, 400);
this.resetTextColor();
this.drawText("x " + $gameVariables.value(40),50,440);
};
// フォントサイズ
Window_Info.prototype.standardFontSize = function() {
return 26;
};
// ウィンドウの透明度
// Window_Info.prototype.standardBackOpacity = function() {
// return 255;
// };
// ウィンドウの余白
Window_Info.prototype.standardPadding = function() {
return 18;
};
// ウィンドウの色調
// Window_Info.prototype.updateTone = function() {
// this.setTone(64, 0, 128);
// };
})();