(済)アイテムカテゴリを縦並びにするプラグイン

スギスズキ
記事: 71
登録日時: 2016年5月13日(金) 11:58

(済)アイテムカテゴリを縦並びにするプラグイン

投稿記事by スギスズキ » 2018年10月16日(火) 16:28

お世話になっております。

今回は、アイテムカテゴリを縦並びにするプラグインを
お願いしたく投稿させていただきました。

Window_ItemCategory.prototype = Object.create(Window_HorzCommand.prototype);
こちらで横メニューの設定にしてあると思いWindow_Selectable.prototypeなどに
書き換えてみたりしたのですが、解読できずお願いに参りました。

宜しければプラグインの作成、もしちょっとしたスクリプトの書き換えで
変更できる方法がございましたら何卒よろしくお願い致します…!
最後に編集したユーザー スギスズキ on 2018年10月17日(水) 13:22 [ 編集 1 回目 ]

colombo
記事: 19
登録日時: 2018年7月24日(火) 07:01

Re: アイテムカテゴリを縦並びにするプラグイン

投稿記事by colombo » 2018年10月16日(火) 22:34

下記のプラグインを導入していただくとスクショのようになります :)
ただ、ご覧の通り、アイテムウインドウの位置がずれたり、カテゴリの横が不自然に空くのですが、その辺の調整は問題ないのでしょうか?
もし問題があるのならば、想定しているイメージを絵や図にして提示いただくとお手伝いできるかもしれません :oops:

コード: 全て選択

(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();
};

})();



添付ファイル
test.jpg
test.jpg (34.53 KiB) 閲覧数: 2619 回
スギスズキ
記事: 71
登録日時: 2016年5月13日(金) 11:58

Re: アイテムカテゴリを縦並びにするプラグイン

投稿記事by スギスズキ » 2018年10月17日(水) 13:22

colomboさん

返信ありがとうございます。
頂いたコードを参考に希望の挙動にすることができました!
ウィンドウ配置については、トリアコンタンさんのGUI画面デザインプラグインで
調整できましたので大丈夫でした。ご協力本当にありがとうございます :D

“MV:プラグイン素材のリクエスト” へ戻る