赞 | 1 |
VIP | 3 |
好人卡 | 12 |
积分 | 1 |
经验 | 20516 |
最后登录 | 2020-2-16 |
在线时间 | 218 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 55
- 在线时间
- 218 小时
- 注册时间
- 2013-12-17
- 帖子
- 386
|
- #==============================================================================
- # ■ Scene_Menu
- #------------------------------------------------------------------------------
- # 处理菜单画面的类。
- #==============================================================================
- class Scene_Menu < Scene_Base
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # menu_index : 命令窗口光标初始位置
- #--------------------------------------------------------------------------
- def initialize(menu_index = 0)
- @menu_index = menu_index
- end
- #--------------------------------------------------------------------------
- # ● 开始处理
- #--------------------------------------------------------------------------
- def start
- super
- create_menu_background
- create_command_window
- @status_window = Window_MenuStatus.new(160, 0)
- end
- #--------------------------------------------------------------------------
- # ● 结束处理
- #--------------------------------------------------------------------------
- def terminate
- super
- dispose_menu_background
- @command_window.dispose
- @status_window.dispose
- end
- #--------------------------------------------------------------------------
- # ● 更新画面
- #--------------------------------------------------------------------------
- def update
- super
- update_menu_background
- @command_window.update
- @status_window.update
- update_command_selection if @command_window.active
- end
- #--------------------------------------------------------------------------
- # ● 生成命令窗口
- #--------------------------------------------------------------------------
- def create_command_window
- s1 = Vocab::item
- s2 = Vocab::save
- @command_window = Window_Command.new(160, [s1, s2])
- @command_window.index = @menu_index
- if $game_party.members.size == 0 # 如果队伍为空
- @command_window.draw_item(0, false) # 无效化物品选项
- end
- if $game_system.save_disabled # 如果禁止存档
- @command_window.draw_item(4, false) # 无效化存档选项
- end
- end
- #--------------------------------------------------------------------------
- # ● 更新命令窗口
- #--------------------------------------------------------------------------
- def update_command_selection
- if Input.trigger?(Input::B)
- Sound.play_cancel
- $scene = Scene_Map.new
- elsif Input.trigger?(Input::C)
- if $game_party.members.size == 0 and @command_window.index < 4
- Sound.play_buzzer
- return
- elsif $game_system.save_disabled and @command_window.index == 4
- Sound.play_buzzer
- return
- end
- Sound.play_decision
- case @command_window.index
- when 0 # 物品
- $scene = Scene_Item.new
- when 1
- $scene = Scene_File.new(true, false, false)
- end
- end
- end
- end
- #==============================================================================
- # ■ Scene_File
- #------------------------------------------------------------------------------
- # 存档画面及读档画面的类。
- #==============================================================================
- class Scene_File < Scene_Base
- #--------------------------------------------------------------------------
- # ● 回到原画面
- #--------------------------------------------------------------------------
- def return_scene
- if @from_title
- $scene = Scene_Title.new
- elsif @from_event
- $scene = Scene_Map.new
- else
- $scene = Scene_Menu.new(1)
- end
- end
- end
- #==============================================================================
- # ■ Scene_Item
- #------------------------------------------------------------------------------
- # 处理物品画面的类。
- #==============================================================================
- class Scene_Item < Scene_Base
- #--------------------------------------------------------------------------
- # ● 回到原画面
- #--------------------------------------------------------------------------
- def return_scene
- $scene = Scene_Menu.new(0)
- end
- end
- #==============================================================================
- # ■ Window_MenuStatus
- #------------------------------------------------------------------------------
- # 显示菜单画面和同伴状态的窗口。
- #==============================================================================
- class Window_MenuStatus < Window_Selectable
- #--------------------------------------------------------------------------
- # ● 初始化对像
- # x : 窗口 X 座标
- # y : 窗口 Y 座标
- #--------------------------------------------------------------------------
- def initialize(x, y)
- super(x, y, 384, 416)
- refresh
- self.active = false
- self.index = -1
- end
- #--------------------------------------------------------------------------
- # ● 刷新
- #--------------------------------------------------------------------------
- def refresh
- self.contents.clear
- @item_max = $game_party.members.size
- for actor in $game_party.members
- draw_actor_face(actor, 2, actor.index * 96 + 2, 92)
- x = 104
- y = actor.index * 96 + WLH / 2
- draw_actor_name(actor, x, y)
- draw_actor_level(actor, x, y + WLH * 1)
- draw_actor_state(actor, x, y + WLH * 2)
- end
- end
- #--------------------------------------------------------------------------
- # ● 更新光标
- #--------------------------------------------------------------------------
- def update_cursor
- if [url=home.php?mod=space&uid=370741]@Index[/url] < 0 # 无光标
- self.cursor_rect.empty
- elsif @index < @item_max # 一般
- self.cursor_rect.set(0, @index * 96, contents.width, 96)
- elsif @index >= 100 # 使用本身
- self.cursor_rect.set(0, (@index - 100) * 96, contents.width, 96)
- else # 全体
- self.cursor_rect.set(0, 0, contents.width, @item_max * 96)
- end
- end
- #--------------------------------------------------------------------------
- # ● 绘制角色等级
- # actor : 角色
- # x : 描画目标 X 坐标
- # y : 描画目标 Y 坐标
- #--------------------------------------------------------------------------
- def draw_actor_level(actor, x, y)
- self.contents.font.color = system_color
- self.contents.draw_text(x, y, 32, WLH, "Age.")
- self.contents.font.color = normal_color
- self.contents.draw_text(x + 32, y, 24, WLH, actor.level, 2)
- end
- end
复制代码 插入到Main前
1.选项只有 物品 存档两项
2.金币窗口木有了
3.状态栏只有 头像名字和年龄 其他的空白,不知道该添点啥 |
评分
-
查看全部评分
|