| 赞 | 62 |
| VIP | |
| 好人卡 | |
| 积分 | 65 |
| 经验 | |
| 最后登录 | 2025-2-24 |
| 在线时间 | 1275 小时 |
百合控
- 梦石
- 0
- 星屑
- 6548
- 在线时间
- 1275 小时
- 注册时间
- 2013-8-21
- 回帖
- 3522

|
发表于 2013-10-24 20:42:54
|
显示全部楼层
本帖最后由 余烬之中 于 2013-10-24 20:46 编辑
效果图:
方法:
打开脚本编辑器
找到这个:
在其中进行如下改正:
然后再找到这个
改
完成
完成代码:
Window_MenuCommand
一定要替换原来的而不是插入到原来的之下
也就是说 把原来的删掉 把这个插入
- #encoding:utf-8
- #==============================================================================
- # ■ Window_MenuCommand
- #------------------------------------------------------------------------------
- # 菜单画面中显示指令的窗口
- #==============================================================================
- class Window_MenuCommand < Window_HorzCommand
- #--------------------------------------------------------------------------
- # ● 初始化指令选择位置(类方法)
- #--------------------------------------------------------------------------
- def self.init_command_position
- @@last_command_symbol = nil
- end
- #--------------------------------------------------------------------------
- # ● 初始化对象
- #--------------------------------------------------------------------------
- def initialize
- super(96 + 16, Graphics.height - 50)
- select_last
- end
- #--------------------------------------------------------------------------
- # ● 获取窗口的宽度
- #--------------------------------------------------------------------------
- def window_width
- return Graphics.width - 96 - 16
- end
- #--------------------------------------------------------------------------
- # ● 获取显示行数
- #--------------------------------------------------------------------------
- def visible_line_number
- 1
- end
- #--------------------------------------------------------------------------
- # ● 生成指令列表
- #--------------------------------------------------------------------------
- def make_command_list
- add_main_commands
- add_formation_command
- add_original_commands
- add_save_command
- add_game_end_command
- end
- #--------------------------------------------------------------------------
- # ● 向指令列表添加主要的指令
- #--------------------------------------------------------------------------
- def add_main_commands
- add_command(Vocab::item, :item, main_commands_enabled)
- #~ add_command(Vocab::skill, :skill, main_commands_enabled)
- #~ add_command(Vocab::equip, :equip, main_commands_enabled)
- #~ add_command(Vocab::status, :status, main_commands_enabled)
- end
- #--------------------------------------------------------------------------
- # ● 添加整队指令
- #--------------------------------------------------------------------------
- def add_formation_command
- #~ add_command(Vocab::formation, :formation, formation_enabled)
- end
- #--------------------------------------------------------------------------
- # ● 独自添加指令用
- #--------------------------------------------------------------------------
- def add_original_commands
- end
- #--------------------------------------------------------------------------
- # ● 添加存档指令
- #--------------------------------------------------------------------------
- def add_save_command
- #~ add_command(Vocab::save, :save, save_enabled)
- end
- #--------------------------------------------------------------------------
- # ● 添加游戏结束指令
- #--------------------------------------------------------------------------
- def add_game_end_command
- add_command(Vocab::game_end, :game_end)
- end
- #--------------------------------------------------------------------------
- # ● 获取主要指令的有效状态
- #--------------------------------------------------------------------------
- def main_commands_enabled
- $game_party.exists
- end
- #--------------------------------------------------------------------------
- # ● 获取整队的有效状态
- #--------------------------------------------------------------------------
- def formation_enabled
- $game_party.members.size >= 2 && !$game_system.formation_disabled
- end
- #--------------------------------------------------------------------------
- # ● 获取存档的有效状态
- #--------------------------------------------------------------------------
- def save_enabled
- !$game_system.save_disabled
- end
- #--------------------------------------------------------------------------
- # ● 按下确定键时的处理
- #--------------------------------------------------------------------------
- def process_ok
- @@last_command_symbol = current_symbol
- super
- end
- #--------------------------------------------------------------------------
- # ● 返回最后一个选项的位置
- #--------------------------------------------------------------------------
- def select_last
- select_symbol(@@last_command_symbol)
- end
- #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- #|||||||||||||||||||||||||| |||||||||||||||||||||||||||
- #|||||||||||||||||||||||||| ●以下是新增内容● |||||||||||||||||||||||||||
- #|||||||||||||||||||||||||| |||||||||||||||||||||||||||
- #||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- #--------------------------------------------------------------------------
- # ● 获取列数
- #--------------------------------------------------------------------------
- def col_max
- item_max
- end
- end
复制代码
Scene_Menu
- #encoding:utf-8
- #==============================================================================
- # ■ Scene_Menu
- #------------------------------------------------------------------------------
- # 菜单画面
- #==============================================================================
- class Scene_Menu < Scene_MenuBase
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- create_command_window
- create_gold_window
- create_status_window
- end
- #--------------------------------------------------------------------------
- # ● 生成指令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- @command_window = Window_MenuCommand.new
- @command_window.set_handler(:item, method(:command_item))
- #~ @command_window.set_handler(:skill, method(:command_personal))
- #~ @command_window.set_handler(:equip, method(:command_personal))
- #~ @command_window.set_handler(:status, method(:command_personal))
- #~ @command_window.set_handler(:formation, method(:command_formation))
- #~ @command_window.set_handler(:save, method(:command_save))
- @command_window.set_handler(:game_end, method(:command_game_end))
- @command_window.set_handler(:cancel, method(:return_scene))
- end
- #--------------------------------------------------------------------------
- # ● 生成金钱窗口
- #--------------------------------------------------------------------------
- ############## 原 ###########
- #~ def create_gold_window
- #~ @gold_window = Window_Gold.new
- #~ @gold_window.x = 0
- #~ @gold_window.y = Graphics.height - @gold_window.height
- #~ end
- ############## 改 ###########
- def create_gold_window
- @face_window = Window_Base.new(0, Graphics.height - 112, 112, 112)
- @face_window.draw_actor_face($game_party.members[0], 0, 0)
- end
- #--------------------------------------------------------------------------
- # ● 生成状态窗口
- #--------------------------------------------------------------------------
- def create_status_window
- #~ @status_window = Window_MenuStatus.new(@command_window.width, 0)
- end
- #--------------------------------------------------------------------------
- # ● 指令“物品”
- #--------------------------------------------------------------------------
- def command_item
- SceneManager.call(Scene_Item)
- end
- #--------------------------------------------------------------------------
- # ● 指令“技能”“装备”“状态”
- #--------------------------------------------------------------------------
- def command_personal
- @status_window.select_last
- @status_window.activate
- @status_window.set_handler(:ok, method(:on_personal_ok))
- @status_window.set_handler(:cancel, method(:on_personal_cancel))
- end
- #--------------------------------------------------------------------------
- # ● 指令“整队”
- #--------------------------------------------------------------------------
- def command_formation
- @status_window.select_last
- @status_window.activate
- @status_window.set_handler(:ok, method(:on_formation_ok))
- @status_window.set_handler(:cancel, method(:on_formation_cancel))
- end
- #--------------------------------------------------------------------------
- # ● 指令“存档”
- #--------------------------------------------------------------------------
- def command_save
- SceneManager.call(Scene_Save)
- end
- #--------------------------------------------------------------------------
- # ● 指令“结束游戏”
- #--------------------------------------------------------------------------
- def command_game_end
- SceneManager.call(Scene_End)
- end
- #--------------------------------------------------------------------------
- # ● 个人指令“确定”
- #--------------------------------------------------------------------------
- def on_personal_ok
- case @command_window.current_symbol
- when :skill
- SceneManager.call(Scene_Skill)
- when :equip
- SceneManager.call(Scene_Equip)
- when :status
- SceneManager.call(Scene_Status)
- end
- end
- #--------------------------------------------------------------------------
- # ● 个人指令“取消”
- #--------------------------------------------------------------------------
- def on_personal_cancel
- @status_window.unselect
- @command_window.activate
- end
- #--------------------------------------------------------------------------
- # ● 整队“确定”
- #--------------------------------------------------------------------------
- def on_formation_ok
- if @status_window.pending_index >= 0
- $game_party.swap_order(@status_window.index,
- @status_window.pending_index)
- @status_window.pending_index = -1
- @status_window.redraw_item(@status_window.index)
- else
- @status_window.pending_index = @status_window.index
- end
- @status_window.activate
- end
- #--------------------------------------------------------------------------
- # ● 整队“取消”
- #--------------------------------------------------------------------------
- def on_formation_cancel
- if @status_window.pending_index >= 0
- @status_window.pending_index = -1
- @status_window.activate
- else
- @status_window.unselect
- @command_window.activate
- end
- end
- end
复制代码 |
评分
-
查看全部评分
|