| 
 
| 赞 | 0 |  
| VIP | 44 |  
| 好人卡 | 2 |  
| 积分 | 4 |  
| 经验 | 6159 |  
| 最后登录 | 2025-10-18 |  
| 在线时间 | 188 小时 |  
 Lv2.观梦者 
	梦石0 星屑424 在线时间188 小时注册时间2006-1-8帖子53 | 
| 复制代码
class Menu_Window < Window_Base
  def initialize(battler)
    super(20,20,600,440)
    self.contents = Bitmap.new(width - 32, height - 32)
    @battler = battler
    refresh
  end
  def refresh
    self.contents.clear
    head = RPG::Cache.battler(@battler.battler_name,@battler.battler_hue)
    self.contents.blt(20,20,head,Rect.new(0,0,head.width,head.height))
    y = 20+head.height
    self.contents.draw_text(20,y,100,32,"体力:".to_s,0)
    self.contents.draw_text(20 +  64,y,100,32,$game_variables[1].to_s,0)
    self.contents.draw_text(20 +  96,y,100,32,"/".to_s,0)
    self.contents.draw_text(20 + 128,y,100,32,$game_variables[1].to_s,0)
     
    self.contents.draw_text(20      ,y + 32,100,32,"疲劳:".to_s,0)
    self.contents.draw_text(20 +  64,y + 32,100,32,$game_variables[3].to_s,0)
    self.contents.draw_text(20 +  96,y + 32,100,32,"/".to_s,0)
    self.contents.draw_text(20 + 128,y + 32,100,32,$game_variables[3].to_s,0)
    
    self.contents.draw_text(20     ,y + 64,100,32,"金钱:".to_s,0)
    self.contents.draw_text(20 + 64,y + 64,100,32,$game_party.gold.to_s,0)
    
    self.contents.draw_text(20     ,y + 96,100,32,"赌博币:".to_s,0)
    self.contents.draw_text(20 + 96,y + 96,100,32,$game_variables[4].to_s,0)
    
    self.contents.draw_text(20     ,y + 128,100,32,"步数:".to_s,0)
    self.contents.draw_text(20 + 64,y + 128,100,32,$game_variables[5].to_s,0)
   end  
end
class Window_Time < Window_Base
  def initialize
    super(640-160-10,10,160,64)
    self.contents = Bitmap.new(width - 32, height - 32)
    refresh
  end
  def refresh
    self.contents.clear
    self.contents.draw_text(0,0,100,32,"时间".to_s,0)
  end
end
class Scene_NewMenu
  def main
    @menu_window = Menu_Window.new($game_party.actors[0])
    @menu_window.back_opacity = 160
    @cmd = Window_Command.new(160,["物品","装备","写日记","离开游戏"])
    @cmd.back_opacity = 160
    @cmd.opacity = 255
    @cmd.x = 250
    @cmd.y = 64
    @time_window = Window_Time.new
    @time_window.back_opacity = 160
    # 执行过渡
    Graphics.transition
    # 主循环
    loop do
      # 刷新游戏画面
      Graphics.update
      # 刷新输入信息
      Input.update
      # 刷新画面
      update
      # 如果切换画面就中断循环
      if $scene != self
        break
      end
    end
    # 准备过渡
    Graphics.freeze
    @menu_window.dispose
    @cmd.dispose
    @time_window.dispose
  end
  
  def update
    @time_window.update
    @menu_window.update
    @cmd.update
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      case @cmd.index
      when 0
        $scene=Scene_Item.new
      when 1
        $scene=Scene_Equip.new
      when 2
        $scene=Scene_Save.new
      when 3
        $scene=Scene_Title.new
      end
    end
    if Input.trigger?(Input::B)
      $game_system.se_play($data_system.cancel_se)
      $scene=Scene_Map.new
    end  
  end
end
 # 调用   $scene=Scene_NewMenu.new
 
 
 系统信息:本贴获得楼主认可,66RPG感谢您的热情解答~
 | 
 |