赞 | 0 |
VIP | 0 |
好人卡 | 0 |
积分 | 1 |
经验 | 735 |
最后登录 | 2013-10-2 |
在线时间 | 14 小时 |
Lv1.梦旅人
- 梦石
- 0
- 星屑
- 50
- 在线时间
- 14 小时
- 注册时间
- 2013-8-16
- 帖子
- 39
|
额,一般VX不改脚本摁下X键就是菜单,然后这个菜单的样子
可以用这个脚本#============================================================================
# ○ 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
,因为我不会复制网址,所以就光复制了脚本
这个可以在VX图书馆,菜单相关→有很多,这个脚本是简易菜单的脚本,作者是冰舞蝶恋
我也是新手,可能这个不全对 |
|