Well, I took the time to test the script that I provided, and with everything that I've tested, it works flawlessly. You shouldn't have any problems with any of the in-game windows provided by built-in scripts and what-not, nor should there be any problems with Event windows like NPC dialog, number input, name input, etc.
I HAVEN'T tested this with other people's scripts, but unless they directly rely upon the original updating methods of the Window class, chances of incompatibility are theoretically minimal.
This is (most likely) the final version of the script that I'm going to write, but I did take the liberty of adding three options to give you more control over when the script ought to be running. First and foremost, I've added the "turn on game switch to activate script" feature, with the default switch being #15, but that is editable within the script. This allows you to selectively decide which kind of windows should have a blinking cursor in-game by flipping that switch off and on.
Secondly, I added a feature to prevent the blinking cursor from happening on the Title Scene. I had to add that in because of the re-work that I did, but it's a useful feature to have if you want some in-game windows to have a blinking cursor, but you don't want the Title Scene to have said cursor.... This option is a boolean, and it's default is set to false.
The final option I put in the script just flat out prevents the cursor from blinking always, so if you don't want the blinking cursor period, than this is the option that will save you a switch for your game. This option will override the previous two, so keep that in mind. This option is also a boolean, and it's default is set to false.
So, if you installed this script and played without configuration, you would have a blinking cursor on the Title Scene, and on every window thereafter unless you flipped game switch #15 on. As with all scripts, this one installs under materials, but above main.
You can get the script here:
Spoiler
Code:
#==============================================================================
# ** CURSOR BLINK REMOVER **
#------------------------------------------------------------------------------
# DESCRIPTION
#------------------------------------------------------------------------------
# This script prevents the cursor from "blinking" by deactivating all windows
# that are open while the Window class does it's processing, then restoring the
# proper "active state" of each respective window when the update process has
# finished.
#
# There are different settings explained in the "Instructions" section that alter
# how and when the script works, so it allows for a little bit of flexibility.
#------------------------------------------------------------------------------
# Instructions
#------------------------------------------------------------------------------
# Look at the editable region below to set the script up for your needs. You can
# alter how the blinking cursor restrictions work with the three settings below.
#
# By default, whenever you want the cursor to NOT blink, you would set the game
# switch #15 to ON. When you get to a point when you would like the cursor to act
# as it normally would, you simply turn the switch OFF.The switch that is used,
# of course, is customizable, and you can control that with the settings in the
# editable region.
#
# You can also make it so the script prevents the cursor from blinking at the
# title scene, something that the script won't do by default.
#
# The third setting is for if you don't want the cursor to blink period. This
# setting renders the other two useless regardless of how they are set.
#------------------------------------------------------------------------------
# Compatibility
#------------------------------------------------------------------------------
# No testing has been performed to determine the compatibility of this script,
# but issues with most scripts IN THEORY should be minimal. If there are scripts
# that rely on the original update method from the hidden Window class, this
# script may cause errors.
#------------------------------------------------------------------------------
# Terms of Use
#------------------------------------------------------------------------------
# This script is free for use in all projects, commercial or otherwise, so long
# as credit is given to me, Typhon01.
#
# You may redistribute this script however and wherever you please, so long
# as you make sure the original source of this script is mentioned and anyone
# who uses this script as a result of your distribution gives proper credit
# to me.
#
# You may edit this script however you want, to fit your purposes and suite your
# needs, HOWEVER, you do so at your own risk. It is not my responsibility to
# fix any issues caused as a direct result of tamperment of this script.
#
# If you do alter this script, and you decide to distribute the altered script,
# you must make certain that the script is NOT in it's original state, and you
# must describe any and all changes you have made.
#==============================================================================
module Typhon01
module Cursor_Blink_Remover
#==============================================================================
# ** EDITABLE REGION
#==============================================================================
# This is the game switch you would activate if you want to disable cursor blinking.
BLINK_REMOVER_SWITCH = 15
# Set this to true if you want some windows to have a blinking cursor, but not the
# title scene.
REMOVE_TITLE_BLINK = false
# Set this to true if you NEVER want the cursor to blink.
NEVER_BLINK = false
#==============================================================================
# ** END EDITABLE REGION
#==============================================================================
end
end
#==============================================================================
# ** Window
#------------------------------------------------------------------------------
# "The game window class. Created internally from multiple sprites."
# A hidden class within the engine, editing here MAY be dangerous,
#==============================================================================
# According to the help contents, Window inherits from the Object class.
class Window < Object
# This is a new instance variable, used to determine when a window should be active
@t01_active_state = 1
# According to the contents, the cursor blink is handled in the Update method.
alias t01_window_update update
def update
# We only skip the blinks if the settings are in line with current circumstances
if $game_switches[Typhon01::Cursor_Blink_Remover::BLINK_REMOVER_SWITCH] ||
Typhon01::Cursor_Blink_Remover::NEVER_BLINK ||
Typhon01::Cursor_Blink_Remover::REMOVE_TITLE_BLINK &&
SceneManager.scene_is?(Scene_Title)
# Deactivates any active windows without using the modified method
self.active = false
# Calls original method
t01_window_update
# Reactivates windows, but only if they are supposed to be active.
activate unless @t01_active_state == 0
# Simply call the original method if the right circumstances AREN'T in place.
else
t01_window_update
end
end
end
#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
# This is a super class of all windows within the game.
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# * Deactivate Window
#--------------------------------------------------------------------------
alias t01_win_base_deact deactivate
def deactivate
# This let's us know that the window is supposed to STAY inactive.
@t01_active_state = 0
t01_win_base_deact
end
#--------------------------------------------------------------------------
# * Activate Window
#--------------------------------------------------------------------------
alias t01_win_base_act activate
def activate
# This let's us know that the window is supposed to become active again.
@t01_active_state = 1
t01_win_base_act
end
end
Anyways, that's it for me, it's been a fun learning experience,
😉
-EDIT-
I forgot to mention, I updated the terms of use inside the script. It's all highly reasonable, but make sure you check it out.