Default Cursor Position

donbrendo

Villager
Member
Joined
Feb 4, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Hello all. I am trying to set the default cursor position for Menu Command to be something other than the first in the index (Items). I'm able to accomplish by fiddling with the "@index = index" line in Window_Selectable. Changing "index" to a number will cause the cursor to appear on the desired command, but it will be locked in that position. How can I allow the cursor to move from the new default index position? Thanks!
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,660
Reaction score
563
First Language
English
Primarily Uses
RMVXA
If there is a way to do this, hopefully someone will come along and advise you.
Otherwise Playing around with the windows selectable is not a good thing. What you did was tell it to go to command (number) and never move. Similarly if you set it to @index = index + 1 would cause the menu selection to skip every second command.
Another option is Window_Command. Line 16 select(0). If you set it to 3 then command 3 will always be selected first. However this will be true for any window you open. Going into items will select key items first not the default items.
 

donbrendo

Villager
Member
Joined
Feb 4, 2014
Messages
6
Reaction score
0
First Language
English
Primarily Uses
Hi Roninator, thanks for your reply and for letting me know how select() works!
So I got this to work by adding an if/else statement to "initialize" in Window_Command that checks if a certain scene (in this case, the Menu Scene) is currently open and, if so, changes "select(0)" to (5). Not sure if this is the most elegant method but it doesn't seem to have had any adverse effects on my game so it's good enough for me. In case anyone cares, this is how I set it up (lines 10-23)...

def initialize(x, y)
clear_command_list
make_command_list
super(x, y, window_width, window_height)
refresh
if SceneManager.scene_is?(Scene_Menu)
select(5)
activate
else
select(0)
activate
end
end
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,849
Messages
1,016,977
Members
137,563
Latest member
cexojow
Top