Cursor Command Windows

Cursor Command Windows

This plug and play script replaces the box command windows with a cursor pointer like in Final Fantasy games.

It uses windowskins in the following form:

Image

I.e. replace the box cursor with a normal cursor, like a hand.

Script

  1.  
  2. #=======================================
  3. # cursor command windows                                  
  4. # author: como                                                  
  5. # date: 9th June 2010                                          
  6. # version: 1.1 (status window fix)                                                        
  7. #=======================================
  8.  
  9. class Window_Selectable < Window_Base
  10.   alias update_cursor_rect_orig update_cursor_rect
  11.   def update_cursor_rect
  12.     update_cursor_rect_orig
  13.     self.cursor_rect.set(x - 16, y, 32, 32)
  14.   end
  15. end
  16.  
  17. class Window_MenuStatus < Window_Selectable
  18.   def update_cursor_rect
  19.     if @index < 0
  20.       self.cursor_rect.empty
  21.     else
  22.       self.cursor_rect.set(0, @index * 116, 32, 32)
  23.     end
  24.   end
  25. end
  26.  
  27. class Window_Target < Window_Selectable
  28.   def update_cursor_rect
  29.     # Cursor position -1 = all choices, -2 or lower = independent choice
  30.     # (meaning the user's own choice)
  31.     if @index <= -2
  32.       self.cursor_rect.set(0, (@index + 10) * 116, 32, 32)
  33.     elsif @index == -1
  34.       self.cursor_rect.set(0, 0, 32, 32)
  35.     else
  36.       self.cursor_rect.set(0, @index * 116, 32, 32)
  37.     end
  38.   end
  39. end
  40.  
Expand to see the code.


Note: I did not alias the second two because I was editing all lines in the script. I probably should (well, could) have done.
Thats one quick-n-dirty script right there! It definitely gets the job done.
Aliasing the other two shouldn't be that hard, but its such a small script so shouldn't matter too much.

I like it!
Few bugs .__.
First the window is named Window_Selectable, so it errors out as soon as you run the game.
Second the cursor dissappears instantly on the title screen.
You also need to change Window_MenuStatus < Window_Base to Window_MenuStatus < Window_Selectable or else it errors
In the menu the cursor stays there and blinks but it doesnt update its position.
It updates the position in the menu status.
The script doesn't work, many bugs!
Wow, sorry about that. I asked someone to test it because I've done it a bit differently in my game (I just hard coded it because I'm naughty). I guess they lied when they said it worked :x
Its fine, thats happened to me several times. I've had people test it, but they never actually did.

Original thread: https://www.hbgames.org/forums/viewtopic.php?t=71233