How do I remove the highlight/rectangle cursor?

FinalBossMan

Villager
Member
Joined
May 16, 2020
Messages
8
Reaction score
5
First Language
English
Primarily Uses
RMMV
I've been struggling for hours trying to find a solution to this issue. I'm trying to disable/remove the highlighted cursor in menus (where a blinking rectangle pops up underneath the selection), and instead use a regular cursor (I'm using GALVs plugin atm). I'm a noob to JS so I'm not sure what exactly it is I need to change. I've been able to stop the blinking, but not remove the rectangle altogether.

I could settle for the rectangle to have a transparent fill and rounded edges, but I'm not familiar with how to code that (or where).

From what I read on here and other sites, the windows are pretty complicated, so I hope asking for help isn't too much trouble! Thanks in advance!
 

Lay

Veteran
Veteran
Joined
Jul 18, 2019
Messages
124
Reaction score
47
First Language
French
Primarily Uses
RMMV
Okay so first of all, I'm note sure it will be compatible with plugins to do such a thing.

If you never want to use a blinking cursor, one option is to edit the _updateCursor methods in rpg_core.js

Find the function below in rpg_core.js and modify this function as follow :

JavaScript:
Window.prototype._updateCursor = function() {
 
    // ADDED SECTION
    this._windowCursorSprite.alpha = 1; // change this value for lower opacity. must be between 0 and 1.
    this._windowCursorSprite.visible = this.isOpen();
    return;
    // END OF ADDED SECTION

    var blinkCount = this._animationCount % 40;
    var cursorOpacity = this.contentsOpacity;
    if (this.active) {
        if (blinkCount < 20) {
            cursorOpacity -= blinkCount * 8;
        } else {
            cursorOpacity -= (40 - blinkCount) * 8;
        }
    }
    this._windowCursorSprite.alpha = cursorOpacity / 255;
    this._windowCursorSprite.visible = this.isOpen();
};
As a consequence, all selectable windows that use a blinking cursor will see their cursor update always set to opacity 1 in this case. For a totally transparent cursor, set this value to 0.

This edit is clearly not the best because the cursor will still be drawn in window. But if you're not comfortable with JS, I think this is the best you can do thanks to the low amount of modifications it needs. Meanwhile, those modifications are easy to understand so, even if you're "noob" in JS, you should understand what this modification does. I always prefer to give modification that could be understood by the user. Otherwise, if you meet an issue, you will not be able to think about it properly.

All the code below // END OF ADDED SECTION will never run. However, this code correspond to the original function code. I've left it to make an easy come back to default.
 
Last edited:

Engr. Adiktuzmiko

Chemical Engineer, Game Developer, Using BlinkBoy'
Veteran
Joined
May 15, 2012
Messages
14,696
Reaction score
3,006
First Language
Tagalog
Primarily Uses
RMVXA
If you want the rectangle to be removed from all menus, you can just delete it from the Window.png file inside you project's img/system folder

Windowcursor.PNG
 

FinalBossMan

Villager
Member
Joined
May 16, 2020
Messages
8
Reaction score
5
First Language
English
Primarily Uses
RMMV
Simple and clean solution, thanks for the help!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Profile Posts

I need to remember that if i want to learn to map like a pro, I need to spend hours doing it like a noob again and again… also, a cool map sometimes has hours/even days of work behind. I need to remember that too.
Yo there how's it going rpg community.
It's raining non stop since yesterday. The sound of the rain is so soothing.
I really miss the old style disney animated movies. I guess the last one was The Princess and the Frog from 2009. Now I am trying to collect every single one I can get on BD or DVD.
What I've seen from the MZ tiles looks pretty inconsistent, bleh. Every plant seems to be drawn in a different style.

Forum statistics

Threads
99,293
Messages
963,930
Members
130,905
Latest member
GhostAcc
Top