QQ截图20141104024903.png (255.15 KB, 下载次数: 28)
选择替换一个装备
QQ截图20141104024910.png (240.26 KB, 下载次数: 32)
之后覆盖之前窗口选择物品
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
欢迎光临 Project1 (https://rpg.blue/) | Powered by Discuz! X3.1 |