need cms help (resolved)

Started by nathmatt, January 04, 2010, 01:24:47 pm

Previous topic - Next topic

nathmatt

January 04, 2010, 01:24:47 pm Last Edit: January 14, 2010, 07:57:30 am by nathmatt
ok im making a cms my problem right now is i cant get the icons to appear in my menu & i cant get my black bar to cover the moving text

#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu 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
   @command_window = Window_Command2.new(160,['Items','Symbology','Equipment',
   'Status','Config','Tactics','Dictionary','Card'])
   @command_window.index = @menu_index
   @command_window.y = 70
   # Execute transition
   Graphics.transition
   @menu_window = Window_Menu.new
   # 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
   # Dispose of windows
   @command_window.dispose
   @menu_window.dispose
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   # Update windows
   @command_window.update
   @menu_window.update
   # If command window is active: call update_command
   if @command_window.active
     update_command
     return
   end
   # If status window is active: call update_status
   if @status_window.active
     update_status
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when command window is active)
 #--------------------------------------------------------------------------
 def update_command
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Switch to map screen
     $scene = Scene_Map.new
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # If command other than save or end game, and party members = 0
     if $game_party.actors.size == 0 and @command_window.index < 4
       # Play buzzer SE
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     # Branch by command window cursor position
     case @command_window.index
     when 0  # item
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to item screen
       $scene = Scene_Item.new
     when 1  # skill
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 2  # equipment
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 3  # status
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Make status window active
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 4  # save
       # If saving is forbidden
       if $game_system.save_disabled
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to save screen
       $scene = Scene_Save.new
     when 5  # end game
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to end game screen
       $scene = Scene_End.new
     end
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when status window is active)
 #--------------------------------------------------------------------------
 def update_status
   # If B button was pressed
   if Input.trigger?(Input::B)
     # Play cancel SE
     $game_system.se_play($data_system.cancel_se)
     # Make command window active
     @command_window.active = true
     @status_window.active = false
     @status_window.index = -1
     return
   end
   # If C button was pressed
   if Input.trigger?(Input::C)
     # Branch by command window cursor position
     case @command_window.index
     when 1  # skill
       # If this actor's action limit is 2 or more
       if $game_party.actors[@status_window.index].restriction >= 2
         # Play buzzer SE
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to skill screen
       $scene = Scene_Skill.new(@status_window.index)
     when 2  # equipment
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to equipment screen
       $scene = Scene_Equip.new(@status_window.index)
     when 3  # status
       # Play decision SE
       $game_system.se_play($data_system.decision_se)
       # Switch to status screen
       $scene = Scene_Status.new(@status_window.index)
     end
     return
   end
 end
end
#==============================================================================
# ** Window_Command
#------------------------------------------------------------------------------
#  This window deals with general command choices.
#==============================================================================

class Window_Command2 < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #     width    : window width
 #     commands : command text string array
 #--------------------------------------------------------------------------
def initialize(width, commands)
   # Compute window height from command quantity
   super(0, 0, width, commands.size * 32 + 32)
   @item_max = commands.size
   @commands = commands
   self.contents = Bitmap.new(width - 32, @item_max * 32)
   refresh
   self.index = 0
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   for i in 0...@item_max
     draw_item(i, normal_color)
   end
 end
 #--------------------------------------------------------------------------
 # * Draw Item
 #     index : item number
 #     color : text color
 #--------------------------------------------------------------------------
 def draw_item(i, color)
   self.contents.fill_rect(0, i*32, 148, 32, Color.new(0, 0, 0, 0))
   bitmap = RPG::Cache.icon(@commands[i])
   self.contents.font.color = color
   self.contents.draw_text(32, i*32, 148, 32, @commands[i])
 end
 #--------------------------------------------------------------------------
 # * Disable Item
 #     index : item number
 #--------------------------------------------------------------------------
 def disable_item(index)
   draw_item(index, disabled_color)
 end
end
#==============================================================================
# ** Window_Steps
#------------------------------------------------------------------------------
#  This window displays step count on the menu screen.
#==============================================================================

class Window_Menu < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 640, 480)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.opacity = 0
   @Help_Window = 'View Items'
   @x = 640
   update
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def update
   if @x == 0
     @x=640
   else
     @x-=2
   end
   self.contents.clear
   self.contents.font.size = Font.default_size
   self.contents.font.color = normal_color
   self.contents.fill_rect(0, 0, 120, 32, Color.new(0,0,0))
   self.contents.draw_text(0, 0, 120, 32, 'Main Menu',2)
   self.contents.draw_text(@x, 0, 120, 32, @Help_Window.to_s,2)
   self.contents.font.size = 15
   self.contents.draw_text(15, 30, 120, 32, 'HELP')
   self.contents.fill_rect(0, 32, width, 3, normal_color)
   self.contents.fill_rect(0, 33, 5, 2, normal_color)
   self.contents.fill_rect(1, 35, 5, 2, normal_color)
   self.contents.fill_rect(2, 37, 5, 2, normal_color)
   self.contents.fill_rect(3, 39, 5, 2, normal_color)
   self.contents.fill_rect(4, 41, 5, 2, normal_color)
   self.contents.fill_rect(5, 42, 5, 2, normal_color)
   self.contents.fill_rect(6, 43, 5, 2, normal_color)
   self.contents.fill_rect(7, 44, 5, 2, normal_color)
  end
end
Join Dead Frontier
Sorry, I will no longer be scripting for RMXP. I may or may not give support for my scripts. I don't have the will to script in RGSS anymore.
My script