赞 | 1 |
VIP | 220 |
好人卡 | 25 |
积分 | 7 |
经验 | 51477 |
最后登录 | 2013-1-12 |
在线时间 | 943 小时 |
Lv2.观梦者 花开堪折直须折
- 梦石
- 0
- 星屑
- 671
- 在线时间
- 943 小时
- 注册时间
- 2010-7-17
- 帖子
- 4963
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有帐号?注册会员
x
今天作业比较多。没什么时间啰嗦了。直接上图上范例上脚本。
用自带脚本改的。可谓是非常非常的简单。才用五分钟就好了。
VX新·简易菜单.rar
(240.13 KB, 下载次数: 1288)
脚本:- #============================================================================
- # ○ VX·新简易菜单
- # -By.冰舞蝶恋
- #----------------------------------------------------------------------------
- # 用法神马的…不解释……
- #============================================================================
- class Scene_Menu
- def start
- super
- create_menu_background
- create_command_window
- @gold_window = Window_Gold.new(0, 360)
- @mapwindow = Window_Draw_Mapname.new
- @status_window = Window_MenuStatus.new(160, 0)
- end
- def terminate
- super
- dispose_menu_background
- @command_window.dispose
- @gold_window.dispose
- @mapwindow.dispose
- @status_window.dispose
- end
- def update
- super
- update_menu_background
- @command_window.update
- @gold_window.update
- @mapwindow.update
- @status_window.update
- if @command_window.active
- update_command_selection
- elsif @status_window.active
- update_actor_selection
- end
- end
- def create_command_window
- s1 = Vocab::item
- s2 = Vocab::skill
- s3 = Vocab::equip
- s4 = Vocab::status
- s5 = Vocab::save
- s6 = "读档"# Vocab::continue
- s7 = Vocab::game_end
- @command_window = Window_Command.new(544, [s1, s2, s3, s4, s5, s6, s7], 7)
- @command_window.index = @menu_index
- if $game_party.members.size == 0 # 如果队伍为空
- @command_window.draw_item(0, false) # 无效化物品选项
- @command_window.draw_item(1, false) # 无效化技能选项
- @command_window.draw_item(2, false) # 无效化装备选项
- @command_window.draw_item(3, 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,2,3 # 技能、装备、状态
- start_actor_selection
- when 4 # 存档
- $scene = Scene_File.new(true, false, false)
- when 5 # 读档
- $scene = Scene_File.new(false, false, false)
- when 6 # 结束游戏
- $scene = Scene_End.new
- end
- end
- end
- end
- class Window_MenuStatus < Window_Selectable
- def initialize(x, y)
- super(x, y+56, 384, 416-56)
- 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_shortface(actor, 2, actor.index * 82 + 2, 92)
- x = 104
- y = actor.index * 82 + WLH / 2
- draw_actor_name(actor, x, y)
- draw_actor_class(actor, x + 120, y)
- draw_actor_level(actor, x, y + WLH * 1)
- draw_actor_state(actor, x, y + WLH * 2)
- draw_actor_hp(actor, x + 120, y + WLH * 1)
- end
- end
- def update_cursor
- if @index < 0
- self.cursor_rect.empty
- elsif @index < @item_max
- self.cursor_rect.set(0, @index * 82, contents.width, 82)
- elsif @index >= 100
- self.cursor_rect.set(0, (@index - 100) * 82, contents.width, 82)
- else
- self.cursor_rect.set(0, 0, contents.width, @item_max * 82)
- end
- end
- end
- class Window_Base
- def draw_shortface(face_name, face_index, x, y, size = 96)
- bitmap = Cache.face(face_name)
- rect = Rect.new(0, 0, 0, 0)
- rect.x = face_index % 4 * 96 + (96 - size) / 2
- rect.y = face_index / 4 * 96 + (96 - size) / 2 + 16
- rect.width = size
- rect.height = size - 32
- self.contents.blt(x, y+8, bitmap, rect)
- bitmap.dispose
- end
- def draw_actor_shortface(actor, x, y, size = 96)
- draw_shortface(actor.face_name, actor.face_index, x, y, size)
- end
- end
- class Game_Map
- attr_reader :map_id
- def mapname
- $mapname = load_data("Data/MapInfos.rvdata")
- $mapname[@map_id].name
- end
- end
- class Window_Draw_Mapname < Window_Base
- def initialize
- super(0, 56, 160, 304)
- refresh
- end
- def refresh
- self.contents.clear
- self.contents.font.color = system_color
- self.contents.draw_text(4, 4, 160, WLH, "位置:")
- self.contents.font.color = normal_color
- self.contents.draw_text(4+8, WLH + 12, 160, WLH, $game_map.mapname.to_s)
- end
- end
复制代码 |
评分
-
查看全部评分
|