So I need a little help on this as I'm kind of stuck. So far I have this:
My problem is that if I click enter to select a command, it will first remove the message window. Then if you click again then the command window will select the command. This is obviously what it is pre-programmed to do. I need it so that it does this:
As you can see from the gif above, both the message window and command window are both sync instead of how it is in the script above.
So if that made sense, just need help on how to proceed with recreating that menu system.
module MenuManager
MENU_DESCRIPTIONS ={ main_message: 'What will you do?', }
def self.method_wait_for_message=(method)
@method_wait_for_message = method
end
def self.wait_for_message
@method_wait_for_message.call if @method_wait_for_message
end
def self.menu_open
$game_message.add(MENU_DESCRIPTIONS[:main_message])
wait_for_message
end
end
#■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
# This window displays party member status on the menu screen.
#==============================================================================
class Window_MenuStatus < Window_Selectable
#--------------------------------------------------------------------------
# * Public Instance Variables
#--------------------------------------------------------------------------
attr_reader :pending_index # Pending position (for formation)
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize(x, y)
super(x, y, window_width, window_height)
@pending_index = -1
refresh
end
def window_width
Graphics.width
end
def window_height
fitting_height(6)
end
def item_max
$game_party.members.size
end
def item_height
(height - standard_padding * 2) / 6
end
def draw_item(index, *args)
actor_id = index
return unless actor_id
actor = $game_party.members[actor_id]
rect = item_rect(index)
draw_actor_simple_status(actor, rect.x, rect.y)
end
def draw_actor_simple_status(actor, x, y)
draw_actor_name(actor, x+25, y)
draw_actor_icons(actor, x+120, y + 1, 122)
draw_actor_hp(actor, x + 260, y - 3)
draw_actor_mp(actor, x + 390, y - 3)
end
end
#■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
class Window_MenuMessage < Window_Message
def window_height
fitting_height(9)
end
def update_placement
self.y = fitting_height(7) + 4
self.opacity = 0
end
end
#■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
class Scene_Menu
def start
super
create_all_windows
init_windows
MenuManager.method_wait_for_message = method(:wait_for_message)
end
def post_start
super
MenuManager.menu_open
end
def update_for_wait
update_basic
end
def wait_for_message
@message_window.update
update_for_wait while $game_message.visible
end
def create_all_windows
create_status_window
create_message_window
create_info_window
create_command_window
end
def init_windows
end
def create_status_window
@status_window = Window_MenuStatus.new(0, 0)
end
def create_message_window
@message_window = Window_MenuMessage.new
@message_back = Window_Base.new(0, @status_window.height+24, Graphics.width, 56)
end
def create_info_window
@info_viewport = Viewport.new
@info_viewport.rect.y = Graphics.height - @status_window.height
@info_viewport.rect.height = @status_window.height
@info_viewport.z = 100
@info_viewport.ox = 64
@status_window.viewport = @info_viewport
end
#--------------------------------------------------------------------------
def create_command_window
@command_window = Window_MenuCommand.new
@command_window.set_handler(:cancel, method(:return_scene))
end
end
My problem is that if I click enter to select a command, it will first remove the message window. Then if you click again then the command window will select the command. This is obviously what it is pre-programmed to do. I need it so that it does this:
As you can see from the gif above, both the message window and command window are both sync instead of how it is in the script above.
So if that made sense, just need help on how to proceed with recreating that menu system.