ボタンを連打するとログが連続で表示されると思います。
ツクールのcommandWindowを以下の手順で表示させ、コマンドをクリックすると
1回だけしか実行されません。
これを連画面遷移しないで、連続して実行されるようにする方法はないのでしょうか?
コード: 全て選択
//コマンドウインドウの表示処理&ハンドラ登録
this._commandWindow = new Window_BZ_Command(0,cy);
this._commandWindow.y = 0;
this._commandWindow.setHandler('gup', this.gup.bind(this));
this._commandWindow.setHandler('gdown', this.gdown.bind(this));
this._commandWindow.setHandler('uplist', this.uplist.bind(this));
this._commandWindow.setHandler('mylist', this.mylist.bind(this));
this._commandWindow.setHandler('exec1', this.exec1.bind(this));
this._commandWindow.setHandler('itemlist', this.itemlist.bind(this));
this._commandWindow.show();
this._commandWindow.move(0,this._goldWindow.height,
this._commandWindow.width,this._commandWindow.height);
this.addWindow(this._commandWindow);
//コマンドウインドウのクラス定義
Window_BZ_Command.prototype = Object.create(Window_HorzCommand.prototype);
Window_BZ_Command.prototype.constructor = Window_BZ_Command
Window_BZ_Command.prototype.initialize = function(width, purchaseOnly) {
this._windowWidth = width;
this._purchaseOnly = purchaseOnly;
Window_HorzCommand.prototype.initialize.call(this, 0, 0);
this.refresh();
this.select(0);
this.activate();
};
Window_BZ_Command.prototype.windowWidth = function() {
return 816;
};
Window_BZ_Command.prototype.maxCols = function() {
return 6;
};
Window_BZ_Command.prototype.makeCommandList = function() {
//値段を上げる
this.addCommand("価格↑", 'gup');
//値段を下げる
this.addCommand("価格↓", 'gdown');
//落札リスト
this.addCommand("落札画面", 'uplist');
//自分の出品リスト
this.addCommand("出品画面", 'itemlist');
//自分の出品リスト
this.addCommand("出品管理", 'mylist');
//自分の出品リスト
this.addCommand("実行", 'exec1');
};