Project1

标题: 窗口呼出来后关不掉 [打印本页]

作者: chd114    时间: 2014-9-20 12:17
标题: 窗口呼出来后关不掉
RUBY 代码复制
  1. class Window_MenuCommand
  2.   alias xxx001_add_original_commands add_original_commands
  3.   def add_original_commands
  4.     xxx001_add_original_commands
  5.     add_command("梗概", :story)
  6.   end
  7. end
  8. class Scene_Menu
  9.   alias xxx001_create_command_window create_command_window
  10.   def create_command_window
  11.     xxx001_create_command_window
  12.     @command_window.set_handler(:story, method(:command_story))
  13.   end
  14.   def command_story
  15.     SceneManager.call(Scene_Story)
  16.   end
  17. end
  18. class Scene_Story < Scene_MenuBase
  19.   def start
  20.     super
  21.     @story_window = Window_Story.new
  22.     @story_window.set_handler(:cancel, method(:return_scene))
  23.   end
  24. end
  25. class Window_Story < Window_Selectable
  26.   def initialize
  27.     super(0, 0, Graphics.width, Graphics.height)
  28.     draw_text_ex(4, 0, "窗口中描绘的字符串")
  29.     activate
  30.   end
  31. end
  32. class Window_Story < Window_Selectable
  33.   def initialize
  34.     super(0, 0, Graphics.width, Graphics.height)
  35.     story=""
  36.     $game_variables[7]=1
  37.     $game_variables[7]=0 if $game_variables[7]==nil
  38.     case $game_variables[7]
  39.     when 0
  40.     draw_text_ex(4,0,story)
  41.     when 1
  42.     draw_text_ex(4,0,"11111")
  43.     when 2
  44.     draw_text_ex(4,0,story)
  45.     end
  46.     activate
  47.   end
  48. end


首先按照某个教程做了个窗口···

然后
  1. [url=home.php?mod=space&uid=420706]@Scene[/url] = Window_Story.new
复制代码
用这个呼出来,再按X关掉,依然会显示囧@VIPArcher  
作者: chd114    时间: 2014-9-20 13:36
好吧···原来VA不能这么开菜单···结贴吧{:2_254:}




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1