Right, in a nutshell I have a custom menu set up with 3 different pictures instead of a command window. the pictures are aligned horizontally, however, if I try to scroll left and right between them I can't, if I press up or down I can scroll through em.
I have tried a lot of things on my own but I think I'm gonna have to admit defeat and ask for a bit of help.
I cant stress enough however that I only want the horizontal scrolling for this particular scene and adjusting the number of columns in Window_Selectable also makes the title screen command window move horizontally (I want a vertical title screen)
here is the code
the 3 pictures are just 3 boxes with text that each have a different one highlighted btw.
please someone help me as I dont want to continue with my project until I have the menu sorted.
thanks.
I have tried a lot of things on my own but I think I'm gonna have to admit defeat and ask for a bit of help.
I cant stress enough however that I only want the horizontal scrolling for this particular scene and adjusting the number of columns in Window_Selectable also makes the title screen command window move horizontally (I want a vertical title screen)
here is the code
Code:
#==============================================================================#
# Basic CMS V 1.0 #
# This script is a modification of Mog's Sence Menu Itigo V1.5 #
#==============================================================================#
module Layout
# Main Menu Graphics Used
Background = "" # Main Menu Graphics
# MENU BUTTONS
MENU_TYPE_1 = "Menu_button1" # Button layout
MENU_TYPE_2 = "Menu_button2"
MENU_TYPE_3 = "Menu_button3"
end
#==============================================================================
# ** Scene_Journal
#------------------------------------------------------------------------------
# This class performs journal screen processing.
#==============================================================================
class Scene_Menu
#--------------------------------------------------------------------------
# * Object Initialization
# menu_index : command cursor's initial position
#--------------------------------------------------------------------------
def initialize(menu_index = 0)
@menu_index = menu_index
end
#--------------------------------------------------------------------------
# * Main Processing
#--------------------------------------------------------------------------
def main
# Make command window
s1 = ""
s2 = ""
s3 = ""
@command_window = Window_Command.new(160, [s1, s2, s3])
@command_window.index = @menu_index
@command_window.opacity = 0
@command_window.windowskin = RPG::Cache.windowskin("")
# Draws the pictures for the menu
@mnlay = Sprite.new
@mnlay.bitmap = RPG::Cache.picture(Layout::Background)
@mnlay.opacity = 255
@mncom = Sprite.new
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_1)
@mncom.z = 100
# Execute transition
Graphics.transition
# Main loop
loop do
# Update game screen
Graphics.update
# Update input information
Input.update
# Frame update
update
# Abort loop if screen is changed
if $scene != self
break
end
end
# Prepare for transition
Graphics.freeze
@mnlay.dispose
@mncom.dispose
# Dispose of windows
@command_window.dispose
end
#--------------------------------------------------------------------------
# * Frame Update
#--------------------------------------------------------------------------
def update
# Update windows
@command_window.update
# If command window is active: call update_command
if @command_window.active
update_command
return
end
end
def update_command
case @command_window.index
when 0
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_1)
when 1
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_2)
when 2
@mncom.bitmap = RPG::Cache.picture(Layout::MENU_TYPE_3)
end
if Input.trigger?(Input::B)
# If the player presses cancel, what do you want it to do
$game_system.se_play($data_system.cancel_se)
$scene = Scene_Map.new
# Replace $scene = Scene_Menu.new with whichever scene you want
# to return to after they cancel this menu.
# to return to the map replace it with, $scene = Scene_Map.new
return
end
if Input.trigger?(Input::C)
# If the player presses the confirm button...
case @command_window.index
when 0
# and the first option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_Item.new
when 1
# and the second option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_Save.new
when 2
# and the third option is selected
$game_system.se_play($data_system.decision_se)
$scene = Scene_End.new
end
# Keep in mind, Whatever scene you transfer to will still exit into whatever
# Menu it is defined to exit into, NOT this one (unless you change it to this 1)
end
end
end
the 3 pictures are just 3 boxes with text that each have a different one highlighted btw.
please someone help me as I dont want to continue with my project until I have the menu sorted.
thanks.