FinalBossMan

Villager
Member
Joined
May 16, 2020
Messages
13
Reaction score
9
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
48
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,682
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
13
Reaction score
9
First Language
English
Primarily Uses
RMMV
Simple and clean solution, thanks for the help!
 

Latest Threads

Latest Posts

Latest Profile Posts

RivalRamen_Games wrote on jacobv1014's profile.
I really like your profile picture! Who is that in it? is she an OC?
Making his first game
This scene was suppose to be a test... but now, it's going in the game as official side/optional content. :kaosalute:


functionality(This is function demo not game demo)
1 The door of ABS map can open upon clearing all the monsters
2 Secret room/road arrow/lighting/whatever others can be shown upon clearing too
3 Boss HP bar and loot effect, loot jump and item name color as well as the pick-up animation effect
4 Back to town and "victory aftermath" screen for ABS maps/rooms

Forum statistics

Threads
115,330
Messages
1,089,029
Members
149,992
Latest member
Quant
Top