# 選択ハイライトの変更

**URL:** <https://guild.rpgmakerofficial.com/t/topic/3303>\
**Category:** 質問\
**Tags:** mv\
**Created:** [2026 年 10 月 13 日午前 3:14 UTC](https://guild.rpgmakerofficial.com/t/topic/3303 "2026-10-13T03:14:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![toasty99](https://avatars.discourse-cdn.com/v4/letter/t/c89c15/32.png) [@toasty99](https://guild.rpgmakerofficial.com/u/toasty99)\
**Post date:** [2026 年 10 月 13 日午前 3:14 UTC](https://guild.rpgmakerofficial.com/t/topic/3303/1 "2026-10-13T03:14:30Z")

</div>

テール色のハイライト枠を別の画像に変更する方法はありますか？「window.png」ファイルではない画像にしたいです。方法があれば教えてください。また、それに関連するプラグインがあれば併せて教えてください。

さらに、点滅を止める方法もありますか？

 ![image](https://us1.discourse-cdn.com/flex002/uploads/rpgmaker_community/original/2X/2/213bc7ba93dd989291810f6d4e1dafa306c400bd.jpeg)

---

<div class="post-metadata">

**Author:** ![Baz](https://sea2.discourse-cdn.com/flex002/user_avatar/guild.rpgmakerofficial.com/baz/32/100_2.png) [@Baz](https://guild.rpgmakerofficial.com/u/Baz)\
**Post date:** [2026 年 10 月 13 日午前 11:35 UTC](https://guild.rpgmakerofficial.com/t/topic/3303/2 "2026-10-13T11:35:19Z")

</div>

ハイライトは、Window.png の x 96、y 96 にある 48x48 の正方形（右半分の上端）から取得されます。つまり、外観を単に変更したいだけであれば、プラグインを使用せずにこの正方形を編集するだけで済みます。MV はその中央部分を伸縮させ、外側の 4 ピクセルを枠として保持します。

独自の画像を使用したい場合、そのような機能を持つプラグインは私には分かりませんが、小さなプラグインを以下に示します。これにより、ハイライトに img/system/Cursor.png が使用され、点滅も停止します。Window.png のその正方形と同じレイアウトで 48x48 の Cursor.png を作成してください：

```auto
/*:
 * @plugindesc Selection highlight from img/system/Cursor.png, no blinking.
 * @help Put a 48x48 Cursor.png in img/system.
 * The outer 4 pixels are the border, the middle gets stretched.
 */
(function() {
    var cursorSkin = null;

    Window.prototype._refreshCursor = function() {
        var pad = this._padding;
        var x = this._cursorRect.x + pad - this.origin.x;
        var y = this._cursorRect.y + pad - this.origin.y;
        var w = this._cursorRect.width;
        var h = this._cursorRect.height;
        var m = 4;
        var q = 48;
        var x2 = Math.max(x, pad);
        var y2 = Math.max(y, pad);
        var ox = x - x2;
        var oy = y - y2;
        var w2 = Math.min(w, this._width - pad - x2);
        var h2 = Math.min(h, this._height - pad - y2);
        var bitmap = new Bitmap(w2, h2);
        this._windowCursorSprite.bitmap = bitmap;
        this._windowCursorSprite.setFrame(0, 0, w2, h2);
        this._windowCursorSprite.move(x2, y2);
        if (!cursorSkin) cursorSkin = ImageManager.loadSystem('Cursor');
        if (!cursorSkin.isReady()) {
            cursorSkin.addLoadListener(this._refreshCursor.bind(this));
            return;
        }
        if (w > 0 && h > 0) {
            var s = cursorSkin;
            bitmap.blt(s, m, m, q-m*2, q-m*2, ox+m, oy+m, w-m*2, h-m*2);
            bitmap.blt(s, m, 0, q-m*2, m, ox+m, oy, w-m*2, m);
            bitmap.blt(s, m, q-m, q-m*2, m, ox+m, oy+h-m, w-m*2, m);
            bitmap.blt(s, 0, m, m, q-m*2, ox, oy+m, m, h-m*2);
            bitmap.blt(s, q-m, m, m, q-m*2, ox+w-m, oy+m, m, h-m*2);
            bitmap.blt(s, 0, 0, m, m, ox, oy, m, m);
            bitmap.blt(s, q-m, 0, m, m, ox+w-m, oy, m, m);
            bitmap.blt(s, 0, q-m, m, m, ox, oy+h-m, m, m);
            bitmap.blt(s, q-m, q-m, m, m, ox+w-m, oy+h-m, m, m);
        }
    };

    var _updateCursor = Window.prototype._updateCursor;
    Window.prototype._updateCursor = function() {
        _updateCursor.call(this);
        this._windowCursorSprite.alpha = this.contentsOpacity / 255;
    };
})();

```

点滅を消し、Window.png のハイライトをそのまま維持したい場合は、`var cursorSkin` から `_refreshCursor` の終わりまでのすべてのコードを削除し、最後の部分のみを保持してください。

ウィンドウを変更する他のプラグインがこの設定を上書きする可能性があるため、プラグインリストの下部付近に配置することをお勧めします。

---

<div class="post-metadata">

**Author:** ![Baz](https://sea2.discourse-cdn.com/flex002/user_avatar/guild.rpgmakerofficial.com/baz/32/100_2.png) [@Baz](https://guild.rpgmakerofficial.com/u/Baz)\
**Post date:** [2026 年 10 月 13 日午後 9:49 UTC](https://guild.rpgmakerofficial.com/t/topic/3303/3 "2026-10-13T21:49:50Z")

</div>

フォーラムでは .js ファイルを添付できないようですが、上記のコードから作成するのはたったの1分です：

1. 最後の投稿にあるコードブロックにカーソルを合わせ、右上隅にあるコピーボタンをクリックします。
2. メモ帳を開き、そこに貼り付けます。
3. 「ファイル」\> 「名前を付けて保存」に移動し、保存の種類を「すべてのファイル」に変更します。ファイル名を CursorHighlight.js として、プロジェクト内の js/plugins フォルダに保存してください。プロジェクトの場所がわからない場合は、エディタの「ゲーム」\>「フォルダを開く」でその場所に移動できます。
4. エディタで「ツール」\>「プラグインマネージャー」を開き、空の行をダブルクリックして、名前リストから CursorHighlight を選択し、状態を「ON」に設定して「OK」をクリックします。

「保存の種類」が「テキスト ドキュメント」のままの場合、Windows はそれを CursorHighlight.js.txt として保存し、プラグインマネージャーに表示されません。

その後、48x48 の Cursor.png を img/system フォルダに入れます。
