设为首页收藏本站|繁體中文

Project1

 找回密码
 注册会员
搜索
查看: 1472|回复: 1
打印 上一主题 下一主题

怎么能让战斗选项像天之痕那样排列

 关闭 [复制链接]

Lv1.梦旅人

梦石
0
星屑
155
在线时间
227 小时
注册时间
2008-7-8
帖子
232
跳转到指定楼层
1
发表于 2009-6-12 08:00:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

加入我们,或者,欢迎回来。

您需要 登录 才可以下载或查看,没有帐号?注册会员

x
怎么能让战斗选项像天之痕那样排列
最好在战斗选项能加上图片......
我记得有这样一个脚本可是怎么让它能加上底图片并位置在中间。
  1. #==============================================================================
  2. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  3. #==============================================================================


  4. #==============================================================================
  5. # ■ Window_Command
  6. #
  7. #     与Window_Command功能一致,不同点就是可以自己给定行、列的值,使菜单像轩辕剑
  8. # 系列的排列……
  9. #
  10. # 举例:                            行  列               -命令列表-
  11. #      Window_Command.new(160, ["攻击","法术","物品","绝技","防御","逃跑"],2)
  12. #==============================================================================

  13. #==============================================================================
  14. # ■ Window_Command
  15. #------------------------------------------------------------------------------
  16. #  一般的命令选择行窗口。
  17. #==============================================================================

  18. class Window_Command < Window_Selectable
  19. #--------------------------------------------------------------------------
  20. # ● 初始化对像
  21. #     width    : 每格的的宽
  22. #     row      : 行数   自己根据命令数算好行列的值,否则^^b
  23. #     column   : 列数
  24. #     commands : 命令字符串序列
  25. #--------------------------------------------------------------------------
  26. def initialize(width, commands, column=2)
  27.    row = commands.size / column
  28.    # 由命令的个数计算出窗口的宽和高
  29.    super(0, 0, width, row * 32 + 32)
  30.    @item_max = commands.size
  31.    @commands = commands
  32.    @row = 2
  33.    @width_txt = (width-32)/column
  34.    @column_max = column
  35.    self.contents = Bitmap.new(width-32, @row * 32)
  36.    refresh
  37.    self.index = 0
  38. end
  39. #--------------------------------------------------------------------------
  40. # ● 刷新
  41. #--------------------------------------------------------------------------
  42. def refresh
  43.    self.contents.clear
  44.    for i in 0...@item_max
  45.      draw_item(i, normal_color)
  46.    end
  47. end
  48. #--------------------------------------------------------------------------
  49. # ● 描绘项目
  50. #     index : 项目编号
  51. #     color : 文字色
  52. #--------------------------------------------------------------------------
  53. def draw_item(index, color)
  54.    self.contents.font.color = color
  55.    # 计算得出当前index所对应的内容所在的行
  56.    row_index = index / @column_max
  57.    # 根据余数得出所在的列
  58.    for y in 0...@column_max
  59.      if index % @column_max == y
  60.        rect = Rect.new(y * @width_txt, 32 * row_index , @width_txt, 32)
  61.        self.contents.fill_rect(rect, Color.new(0, 0, 0, 0))
  62.        self.contents.draw_text(rect, @commands[index],1)
  63.        break
  64.      end
  65.    end
  66. end
  67. #--------------------------------------------------------------------------
  68. # ● 项目无效化
  69. #     index : 项目编号
  70. #--------------------------------------------------------------------------
  71. def disable_item(index)
  72.    draw_item(index, disabled_color)
  73. end
  74. #--------------------------------------------------------------------------
  75. # ● 项目有效化
  76. #     index : 项目编号
  77. #--------------------------------------------------------------------------
  78. def able_item(index)
  79.    draw_item(index, normal_color)
  80. end
  81.   #--------------------------------------------------------------------------
  82.   # ● 更新光标举行
  83.   #--------------------------------------------------------------------------
  84.   def update_cursor_rect
  85.     # 光标位置不满 0 的情况下
  86.     if @index < 0
  87.       self.cursor_rect.empty
  88.       return
  89.     end
  90.     # 获取当前的行
  91.     row = @index / @column_max
  92.     # 当前行被显示开头行前面的情况下
  93.     if row < self.top_row
  94.       # 从当前行向开头行滚动
  95.       self.top_row = row
  96.     end
  97.     # 当前行被显示末尾行之后的情况下
  98.     if row > self.top_row + (self.page_row_max - 1)
  99.       # 从当前行向末尾滚动
  100.       self.top_row = row - (self.page_row_max - 1)
  101.     end
  102.     # 计算光标的宽
  103.     cursor_width = @width_txt
  104.     # 计算光标坐标
  105.     x = @index % @column_max * cursor_width
  106.     y = @index / @column_max * 32 - self.oy
  107.     # 更新国标矩形
  108.     self.cursor_rect.set(x, y, @width_txt, 32)
  109.   end
  110. end

  111. #==============================================================================
  112. # 本脚本来自www.66RPG.com,使用和转载请保留此信息
  113. #==============================================================================
复制代码

此贴于 2009-2-9 0:56:22 被版主redant提醒,请楼主看到后对本贴做出回应。
A man chooses; a slave obeys.

Lv1.梦旅人

梦石
0
星屑
50
在线时间
256 小时
注册时间
2008-8-1
帖子
532
2
发表于 2009-2-9 05:45:41 | 只看该作者
没玩过天之痕出使截图吧
《神雕侠侣后传》预告系统:完全鼠标操作。战斗:全动画CP制战斗。系统:100%,已完成。素材:人物60%,地图20%剧情:20%。CG动画:100%。http://rpg.blue/forumTopicR ... 2%2D23+21%3A42%3A05
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

拿上你的纸笔,建造一个属于你的梦想世界,加入吧。
 注册会员
找回密码

站长信箱:[email protected]|手机版|小黑屋|无图版|Project1游戏制作

GMT+8, 2024-4-19 15:41

Powered by Discuz! X3.1

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表