ページ 1 / 1
(済)アイテムカテゴリを縦並びにするプラグイン
Posted: 2018年10月16日(火) 16:28
by スギスズキ
お世話になっております。
今回は、アイテムカテゴリを縦並びにするプラグインを
お願いしたく投稿させていただきました。
Window_ItemCategory.prototype = Object.create(Window_HorzCommand.prototype);
こちらで横メニューの設定にしてあると思いWindow_Selectable.prototypeなどに
書き換えてみたりしたのですが、解読できずお願いに参りました。
宜しければプラグインの作成、もしちょっとしたスクリプトの書き換えで
変更できる方法がございましたら何卒よろしくお願い致します…!
Re: アイテムカテゴリを縦並びにするプラグイン
Posted: 2018年10月16日(火) 22:34
by colombo
下記のプラグインを導入していただくとスクショのようになります
ただ、ご覧の通り、アイテムウインドウの位置がずれたり、カテゴリの横が不自然に空くのですが、その辺の調整は問題ないのでしょうか?
もし問題があるのならば、想定しているイメージを絵や図にして提示いただくとお手伝いできるかもしれません
コード: 全て選択
(function() {
Window_ItemCategory.prototype = Object.create(Window_Command.prototype);
Window_ItemCategory.prototype.constructor = Window_ItemCategory;
Window_ItemCategory.prototype.initialize = function() {
Window_Command.prototype.initialize.call(this, 0, 0);
};
Window_ItemCategory.prototype.windowWidth = function() {
return 240;
};
Window_ItemCategory.prototype.windowHeight = function() {
return this.fittingHeight(this.numVisibleRows());
};
Window_ItemCategory.prototype.update = function() {
Window_Command.prototype.update.call(this);
if (this._itemWindow) {
this._itemWindow.setCategory(this.currentSymbol());
}
};
Window_ItemCategory.prototype.makeCommandList = function() {
this.addCommand(TextManager.item, 'item');
this.addCommand(TextManager.weapon, 'weapon');
this.addCommand(TextManager.armor, 'armor');
this.addCommand(TextManager.keyItem, 'keyItem');
};
Window_ItemCategory.prototype.setItemWindow = function(itemWindow) {
this._itemWindow = itemWindow;
this.update();
};
})();
Re: アイテムカテゴリを縦並びにするプラグイン
Posted: 2018年10月17日(水) 13:22
by スギスズキ
colomboさん
返信ありがとうございます。
頂いたコードを参考に希望の挙動にすることができました!
ウィンドウ配置については、トリアコンタンさんのGUI画面デザインプラグインで
調整できましたので大丈夫でした。ご協力本当にありがとうございます
