Project1

标题: 【菜单界面】 菜单的动态滑行 [打印本页]

作者: Ceopal    时间: 2012-10-6 01:32
标题: 【菜单界面】 菜单的动态滑行
本帖最后由 Ceopal 于 2012-10-6 15:03 编辑

楼主只会做菜单的滑行出现部分,不会做菜单的滑行消失部分

个人需求:按下“物品”指令,默认三个窗以出现行式相反的行式退出,然后再 让SceneManager  call 出物品界面


求贴 思路or代码or工程


待完善工程在此 ( 工程好像还要审核后才可以下载……)

http://dl.vmall.com/c07fujegq4

============================================

ps: 都审核了10个小时了,还没审核好…… {:2_270:}

请 新建工程  插入下列代码:
  1. #encoding:utf-8
  2. #==============================================================================
  3. # ■ Window_MenuCommand
  4. #------------------------------------------------------------------------------
  5. #  菜单画面中显示指令的窗口
  6. #==============================================================================

  7. class Window_MenuCommand < Window_Command
  8.   #--------------------------------------------------------------------------
  9.   # ◆◆ 初始化对象
  10.   #--------------------------------------------------------------------------
  11.   def initialize
  12. #~     super(0,0)
  13.     super(-160,0)
  14.     select_last
  15.   end
  16.   #--------------------------------------------------------------------------
  17.   # ◆◆ 更新
  18.   #--------------------------------------------------------------------------
  19.   def update
  20.     super
  21.     self.x += 8 unless self.x == 0
  22.   end
  23. end

  24. #encoding:utf-8
  25. #==============================================================================
  26. # ■ Window_MenuStatus
  27. #------------------------------------------------------------------------------
  28. #  菜单画面中,显示队伍成员状态的窗口
  29. #==============================================================================

  30. class Window_MenuStatus < Window_Selectable
  31.   
  32.   #--------------------------------------------------------------------------
  33.   # ◆◆ 初始化对象
  34.   #--------------------------------------------------------------------------
  35.   def initialize(x, y)
  36. #~     super(x, y, window_width, window_height)
  37.     super(640, y, window_width, window_height)
  38.     @pending_index = -1
  39.     refresh
  40.   end
  41.   #--------------------------------------------------------------------------
  42.   # ◆◆ 更新
  43.   #--------------------------------------------------------------------------
  44.   def update
  45.     super
  46.     self.x -= 20 unless self.x == 160
  47.   end
  48. end

  49. #encoding:utf-8
  50. #==============================================================================
  51. # ■ Scene_Menu
  52. #------------------------------------------------------------------------------
  53. #  菜单画面
  54. #==============================================================================

  55. class Scene_Menu < Scene_MenuBase
  56.   #--------------------------------------------------------------------------
  57.   # ◆◆ 生成金钱窗口
  58.   #--------------------------------------------------------------------------
  59.   def create_gold_window
  60.     @gold_window = Window_Gold.new
  61.     @gold_window.x = 0
  62. #~     @gold_window.y = Graphics.height - @gold_window.height
  63.     @gold_window.y = Graphics.height
  64.   end
  65.   #--------------------------------------------------------------------------
  66.   # ◆◆ 更新
  67.   #--------------------------------------------------------------------------
  68.   def update
  69.     super
  70.     @gold_window.y -= 2 unless @gold_window.y == Graphics.height - @gold_window.height
  71.   end
  72. end
复制代码
dsu_plus_rewardpost_czw
作者: 迷糊的安安    时间: 2012-10-6 10:13
你是想要类似我的游戏任务系统里面那种滑动菜单么?




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