MZ Customizing choice highlight via Script Call

When you choose a battle command there's a little flickering effect highlighting your choice. Is there any way to deactivate it or turn the flickering's opacity to zero?

I found it inside rpg_windows - Window_Selectable.prototype.itemRect = function(index)
but couldn't quite figure it out.

Basically, I'm using a battle system based on common events. I removed every single battle command but the selection item keeps flickering, even though there's nothing u can choose.
if you say, based on common events, does it based on images?
if so, it does that the first time, the 2nd time it does not, but you
can preload those with galv_ImageCache.

if it's the normal window of commands, than you need to look at
the windows or scenes in battle, and not window_Selectable on itemRect,
because it's probably not related to battle commands. (can be wrong).

so you can show an image, or small video to show the issue to make it
more clear what flickering you exactly mean.
Here's how it looks.
I though the selectable item was ineversal for every scene - window, but maybe I'm wrong.

1632331832900.png
*BUMP
*BUMP
itemRect is the area the engine uses to draw that item (text, icon, etc). The window cursor is a separate sprite inherited from Window.prototype (rpg_core.js).

To stop the blinking, you can save this as a .js file and import as a plugin:
JavaScript:
(function(alias) {
	Window_Selectable.prototype._updateCursor = function() {
		alias.call(this);
		this._windowCursorSprite.alpha = this.contentsOpacity / 255;
	};
})(Window.prototype._updateCursor);
Alternatively I have a plugin that contains this option (No Menu Cursor Blink parameter):
I will take a look. Many thx!
I hope it helps!
Getting the same error for both solutions, unfortunately:
Uncaught TypeError: Cannot set property 'alpha' of undefined

Uncaught TypeError: Cannot set property 'alpha' of undefined
at Window_Gold.Window_Selectable._updateCursor (BlinkingCursor.js:4)
at Window_Gold.Window.updateTransform (rmmz_core.js:3874)
at WindowLayer.updateTransform (pixi.js:8377)
at Scene_Map.updateTransform (pixi.js:8377)
at Renderer.render (pixi.js:24751)
at Application.render (pixi.js:26174)
at Function.Graphics._onTick (rmmz_core.js:803)
at TickerListener.emit (pixi.js:9474)
at Ticker.update (pixi.js:9928)
at Ticker._tick (pixi.js:9679)
Getting the same error for both solutions, unfortunately:
Uncaught TypeError: Cannot set property 'alpha' of undefined

Uncaught TypeError: Cannot set property 'alpha' of undefined
at Window_Gold.Window_Selectable._updateCursor (BlinkingCursor.js:4)
at Window_Gold.Window.updateTransform (rmmz_core.js:3874)
at WindowLayer.updateTransform (pixi.js:8377)
at Scene_Map.updateTransform (pixi.js:8377)
at Renderer.render (pixi.js:24751)
at Application.render (pixi.js:26174)
at Function.Graphics._onTick (rmmz_core.js:803)
at TickerListener.emit (pixi.js:9474)
at Ticker.update (pixi.js:9928)
at Ticker._tick (pixi.js:9679)
That trace says you're using RMMZ, which needs a different approach. I assumed you wanted an MV solution because the thread was labelled "RMMV" and you mentioned rpg_windows.js in your opening post...

Try one of these instead:
  1. MZ plugin code:
    JavaScript:
    Window.prototype._makeCursorAlpha = function() {
      return this.contentsOpacity / 255;
    };

  2. MZ version of my plugin: Cae_MenuDisplayOpts (Google Drive) [MZ].
U're right. I switched to MZ recently. This works thx.
Great! And I'll change the thread prefix. 👋

If you'd like the thread to be closed, just report it with a reason like "Solved".

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

Original thread: https://forums.rpgmakerweb.com/threads/customizing-choice-highlight-via-script-call.140669/