就是我在一个整合包里面看到,在选择装备替换的时候,可替换物品栏会替代之前的装备栏,系统自带的是这两个窗口分开的,很占地方,下面附上javascript:;javascript:;那个整合包里面的菜单效果 ...
RM无节操小分队 发表于 2014-11-4 19:13 我是新手哦,不会搞,能给个例子吗?告诉我怎样的命令能实现这效果
class Scene_Equip < Scene_MenuBase #-------------------------------------------------------------------------- # ● 生成物品視窗 #-------------------------------------------------------------------------- alias create_item_window_A create_item_window#alias 语法自己看帮助 def create_item_window wx = @status_window.width wy = @command_window.y + @command_window.height ww = Graphics.width - @status_window.width wh = @slot_window.height#wx,wy,ww,wh为描绘窗口大小,下面是默认的@item_window设置部分 @item_window = Window_EquipItem.new(wx, wy, ww, wh) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.status_window = @status_window @item_window.actor = @actor @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @slot_window.item_window = @item_window @item_window.visible =false#设置窗口不可见 end #-------------------------------------------------------------------------- # ● 裝備欄“確定” #-------------------------------------------------------------------------- alias on_slot_ok_A on_slot_ok#alias 语法自己看帮助 def on_slot_ok @item_window.visible =true @slot_window.visible =false #上面为窗口显隐切换,下为默认的功能脚本 on_slot_ok_A end #-------------------------------------------------------------------------- # ● 物品“確定” #-------------------------------------------------------------------------- alias on_item_ok_A on_item_ok#alias 语法自己看帮助 def on_item_ok @item_window.visible =false @slot_window.visible =true #上面为窗口显隐切换,下为默认的功能脚本 on_item_ok_A end #-------------------------------------------------------------------------- # ● 物品“取消” #-------------------------------------------------------------------------- alias on_item_cancel_A on_item_cancel#alias 语法自己看帮助 def on_item_cancel @item_window.visible =false @slot_window.visible =true #上面为窗口显隐切换,下为默认的功能脚本 on_item_cancel_A endend
class Scene_Equip < Scene_MenuBase #-------------------------------------------------------------------------- # ● 生成物品視窗 #-------------------------------------------------------------------------- alias create_item_window_A create_item_window#alias 语法自己看帮助 def create_item_window wx = @status_window.width wy = @command_window.y + @command_window.height ww = Graphics.width - @status_window.width wh = @slot_window.height #wx,wy,ww,wh为描绘窗口大小,下面是默认的@item_window设置部分 @item_window = Window_EquipItem.new(wx, wy, ww, wh) @item_window.viewport = @viewport @item_window.help_window = @help_window @item_window.status_window = @status_window @item_window.actor = @actor @item_window.set_handler(:ok, method(:on_item_ok)) @item_window.set_handler(:cancel, method(:on_item_cancel)) @slot_window.item_window = @item_window @item_window.visible =false#设置窗口不可见 end #-------------------------------------------------------------------------- # ● 裝備欄“確定” #-------------------------------------------------------------------------- alias on_slot_ok_A on_slot_ok#alias 语法自己看帮助 def on_slot_ok @item_window.visible =true @slot_window.visible =false #上面为窗口显隐切换,下为默认的功能脚本 on_slot_ok_A end #-------------------------------------------------------------------------- # ● 物品“確定” #-------------------------------------------------------------------------- alias on_item_ok_A on_item_ok#alias 语法自己看帮助 def on_item_ok @item_window.visible =false @slot_window.visible =true #上面为窗口显隐切换,下为默认的功能脚本 on_item_ok_A end #-------------------------------------------------------------------------- # ● 物品“取消” #-------------------------------------------------------------------------- alias on_item_cancel_A on_item_cancel#alias 语法自己看帮助 def on_item_cancel @item_window.visible =false @slot_window.visible =true #上面为窗口显隐切换,下为默认的功能脚本 on_item_cancel_A end end
截图20141104212543.png (169.76 KB, 下载次数: 16)
下载附件 保存到相册
2014-11-4 21:36 上传
截图20141104212608.png (150.74 KB, 下载次数: 21)
查看全部评分
折叠内容标题(非必须)
折叠内容
站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作
GMT+8, 2024-11-15 05:44
Powered by Discuz! X3.1
© 2001-2013 Comsenz Inc.