I am working on a new menu script. It does most of everything that I want it too, however when i call the new window I created it acts like it pops up but doesn't show on the screen. I have been searching and can't figure out what I am doing wrong. i am still new to ruby but i am working at learning more. I will leave my code maybe some one can help tell me what i am doing wrong. I know I haven't created the content for it yet. I am trying to get it to show up before i try adding content.
####################################################################################################
# Whitlocktech's Title Menu
#
# I am attempting to create a script that lets menu options change and adds a credits scene
#
#####################################################################################################
class Window_TitleCommand < Window_Command
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0)
update_placement
select_symbol🙂continue) if continue_enabled
self.openness = 0
open
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Update Window Position
#--------------------------------------------------------------------------
def update_placement
self.x = (385)
self.y = (275)
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(Vocab::new_game, :new_game)
add_command(Vocab::continue, :continue, continue_enabled)
add_command("Options", 😮ptions)
add_command("Credits", :credits)
add_command(Vocab::shutdown, :shutdown)
end
#--------------------------------------------------------------------------
# * Get Activation State of Continue
#--------------------------------------------------------------------------
def continue_enabled
DataManager.save_file_exists?
end
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias windowskin_begone_update_placement update_placement
def update_placement
windowskin_begone_update_placement
self.opacity = 0
end
def alignment
return 2
end
end
class Scene_Title < Scene_Base
def create_command_window
@command_window = Window_TitleCommand.new
@command_window.set_handler🙂new_game, method🙂command_new_game))
@command_window.set_handler🙂continue, method🙂command_continue))
@command_window.set_handler🙂options, method🙂command_options))
@command_window.set_handler🙂credits, method🙂command_credits))
@command_window.set_handler🙂shutdown, method🙂command_shutdown))
end
#--------------------------------------------------------------------------
# * Close Command Window
#--------------------------------------------------------------------------
def close_command_window
@command_window.close
update until @command_window.close?
end
#--------------------------------------------------------------------------
# * [New Game] Command
#--------------------------------------------------------------------------
def command_new_game
DataManager.setup_new_game
close_command_window
fadeout_all
$game_map.autoplay
SceneManager.goto(Scene_Map)
end
#--------------------------------------------------------------------------
# * [Continue] Command
#--------------------------------------------------------------------------
def command_continue
close_command_window
SceneManager.call(Scene_Load)
end
#--------------------------------------------------------------------------
# * [Options] Command
#--------------------------------------------------------------------------
def command_options
SceneManager.call(Scene_Options)
end
#--------------------------------------------------------------------------
# * [credits] Command
#--------------------------------------------------------------------------
def command_credits
CreditsWindow.new
end
#--------------------------------------------------------------------------
# * [shut Down] Command
#--------------------------------------------------------------------------
def command_shutdown
close_command_window
fadeout_all
SceneManager.exit
end
end
class CreditsWindow < Window_Base
def initialize()
super( 0, 0, 512, 512)
@CreditsWindow = CreditsWindow.new
end
end
# Whitlocktech's Title Menu
#
# I am attempting to create a script that lets menu options change and adds a credits scene
#
#####################################################################################################
class Window_TitleCommand < Window_Command
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
def initialize
super(0, 0)
update_placement
select_symbol🙂continue) if continue_enabled
self.openness = 0
open
end
#--------------------------------------------------------------------------
# * Get Window Width
#--------------------------------------------------------------------------
def window_width
return 160
end
#--------------------------------------------------------------------------
# * Update Window Position
#--------------------------------------------------------------------------
def update_placement
self.x = (385)
self.y = (275)
end
#--------------------------------------------------------------------------
# * Create Command List
#--------------------------------------------------------------------------
def make_command_list
add_command(Vocab::new_game, :new_game)
add_command(Vocab::continue, :continue, continue_enabled)
add_command("Options", 😮ptions)
add_command("Credits", :credits)
add_command(Vocab::shutdown, :shutdown)
end
#--------------------------------------------------------------------------
# * Get Activation State of Continue
#--------------------------------------------------------------------------
def continue_enabled
DataManager.save_file_exists?
end
#--------------------------------------------------------------------------
# * Object Initialization
#--------------------------------------------------------------------------
alias windowskin_begone_update_placement update_placement
def update_placement
windowskin_begone_update_placement
self.opacity = 0
end
def alignment
return 2
end
end
class Scene_Title < Scene_Base
def create_command_window
@command_window = Window_TitleCommand.new
@command_window.set_handler🙂new_game, method🙂command_new_game))
@command_window.set_handler🙂continue, method🙂command_continue))
@command_window.set_handler🙂options, method🙂command_options))
@command_window.set_handler🙂credits, method🙂command_credits))
@command_window.set_handler🙂shutdown, method🙂command_shutdown))
end
#--------------------------------------------------------------------------
# * Close Command Window
#--------------------------------------------------------------------------
def close_command_window
@command_window.close
update until @command_window.close?
end
#--------------------------------------------------------------------------
# * [New Game] Command
#--------------------------------------------------------------------------
def command_new_game
DataManager.setup_new_game
close_command_window
fadeout_all
$game_map.autoplay
SceneManager.goto(Scene_Map)
end
#--------------------------------------------------------------------------
# * [Continue] Command
#--------------------------------------------------------------------------
def command_continue
close_command_window
SceneManager.call(Scene_Load)
end
#--------------------------------------------------------------------------
# * [Options] Command
#--------------------------------------------------------------------------
def command_options
SceneManager.call(Scene_Options)
end
#--------------------------------------------------------------------------
# * [credits] Command
#--------------------------------------------------------------------------
def command_credits
CreditsWindow.new
end
#--------------------------------------------------------------------------
# * [shut Down] Command
#--------------------------------------------------------------------------
def command_shutdown
close_command_window
fadeout_all
SceneManager.exit
end
end
class CreditsWindow < Window_Base
def initialize()
super( 0, 0, 512, 512)
@CreditsWindow = CreditsWindow.new
end
end