MOG Menu Column-Problem (XP) [SOLVED]

Started by sekiraze, October 08, 2013, 06:52:28 am

Previous topic - Next topic

sekiraze

October 08, 2013, 06:52:28 am Last Edit: October 27, 2013, 07:51:26 pm by sekiraze
Hey there everyone; i have a problem.

i know that

   class Window_Command < Window_Selectable
 #--------------------------------------------------------------------------
 # Adds 3 columns for the title screen
 #--------------------------------------------------------------------------
 def columns
   @column_max = 3
 end
end

adds columns instead of up and down motion to the selection of a menu, but it occures that nothing changes. i have a slightly modified mog menu script *sarcasm*
can anyone help?

i post my script here:


module MOG

 # BASIC MENU CONFIGURATION
   # Main Menu Graphics Used
     MAIN_LAYOUT       = "Layout-Menu"     # Main Menu Graphics
     MAIN_LAYOUT1      = "itemtest"
     MAIN_BACKGROUND_1   = "Back-Menu1"       # Animated background graphic
     MAIN_BACKGROUND_2   = "Back-Menu2"       # Animated background graphic
     MAIN_BACKGROUND_3   = "Back-Menu3"       # Animated background graphic
     MAIN_CURSOR       = "MogCursor"       # Animated cursor graphic
     MAIN_CURSOR_FX    = false             # Animated cursor fx on/off switch
     SECOND_CURSOR     = "MogCursor_2"     # Animated secondary cursor graphic
     SECOND_CURSOR_FX  = false             # Animated second cursor fx
     FACE_SMALL        = "_Fs"             # Suffix for face graphics (small)
     MAIN_MAPNAME      = true              # If true, shows the map name
   # Menu
     MAIN_FX           = 2                 # Back FX (0=Moving/ 1=Still/ 2=Map)
     MAIN_TRAN_TIME    = 1                # Transition Time.
     MAIN_TRAN_TYPE    = "020-Flat01"    # Transition Type (Name)
   # Font Used
     MAIN_FONT         = "Arial"         # Font used in Main Menu
 
 # MENU GAUGE GRAPHICS
   # Empty Bars
     MAIN_BAR_E        = "BAR0"            # Blank bar
     MAIN_BAR_XP_E     = "Exp_Back"        # Blank bar for EXP
   # Fill Bars
     MAIN_BAR_HP       = "HP_Bar"          # Fill bar for HP
     MAIN_BAR_SP       = "SP_Bar"          # Fill bar for SP
     MAIN_BAR_XP       = "Exp_Meter"       # Fill bar for EXP
   # Gauge Texts
     MAIN_TEXT_HP      = "HP_Tx"           # Text graphic for HP
     MAIN_TEXT_SP      = "SP_Tx"           # Text graphic for SP
     MAIN_TEXT_XP      = "Exp_tx"          # Text graphic for EXP
     MAIN_TEXT_LV      = "LV_tx"           # Text graphic for Level
 
     end

# Mogscript global
$mogscript = {} if $mogscript == nil
$mogscript["menu_itigo"] = true

#==============================================================================
# ** Game_Actor
#------------------------------------------------------------------------------
#  This class handles the actor. It's used within the Game_Actors class
#  ($game_actors) and refers to the Game_Party class ($game_party).
#==============================================================================

class Game_Actor < Game_Battler
 def now_exp
 #--------------------------------------------------------------------------
 # * Get EXP
 #--------------------------------------------------------------------------    
   return @exp - @exp_list[@level]
 end
 #--------------------------------------------------------------------------
 # * Get Next Level EXP
 #--------------------------------------------------------------------------
 def next_exp
   return @exp_list[@level+1] > 0 ? @exp_list[@level+1] - @exp_list[@level] : 0
 end
end



#==============================================================================
# ** Game_Map
#------------------------------------------------------------------------------
#  This class handles the map. It includes scrolling and passable determining
#  functions. Refer to "$game_map" for the instance of this class.
#==============================================================================

class Game_Map
 #--------------------------------------------------------------------------
 # * Public Instance Variables
 #--------------------------------------------------------------------------
 attr_reader   :map_id                   # map id
 #--------------------------------------------------------------------------
 # * Map Name
 #--------------------------------------------------------------------------  
 def mpname
   $mpname = load_data("Data/MapInfos.rxdata")
   $mpname[@map_id].name
 end
end



#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  This class is for all in-game windows.
#==============================================================================

class Window_Base < Window
 #--------------------------------------------------------------------------
 # * Draw Empty Face
 #--------------------------------------------------------------------------  
 def nada
   face = RPG::Cache.picture("")
 end    
 #--------------------------------------------------------------------------
 # * Draw Face
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------  

 def draw_face(actor, x, y)
   face = RPG::Cache.picture(actor.name + MOG::FACE_SMALL) rescue nada
   cw = face.width
   ch = face.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x, y - ch, face, src_rect)
 end  
 #--------------------------------------------------------------------------
 # * Draw HP from Image
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------  
 def draw_maphp3(actor, x, y)
   back = RPG::Cache.picture(MOG::MAIN_BAR_E)
   cw = back.width  
   ch = back.height
   src_rect = Rect.new(0, 0, cw, ch)    
   self.contents.blt(0 + 65, y - ch + 30, back, src_rect)
   meter = RPG::Cache.picture(MOG::MAIN_BAR_HP)
   cw = meter.width  * actor.hp / actor.maxhp
   ch = meter.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
   text = RPG::Cache.picture(MOG::MAIN_TEXT_HP)
   cw = text.width  
   ch = text.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 35, y - ch + 30, text, src_rect)
   self.contents.font.color = Color.new(0, 0, 0, 255)
   self.contents.draw_text(x + 81, y - 1, 48, 32, actor.hp.to_s, 2)
   self.contents.font.color = Color.new(255, 255, 255, 255)
   self.contents.draw_text(x + 80, y - 2, 48, 32, actor.hp.to_s, 2)    
 end  
 #--------------------------------------------------------------------------
 # * Draw SP from Image
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------
 def draw_mapsp3(actor, x, y)
   back = RPG::Cache.picture(MOG::MAIN_BAR_E)
   cw = back.width  
   ch = back.height
   src_rect = Rect.new(0, 0, cw, ch)    
   self.contents.blt(x + 65, y - ch + 30, back, src_rect)
   meter = RPG::Cache.picture(MOG::MAIN_BAR_SP)    
   cw = meter.width  * actor.sp / actor.maxsp
   ch = meter.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 65, y - ch + 30, meter, src_rect)
   text = RPG::Cache.picture(MOG::MAIN_TEXT_SP)
   cw = text.width  
   ch = text.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 35, y - ch + 30, text, src_rect)
   self.contents.font.color = Color.new(0, 0, 0, 255)
   self.contents.draw_text(x + 81, y - 1, 48, 32, actor.sp.to_s, 2)
   self.contents.font.color = Color.new(255, 255, 255, 255)
   self.contents.draw_text(x + 80, y - 2, 48, 32, actor.sp.to_s, 2)    
 end  
 #--------------------------------------------------------------------------
 # * Draw EXP from Image
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #--------------------------------------------------------------------------
 def draw_mexp2(actor, x, y)
   bitmap2 = RPG::Cache.picture(MOG::MAIN_BAR_XP_E)
   cw = bitmap2.width
   ch = bitmap2.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 60 , y - ch + 30, bitmap2, src_rect)
   if actor.next_exp != 0
     rate = actor.now_exp.to_f / actor.next_exp
   else
     rate = 1
   end
   bitmap = RPG::Cache.picture(MOG::MAIN_BAR_XP)
   if actor.level < 99
     cw = bitmap.width * rate
   else
     cw = bitmap.width
   end  
   ch = bitmap.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 60 , y - ch + 30, bitmap, src_rect)
   exp_tx = RPG::Cache.picture(MOG::MAIN_TEXT_XP)
   cw = exp_tx.width
   ch = exp_tx.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 55 , y - ch + 30, exp_tx, src_rect)
   lv_tx = RPG::Cache.picture(MOG::MAIN_TEXT_LV)
   cw = lv_tx.width
   ch = lv_tx.height
   src_rect = Rect.new(0, 0, cw, ch)
   self.contents.blt(x + 125 , y - ch + 35, lv_tx, src_rect)
   self.contents.font.color = Color.new(0, 0, 0, 255)
   self.contents.draw_text(x + 31, y - 14, 24, 32, actor.level.to_s, 1)
   self.contents.font.color = Color.new(255, 255, 255, 255)
   self.contents.draw_text(x + 30, y - 14, 24, 32, actor.level.to_s, 1)
 end
 #--------------------------------------------------------------------------
 # * Draw State
 #     actor : actor
 #     x     : draw spot x-coordinate
 #     y     : draw spot y-coordinate
 #     width : draw spot width
 #--------------------------------------------------------------------------
 def draw_actor_state(actor, x, y, width = 80)
   text = make_battler_state_text(actor, width, true)
   self.contents.font.color = actor.hp == 0 ? knockout_color : normal_color
   self.contents.draw_text(x, y, width, 32, text, 2)
 end  
end



#==============================================================================
# ** Window_MenuStatus
#------------------------------------------------------------------------------
#  This window displays party member status on the menu screen.
#==============================================================================

class Window_Command < Window_Selectable
 #--------------------------------------------------------------------------
 # Adds 3 columns for the title screen
 #--------------------------------------------------------------------------
 def columns
   @column_max = 3
 end
end

class Window_MenuStatus < Window_Selectable
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------  
 def initialize
   #super(0, 0, 1248, 704)
   super(304, 112, 700, 480)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("")
   self.opacity = 0
   self.z = 15
   refresh
   self.active = false
   self.index = -1
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------  
 def refresh
   self.contents.clear
   @item_max = $game_party.actors.size
   for i in 0...$game_party.actors.size
     x = 20
     y = i * 62
     actor = $game_party.actors[i]
     self.contents.font.name = MOG::MAIN_FONT
     if $mogscript["TP_System"] == true
       draw_actor_tp(actor, x + 585, y - 5, 4)  
       draw_actor_state(actor, x + 600, y - 5)
     else  
       draw_actor_state(actor, x + 550, y + 121)
     end
     drw_face(actor, x + 295 , y + 169)
     draw_maphp3(actor, x + 305, y + 110)
     draw_mapsp3(actor, x + 305, y + 135)
     draw_mexp2(actor, x + 472, y + 135)
   end
 end
 #--------------------------------------------------------------------------
 # * Cursor Rectangle Update
 #--------------------------------------------------------------------------
 def update_cursor_rect
   if @index < 0
     self.cursor_rect.empty
   else
     self.cursor_rect.set(5, @index * 62, self.width - 32, 50)
   end
 end
end



#==============================================================================
# ** Window_Gold
#------------------------------------------------------------------------------
#  This window displays amount of gold.
#==============================================================================

class Window_Gold < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 64)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("")
   self.opacity = 0
   self.z = 15
   refresh
 end
end



#==============================================================================
# ** Window_PlayTime
#------------------------------------------------------------------------------
#  This window displays play time on the menu screen.
#==============================================================================

class Window_PlayTime < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("")
   self.opacity = 0
   self.z = 15
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   @total_sec = Graphics.frame_count / Graphics.frame_rate
   hour = @total_sec / 60 / 60
   min = @total_sec / 60 % 60
   sec = @total_sec % 60
   text = sprintf("%02d:%02d:%02d", hour, min, sec)
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, text, 2)
 end
end

#==============================================================================
# ** Window_Steps
#------------------------------------------------------------------------------
#  This window displays step count on the menu screen.
#==============================================================================

class Window_Steps < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 160, 96)
   self.contents = Bitmap.new(width - 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("")
   self.opacity = 0
   self.z = 15
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, $game_party.steps.to_s, 2)
 end
end



#==============================================================================
# ** Window_Map_Name
#------------------------------------------------------------------------------
#  This window displays the map name on the menu screen.
#==============================================================================

class Window_Map_Name < Window_Base
 #--------------------------------------------------------------------------
 # * Object Initialization
 #--------------------------------------------------------------------------
 def initialize
   super(0, 0, 400, 450)
   self.contents = Bitmap.new(width + 32, height - 32)
   self.windowskin = RPG::Cache.windowskin("")
   self.opacity = 0
   self.z = 15
   refresh
 end
 #--------------------------------------------------------------------------
 # * Refresh
 #--------------------------------------------------------------------------
 def refresh
   self.contents.clear
   self.contents.font.color = normal_color
   self.contents.draw_text(4, 32, 120, 32, $game_map.mpname.to_s, 1)
 end
end



#==============================================================================
# ** Scene_Menu
#------------------------------------------------------------------------------
#  This class performs menu screen processing.
#==============================================================================








class Scene_Menu
 #--------------------------------------------------------------------------
 # * Main Processing
 #--------------------------------------------------------------------------
 def main
   s1 = ""
   s2 = ""
   s3 = ""
   s4 = ""
   s5 = ""
   s6 = ""
   s7 = ""
   
   @command_window = Window_Command.new(160, [s1, s2, s3, s4, s5, s6, s7])
   @command_window.index = @menu_index
   if $game_party.actors.size == 0
     @command_window.disable_item(0)
     @command_window.disable_item(1)
     @command_window.disable_item(2)
     @command_window.disable_item(3)
   end
   
   # - Top is here - # Look at Line 476 - 484
     
     if MOG::MAIN_FX == 2
 
       
       @spriteset = Spriteset_Map.new
       
       #   @mnback = Plane.new
   #  @mnback.bitmap = RPG::Cache.picture(MOG::MAIN_BACKGROUND)
    # @mnback.blend_type = 2
     
     @mnback = Plane.new
     @mnback.bitmap = RPG::Cache.picture(MOG::MAIN_BACKGROUND_1)
     @mnback.blend_type = 0
     @mnback.z = 0
     @mnback.opacity = 255
     
     @mnback1 = Plane.new
     @mnback1.bitmap = RPG::Cache.picture(MOG::MAIN_BACKGROUND_2)
     @mnback1.blend_type = 0
     @mnback1.z = 0
     @mnback1.opacity = 255
     
     @mnback2 = Plane.new
     @mnback2.bitmap = RPG::Cache.picture(MOG::MAIN_BACKGROUND_3)
     @mnback2.blend_type = 0
     @mnback2.z = 0
     @mnback2.opacity = 255
   
     
     
     else
     @spriteset = Spriteset_Map.new
   end
   
   # \/ used to be on top \/ # Top at Line 456
   @command_window.visible = false
   @command_window.x = -640
   @mnlay = Sprite.new
   @mnlay.bitmap = RPG::Cache.picture(MOG::MAIN_LAYOUT)
   @mnlay.z = 10
   @mnlay.opacity = 0
   @mnlay.x = -100
   
   
   
       @command_window.visible = false
   @command_window.x = -640
   @mnlay1 = Sprite.new
   @mnlay1.bitmap = RPG::Cache.picture(MOG::MAIN_LAYOUT1)
   @mnlay1.z = 10
   @mnlay1.opacity = 0
   @mnlay1.x = -100
   # /\ used to be on top /\ # Top at Line 456
   
   
   @mnsel = Sprite.new
   @mnsel.bitmap = RPG::Cache.picture(MOG::MAIN_CURSOR)
   @mnsel.z = 20
   @mnsel.x = 0
   @mnsel.y = 110
   @mnop = 150
   if $game_system.save_disabled
     @command_window.disable_item(4)
   end
   @playtime_window = Window_PlayTime.new
   @playtime_window.x = 900
   @playtime_window.y = 570
   @playtime_window.contents_opacity = 0
   if MOG::MAIN_MAPNAME == true
     @mapname_window = Window_Map_Name.new
     @mapname_window.x = 735
     @mapname_window.y = 168
     @mapname_window.contents_opacity = 0
   end
  # @steps_window = Window_Steps.new
  # @steps_window.x = 230
  # @steps_window.y = 375
  # @steps_window.contents_opacity = 0
   @gold_window = Window_Gold.new
   @gold_window.x = 1075
   @gold_window.y = 601
   @gold_window.contents_opacity = 0
   @status_window = Window_MenuStatus.new
   @status_window.x = 190
   @status_window.y = 110
   @status_window.contents_opacity = 0
   if MOG::MAIN_FX == 0
     Graphics.transition(MOG::MAIN_TRAN_TIME, "Graphics/Transitions/" +
       MOG::MAIN_TRAN_TYPE)
   elsif MOG::MAIN_FX == 1
     Graphics.transition(MOG::MAIN_TRAN_TIME, "Graphics/Transitions/" +
       MOG::MAIN_TRAN_TYPE)
   else
     Graphics.transition  
   end
   loop do
     Graphics.update
     Input.update
     update
     if $scene != self
       break
     end
   end
   for i in 0..10  
     if MOG::MAIN_FX == 2
       @mnback.oy += 0
       @mnback.ox += -1
       
       @mnback1.oy += 0
       @mnback1.ox += 2
       
       @mnback2.oy += 0
       @mnback2.ox += 1
     #  @mnback2.oy += 1
     #  @mnback2.ox -= 1
     end
     @status_window.x += 20
     @status_window.contents_opacity -= 25
     @mnsel.opacity -= 25
     @mnsel.zoom_x += 0.03
     @mnlay.x -= 10
     @mnlay.opacity -= 25
     
     @mnlay1.x -= 10
     @mnlay1.opacity -= 25
     
     if MOG::MAIN_MAPNAME == true
       @mapname_window.x += 5
       @mapname_window.contents_opacity -= 20
     end
#      @steps_window.contents_opacity -= 25
     @gold_window.contents_opacity -= 25
     @playtime_window.contents_opacity -= 25
     Graphics.update  
   end
   Graphics.freeze
   @command_window.dispose
   @playtime_window.dispose
#    @steps_window.dispose
   @gold_window.dispose    
   @status_window.dispose
   @mnlay.dispose
       
   @mnlay1.dispose
   
   if MOG::MAIN_FX == 2
     @spriteset.dispose
     
     @mnback.dispose
     
     @mnback1.dispose
     @mnback2.dispose
     
#      @mnback2.dispose
   elsif MOG::MAIN_FX == 2
     @mnback.dispose
   else
     @spriteset.dispose
   end
   @mnsel.dispose
   @mapname_window.dispose if MOG::MAIN_MAPNAME == true
   Graphics.update
 end
 #--------------------------------------------------------------------------
 # * Frame Update
 #--------------------------------------------------------------------------
 def update
   if MOG::MAIN_CURSOR_FX
     if @mnsel.zoom_x <= 1.6
       @mnsel.zoom_x += 0.03
       @mnsel.opacity -= 10
     elsif @mnsel.zoom_x > 1.6
       @mnsel.zoom_x = 1.0
       @mnsel.opacity = 255
     end    
   end
   
   
   if @mnlay.x < 0
     @mnlay.opacity += 25
     @mnlay.x += 10
   elsif @mnlay.x >= 0  
     @mnlay.opacity = 255
     @mnlay.x = 0
   end
   
   
   
   ##
   if @mnlay1.x < 0
     @mnlay1.opacity += 25
     @mnlay1.x += 10
   elsif @mnlay1.x >= 0  
     @mnlay1.opacity = 255
     @mnlay1.x = 0
   end
   ##
   
   
   
   @command_window.update if @command_window.active
   @playtime_window.update
   @status_window.update if @status_window.active
   if MOG::MAIN_FX == 2
     @mnback.oy += 0
     @mnback.ox += -1
     
     @mnback1.oy += 0
     @mnback1.ox += 2
     @mnback2.oy += 0
     @mnback2.ox += 1
#      @mnback2.oy += 1
#      @mnback2.ox -= 1
   end
   @mnop += 5
   # Secondary Cursor
   if @command_window.active == true
     @mnsel.bitmap = RPG::Cache.picture(MOG::MAIN_CURSOR)    
   else
     @mnsel.bitmap = RPG::Cache.picture(MOG::SECOND_CURSOR)
     unless MOG::SECOND_CURSOR_FX
       @mnsel.zoom_x = 1
       @mnsel.opacity = 255
     end
   end
   @mapname_window.contents_opacity += 15 if MOG::MAIN_MAPNAME == true
   @playtime_window.contents_opacity += 15
   @gold_window.contents_opacity += 15
   @playtime_window.contents_opacity += 15
#    @steps_window.contents_opacity += 15
   if @status_window.x > 195
     @status_window.x -= 10
     @status_window.contents_opacity += 10
   elsif @status_window.x <= 195
     @status_window.x = 195
     @status_window.contents_opacity = 255
   end
   if @mnop >= 255
     @mnop = 120
   end  
   if @command_window.active
     update_command
     return
   end
   if @status_window.active
     update_status
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when command window is active)
 #--------------------------------------------------------------------------


 
 def update_command
   case @command_window.index
   when 0  
     @mnsel.x = 85 + 300
     @mnsel.y = 133 + 120
   when 1
     @mnsel.x = 85 + 300
     @mnsel.y = 168 + 120
   when 2
     @mnsel.x = 85 + 300
     @mnsel.y = 203 + 120
   when 3
     @mnsel.x = 85 + 300
     @mnsel.y = 240 + 120
   when 4
     @mnsel.x = 85 + 300
     @mnsel.y = 275 + 120
   when 5
     @mnsel.x = 85 + 300
     @mnsel.y = 310 + 120
   when 6
     @mnsel.x = 85 + 300
     @mnsel.y = 345 + 120
   
     end    
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     $scene = Scene_Map.new
     return
   end
   if Input.trigger?(Input::C)
     if $game_party.actors.size == 0 and @command_window.index < 4
       $game_system.se_play($data_system.buzzer_se)
       return
     end
     case @command_window.index
     when 0
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Item.new
     when 1
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 2
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 3
       $game_system.se_play($data_system.decision_se)
       @command_window.active = false
       @status_window.active = true
       @status_window.index = 0
     when 4
       if $game_system.save_disabled
         $game_system.se_play($data_system.buzzer_se)
       return
     end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Save.new
     when 5
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Picture_Gallery.new
     when 6
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_End.new
     
     
############OPTION MENU#############
#        when 7
#       $game_system.se_play($data_system.decision_se)
#        $scene =  Scene_Option.new
############OPTION MENU#############      
       
     
       end
     return
   end
 end
 #--------------------------------------------------------------------------
 # * Frame Update (when status window is active)
 #--------------------------------------------------------------------------
 def update_status  
   case @status_window.index
   when 0  
     @mnsel.x = 220 + 300
     @mnsel.y = 273
   when 1
     @mnsel.x = 220 + 300
     @mnsel.y = 335
   when 2
     @mnsel.x = 220 + 300
     @mnsel.y = 397
   when 3
     @mnsel.x = 220 + 300
     @mnsel.y = 464
   end  
   if Input.trigger?(Input::B)
     $game_system.se_play($data_system.cancel_se)
     @command_window.active = true
     @status_window.active = false
     @status_window.index = -1
     return
   end
   if Input.trigger?(Input::C)
     case @command_window.index
     when 1
       if $game_party.actors[@status_window.index].restriction >= 2
         $game_system.se_play($data_system.buzzer_se)
         return
       end
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Skill.new(@status_window.index)
     when 2  
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Equip.new(@status_window.index)
     when 3  
       $game_system.se_play($data_system.decision_se)
       $scene = Scene_Status.new(@status_window.index)
       end
     return
   end
 end
end


i appreciate help :)

on addition: i want pictures to apear from left to right on what ever menu-point i am. for instance it starts on Item, so a picture comes from the left side into the scene. when i change to Skil, the item-picture disposes and the next one apears, but i think i could solve this by my own.

thank you; seki <3

KK20

October 14, 2013, 01:18:19 pm #1 Last Edit: October 14, 2013, 01:32:21 pm by KK20
Post a demo of your project instead. Scripts requiring graphics in order to work is too much of a hassle.

EDIT: Actually, Window_Command only uses one column. Window_Selectable can have more columns. Changing @column_max in Window_Command won't do anything because @column_max is not even considered when drawing contents to the window.

I'll still need a demo for your other request though.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

sekiraze


sekiraze

October 14, 2013, 03:28:53 pm #3 Last Edit: October 14, 2013, 05:43:07 pm by sekiraze
 here is a screen of what i mean with the 2nd option o;



ill try to explain: the menu is horizontal, with options on a horizontal line. you see on the pic the menupoint "item" when you open the menu; the menu-point item is highlited and the fonts come in from the left to the right, when you move over the cursor to the right, to the next tab, the last one just disposes and the next one slides in (its a photoshop documentation of what it could look like; no actuall ingame menu yet.)

KK20

I don't know if you read my edited post or not, mentioning the columns problem. Anyways, after looking at this, you will need to make a Window_Selectable version of the menu window. The #update method can also be edited so that it takes LEFT and RIGHT input rather than UP and DOWN.

As for the images, every time the player presses LEFT/RIGHT, you can change the image, set its x-coordinate back to some negative number like -100, and change its opacity level back to 0. This is the part that's controlling your "ITEM" graphic in the Scene_Menu#update method:

    if @mnlay1.x < 0
      @mnlay1.opacity += 25
      @mnlay1.x += 10
    elsif @mnlay1.x >= 0 
      @mnlay1.opacity = 255
      @mnlay1.x = 0
    end

So, logically, this is what you should do (in pseudocode). The above code will take care of the animation effect.

class Scene_Menu
def update
###### Somewhere in this method, you figure out where is the best place to put this:
# if player inputs left or right
  # check the menu window's cursor's index (@command_window.index)
  # based on this value, change @mnlay1.bitmap to the appropriate graphic (0 = Item, 1 = Ability, 2 = Equips, etc.)
  # @mnlay1.x = -100; @mnlay1.opacity = 0

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

sekiraze

October 23, 2013, 05:33:17 pm #5 Last Edit: October 23, 2013, 05:50:17 pm by sekiraze
you sir are a genius; I'm terribly sorry, that i haven't seen it. it is my mistake :( but thanks very much!!! i will try it tomorrow as soon as i wake up :D
<3

Edit: screw sleep, allnighter :D

sekiraze

Ok, I have a problem:
I get the whole logic and stuff, but bare with me while i'll explain it to myself again:

First, i preload all the pictures offscreen (mnlay1, mnlay2, etc).
When the cursor is on 1 then mnlay1 changea position to onscreen.
When the cursor is on 2, mnlay1 goes offscreen anf mmlay2 shows.

In terms of logic; do i have to put in a if-then clause after the update section?
If so: i screwed it up. Somehow nothing seems to wirk anymore propperly.
The problem is, that the picture is just there now, no sliding or fading.
2ndly, i havent made a backup and duh; das stupid.

Having this said; i dont get, how to change the selection to collums. I felt like a retard while i was looking for it :I

I hope i can figure it out.

~seki

KK20

October 26, 2013, 01:11:33 pm #7 Last Edit: October 27, 2013, 12:20:20 am by KK20
The idea is to change mnlay1's bitmap, not creating multiple mnlayX variables.
Spoiler: ShowHide


def update
 . . . #previous code

   if @mnlay1.x < 0
     @mnlay1.opacity += 25
     @mnlay1.x += 10
   elsif @mnlay1.x >= 0  
     @mnlay1.opacity = 255
     @mnlay1.x = 0
   end

 if Input.press?(Input::LEFT) or Input.press?(Input::RIGHT)
   case @command_window.index
   when 0  # ITEM
     @mnlay1.bitmap = RPG::Cache.picture('menu_item_bg')
   when 1  # EQUIPS
     @mnlay1.bitmap = RPG::Cache.picture('menu_equips_bg')
   # Repeat as necessary
   end
   @mnlay1.x = -100
   @mnlay1.opacity = 0
 end

 . . . #rest of the code
end


EDIT: What exactly do you mean by "change the selection to columns"? I understand you want the Window_Command to display its contents horizontally rather than vertically, but the highlighted cursor is being controlled  by a separate image in update_command. Just change the graphics coordinates.

Other Projects
RPG Maker XP Ace  Upgrade RMXP to RMVXA performance!
XPA Tilemap  Tilemap rewrite with many features, including custom resolution!

Nintendo Switch Friend Code: 8310-1917-5318
Discord: KK20 Tyler#8901

Join the CP Discord Server!

sekiraze

duh -.- im retarded.  :facepalm: i finally got it. i was confused by your last post. but now i understand each and every detail. i think thread can be closed