Jump to content
Zen Blood

How do I change a cursor's starting position in a command window?

Recommended Posts

Hello, everyone.


There was a thread on here that asked a similar question back in 2015, but it looked like the OP was attempting to create this effect for all windows, instead of a specific window like I want to do.


I have a customized window for a puzzle that accesses class Window_HorzCommand. The player's selection cursor keeps redirecting to the first choice because I need to refresh the command bar each time a selection is made. I have found out that I can control where the cursor starts here:


class Window_Command < Window_Selectable
  # * Object Initialization
  def initialize(x, y)
    super(x, y, window_width, window_height)
    select(0) # <------ Right there


Here's the order of my classes: Window_CustomWindow < Window_HorzCommandWindow_HorzCommand < Window_Command


I want to Window_Command's select value specifically for Window_CustomWindow. From that point on, I can easily figure out what to do. I'd just need to create a variable that changes depending on the player's last selection, that would change the value of select, so that the cursor would begin in the player's last selected position.


How would I change select for my custom class? I feel it may involve an alias, or something, but nothing is coming together in my head.


Thank you for your time!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.