| 
 
| 赞 | 3 |  
| VIP | 109 |  
| 好人卡 | 208 |  
| 积分 | 3 |  
| 经验 | 22037 |  
| 最后登录 | 2025-4-27 |  
| 在线时间 | 1196 小时 |  
 Lv2.观梦者 虚構歪曲
	梦石0 星屑334 在线时间1196 小时注册时间2010-12-18帖子3928 
 | 
| 
本帖最后由 忧雪の伤 于 2011-3-13 09:59 编辑
x
加入我们,或者,欢迎回来。您需要 登录 才可以下载或查看,没有帐号?注册会员  
 在使用前请先使用:
 http://rpg.blue/thread-169595-1-1.html
 
 
 复制代码#______________________________________________________________________________
# * 此脚本归66RPG - Idint Script Association(ISA)所有,谢绝任何形式转载。
#______________________________________________________________________________
#==============================================================================
# ■ 标题分割选项 - Division Title Options
#------------------------------------------------------------------------------
#   遵守协议:66RPG - Idint Script Association(ISA)
#   初始脚本:忧雪の伤
#   更新优化:无
#   当前版本:1.0.0.1
#------------------------------------------------------------------------------
#   更新日记:忧雪の伤(2011.3.12)
#             - 初始化对象
#             忧雪の伤(2011.3.13)
#             - 修复致命问题
#------------------------------------------------------------------------------
#   功能介绍:把标题选项分割成三个独立的窗口。
#   使用方法:插入接入包的下端处。
#   存在问题:无
#==============================================================================
#--------------------------------------------------------------------------
# ● 资料记录
#--------------------------------------------------------------------------
module ISA
   Use["标题分割选项"] = [true, "1.0.0.1"]
   System["标题分割选项"] = {}
end
 
#--------------------------------------------------------------------------
# ● 设定部分
#--------------------------------------------------------------------------
module ISA
  System["标题分割选项"]["高度间隔"] = 70
  System["标题分割选项"]["新游戏"] = "新游戏"
  System["标题分割选项"]["继续"] = "继续"
  System["标题分割选项"]["退出"] = "退出"
  System["标题分割选项"]["字体大小"] = 20
end
#==============================================================================
# ■ Window_Title_command
#------------------------------------------------------------------------------
#  显示标题选项的窗口。
#==============================================================================
class Window_Title_command < Window_Base
  include ISA
  #--------------------------------------------------------------------------
  # ● 初始化窗口
  #--------------------------------------------------------------------------
  def initialize(name)
    super(0, 0, 152, 64)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.opacity = 160
    @name = name 
    refresh
  end
  #--------------------------------------------------------------------------
  # ● 刷新
  #--------------------------------------------------------------------------
  def refresh
    self.contents.clear
    self.contents.font.size = System["标题分割选项"]["字体大小"]
    self.contents.draw_text(0, 0, 120, 32, @name, 1)
  end
end
#==============================================================================
# ■ Window_Command
#------------------------------------------------------------------------------
#  一般的命令选择行窗口。
#==============================================================================
class Window_Command < Window_Selectable
  #--------------------------------------------------------------------------
  # ● 初始化对像
  #     width    : 窗口的宽
  #     commands : 命令字符串序列
  #--------------------------------------------------------------------------
  alias :division_title_options_initialize :initialize unless method_defined? :division_title_options_initialize
  def initialize(width, commands)
    division_title_options_initialize(width, commands)
    if $scene.is_a?(Scene_Title)
      self.visible = false
      self.active = false
      self.index = -1
    end
  end
end
#==============================================================================
# ■ Scene_Title
#------------------------------------------------------------------------------
#  处理标题画面的类。
#==============================================================================
class Scene_Title 
  include ISA
  #--------------------------------------------------------------------------
  # ● 主处理
  #--------------------------------------------------------------------------
  alias :division_title_options_main :main unless method_defined? :division_title_options_main
  def main 
    $data_system = load_data("Data/System.rxdata")
    $game_system = Game_System.new 
    name = []
    name[0] = System["标题分割选项"]["新游戏"]
    name[1] = System["标题分割选项"]["继续"]    
    name[2] = System["标题分割选项"]["退出"]    
    @title_command = [] 
    @title_command[0] = Window_Title_command.new(name[0])
    @title_command[1] = Window_Title_command.new(name[1])
    @title_command[2] = Window_Title_command.new(name[2])
    for i in 0..2
      @title_command[i].x = 320 - @title_command[i].width / 2
      @title_command[i].y = 288 - System["标题分割选项"]["高度间隔"]
    end
    @title_command[1].y += System["标题分割选项"]["高度间隔"]
    @title_command[2].y += System["标题分割选项"]["高度间隔"] * 2
    @title_command_index = 0
    @continue_enabled = false
    for i in 0..3
      if FileTest.exist?("Save#{i+1}.rxdata")
        @continue_enabled = true
      end
    end
    if @continue_enabled
      @title_command_index = 1
    else
      @title_command[1].contents_opacity = 160
    end
    division_title_options_main
    for i in 0..2
      @title_command[i].dispose
    end
  end
  #--------------------------------------------------------------------------
  # ● 刷新画面
  #--------------------------------------------------------------------------
  alias :division_title_options_update :update unless method_defined? :division_title_options_update
  def update
    division_title_options_update
    if Input.trigger?(Input::DOWN)
      $game_system.se_play($data_system.cursor_se)
      if @title_command_index > 1
        @title_command_index = 0
      else
        @title_command_index += 1
      end
    end
    if Input.trigger?(Input::UP)
      $game_system.se_play($data_system.cursor_se)
      if @title_command_index < 1
        @title_command_index = 2
      else
        @title_command_index -= 1
      end
    end
    if Input.trigger?(Input::C)
      case @title_command_index
      when 0 
        command_new_game
      when 1 
        command_continue
      when 2 
        command_shutdown
      end
    end
    case @title_command_index
    when 0
      @title_command[0].opacity = 255
      @title_command[1].opacity = 160
      @title_command[2].opacity = 160
    when 1
      @title_command[0].opacity = 160
      @title_command[1].opacity = 255
      @title_command[2].opacity = 160
    when 2
      @title_command[0].opacity = 160
      @title_command[1].opacity = 160
      @title_command[2].opacity = 255
    end
  end
end
 使用方法脚本内……截图下面
 
 
 
   | 
 |