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,007
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 Posts

Latest Profile Posts

Super stoked i just finished my first town in my project, by finished i mean i can always add more decorative aesthetics and the NPCs don't talk yet but the mapping is complete and all the important chess pieces are present!
My brain: Hey, I have an idea how to make the transition to the main story quest in The Wastes more natural!
Me: Good!
My brain: You need to remake the hotel you start out in, it's not realistic enough.
Me: Ok... This was unexpected, but I can do it.
My brain: Now make each hotel floor 5 times as large to match the main part. Oh, you also need to make a bunch of new npcs to fill in the space on these maps.
Me: Crap.
Should be able to release Haxe MV/MZ next weekend.
It look that somehow MZ tracks are messed up (for example battle4 is obviously a theme, castle2 is a ship, ship1 is a scene and so on..). Maybe they just named them after with some ambiguity.
is there a script call that return how much turn has passed in battle?

Forum statistics

Threads
100,607
Messages
977,777
Members
132,219
Latest member
aboyhazard
Top