查看: 3143|回复: 0

[已经过期] 光标能在9个奇门里吗,只装备装饰品 鞋=装饰品

[复制链接]
梦石
0
星屑
7306
在线时间
1244 小时
注册时间
2015-8-15
回帖
473
发表于 2016-3-28 15:26:59 | 显示全部楼层 |阅读模式

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

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

×
本帖最后由 金芒芒 于 2016-3-28 17:14 编辑
  1. #==============================================================================
  2. # ■ Window_EquipRight
  3. #------------------------------------------------------------------------------
  4. #  装备画面、显示角色现在装备的物品的窗口。
  5. #==============================================================================

  6. class Window_Equip_right1 < Window_Selectable#_New
  7.   LAST0_X = 276   # 最后一项装备的x坐标  #开门  0
  8.   LAST0_Y = 194   # 最后一项装备的y坐标
  9.   LAST0_W = 48   # 最后一项装备的光标宽度
  10.   LAST0_H = 48   # 最后一项装备的光标高度
  11.   
  12.   LAST1_X = 300   # 最后一项装备的x坐标  #杜门  0
  13.   LAST1_Y = 218   # 最后一项装备的y坐标
  14.   LAST1_W = 48   # 最后一项装备的光标宽度
  15.   LAST1_H = 48   # 最后一项装备的光标高度
  16.   
  17.   LAST2_X = 370   # 最后一项装备的x坐标  #休门  0
  18.   LAST2_Y = 293   # 最后一项装备的y坐标
  19.   LAST2_W = 48   # 最后一项装备的光标宽度
  20.   LAST2_H = 48   # 最后一项装备的光标高度
  21.   
  22.   LAST3_X = 324   # 最后一项装备的x坐标  #生门  0
  23.   LAST3_Y = 389   # 最后一项装备的y坐标
  24.   LAST3_W = 48   # 最后一项装备的光标宽度
  25.   LAST3_H = 48   # 最后一项装备的光标高度
  26.   
  27.   LAST4_X = 276   # 最后一项装备的x坐标  #死门  0
  28.   LAST4_Y = 390   # 最后一项装备的y坐标
  29.   LAST4_W = 48   # 最后一项装备的光标宽度
  30.   LAST4_H = 48   # 最后一项装备的光标高度
  31.   
  32.   LAST5_X = 228   # 最后一项装备的x坐标  #惊门  0
  33.   LAST5_Y = 335   # 最后一项装备的y坐标
  34.   LAST5_W = 48   # 最后一项装备的光标宽度
  35.   LAST5_H = 48   # 最后一项装备的光标高度
  36.   
  37.   LAST_X = 276   # 最后一项装备的x坐标  #奇门  0
  38.   LAST_Y = 293   # 最后一项装备的y坐标
  39.   LAST_W = 48   # 最后一项装备的光标宽度
  40.   LAST_H = 48   # 最后一项装备的光标高度
  41.   #--------------------------------------------------------------------------
  42.   # ● 初始化对像
  43.   #     actor : 角色
  44.   #--------------------------------------------------------------------------
  45.   def initialize(actor)
  46.     super(120, 104, 368, 400)#(120, 104, 368, 400)
  47.     self.contents = Bitmap.new(width - 32, height - 32)
  48.     @actor = actor
  49.     refresh
  50.     self.index = 0
  51.   end
  52.   #--------------------------------------------------------------------------
  53.   # ● 获取物品
  54.   #--------------------------------------------------------------------------
  55.   def item
  56.     return @data[self.index]
  57.   end

  58.   def set_actor(actor)
  59.     @actor = actor
  60.     refresh
  61.   end

  62.   #--------------------------------------------------------------------------
  63.   # ● 刷新
  64.   #--------------------------------------------------------------------------
  65.   def refresh
  66.     self.contents.clear
  67.     draw_actor_name(@actor, 140, 0-5)
  68.     @data = []
  69.     @data.push($data_armors[@actor.armor4_id])
  70.     @data.push($data_armors[@actor.armor4_id])
  71.     @data.push($data_armors[@actor.armor4_id])
  72.     @data.push($data_armors[@actor.armor4_id])
  73.     @data.push($data_armors[@actor.armor4_id])
  74.     @item_max = @data.size
  75.     self.contents.font.color = system_color
  76.     y_r = 4 # 右窗口 y 坐标
  77.     self.contents.font.size = 20
  78. #   draw_walk_actor_graphic(@actor, 108, 60)
  79.     self.contents.draw_text(LAST_X + y_r, LAST_Y, 92, 32, "鞋")
  80.     self.contents.draw_text(LAST0_X + y_r, LAST0_Y, 92, 32, "鞋")
  81.     self.contents.draw_text(LAST1_X + y_r, LAST1_Y, 92, 32, "鞋")
  82.     self.contents.draw_text(LAST2_X + y_r, LAST2_Y, 92, 32, "鞋")
  83.     self.contents.draw_text(LAST3_X + y_r, LAST3_Y, 92, 32, "鞋")
  84.     self.contents.draw_text(LAST4_X + y_r, LAST4_Y, 92, 32, "鞋")
  85.     self.contents.draw_text(LAST5_X + y_r, LAST5_Y, 92, 32, "鞋")
  86.     self.contents.font.size = 18
  87.     draw_item_name(@data[0], LAST_X+3, LAST_Y)
  88.     draw_item_name(@data[1], LAST0_X+3, LAST0_Y)
  89.     draw_item_name(@data[2], LAST1_X+3, LAST1_Y)
  90.     draw_item_name(@data[3], LAST2_X+3, LAST2_Y)
  91.     draw_item_name(@data[4], LAST3_X+3, LAST3_Y)
  92.     draw_item_name(@data[5], LAST4_X+3, LAST4_Y)
  93.     draw_item_name(@data[6], LAST5_X+3, LAST5_Y)
  94.    
  95.     draw_actor_level(@actor, 12, 300)
  96.   end
  97.   #--------------------------------------------------------------------------
  98.   # ● 刷新帮助文本
  99.   #--------------------------------------------------------------------------
  100.   def update_help
  101.     @help_window.set_text(make_description(self.item))
  102.   end

  103.   #--------------------------------------------------------------------------
  104.   # ● 刷新画面
  105.   #--------------------------------------------------------------------------
  106.   def update
  107.     super
  108.     # 可以移动光标的情况下
  109.     if self.active and @item_max > 0 and @index >= 0
  110.       # 方向键下被按下的情况下
  111.       if Input.repeat?(Input::DOWN)
  112.         # 列数不是 1 并且不与方向键下的按下状态重复的情况、
  113.         # 或光标位置在(项目数-列数)之前的情况下
  114.         if (@column_max == 1 and Input.trigger?(Input::DOWN)) or
  115.            @index < @item_max - @column_max
  116.           # 光标向下移动
  117.           $game_system.se_play($data_system.cursor_se)
  118.           @index = (@index + @column_max) % @item_max
  119.         end
  120.       end
  121.       # 方向键上被按下的情况下
  122.       if Input.repeat?(Input::UP)
  123.         # 列数不是 1 并且不与方向键下的按下状态重复的情况、
  124.         # 或光标位置在列之后的情况下
  125.         if (@column_max == 1 and Input.trigger?(Input::UP)) or
  126.            @index >= @column_max
  127.           # 光标向上移动
  128.           $game_system.se_play($data_system.cursor_se)
  129.           @index = (@index - @column_max + @item_max) % @item_max
  130.         end
  131.       end
  132.       # 方向键右被按下的情况下
  133.       if Input.repeat?(Input::RIGHT)
  134.         # 列数为 2 以上并且、光标位置在(项目数 - 1)之前的情况下
  135.         if @column_max >= 2 and @index < @item_max - 1
  136.           # 光标向右移动
  137.           $game_system.se_play($data_system.cursor_se)
  138.           @index += 1
  139.         end
  140.       end
  141.       # 方向键左被按下的情况下
  142.       if Input.repeat?(Input::LEFT)
  143.         # 列数为 2 以上并且、光标位置在 0 之后的情况下
  144.         if @column_max >= 2 and @index > 0
  145.           # 光标向左移动
  146.           $game_system.se_play($data_system.cursor_se)
  147.           @index -= 1
  148.         end
  149.       end
  150.       # R 键被按下的情况下
  151.       if Input.repeat?(Input::R)
  152.         # 显示的最后行在数据中最后行上方的情况下
  153.         if self.top_row + (self.page_row_max -1) < (self.row_max -1)
  154.           # 光标向后移动一页
  155.           $game_system.se_play($data_system.cursor_se)
  156.           @index = [@index + self.page_item_max, @item_max -1].min
  157.           self.top_row += self.page_row_max
  158.         end
  159.       end
  160.       # L 键被按下的情况下
  161.       if Input.repeat?(Input::L)
  162.         # 显示的开头行在位置 0 之后的情况下
  163.         if self.top_row > 0
  164.           # 光标向前移动一页
  165.           $game_system.se_play($data_system.cursor_se)
  166.           @index = [@index - self.page_item_max, 0].max
  167.           self.top_row -= self.page_row_max
  168.         end
  169.       end
  170.     end
  171.     # 刷新帮助文本 (update_help 定义了继承目标)
  172.     if self.active and @help_window != nil
  173.       update_help
  174.     end

  175.   end
  176.   #-----------------------------奇门1
  177.   # ○ 刷新光标矩形
  178.   #-----------------------------
  179.   def update_cursor_rect
  180. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  181.     # 最后一项的情况
  182.     if @index == @item_max - 1
  183.       self.cursor_rect.set(LAST_X, LAST_Y, LAST_W, LAST_H)
  184.     # 其他情况
  185.     else
  186.       if @index <= -2
  187.         self.cursor_rect.empty
  188.       elsif @index == -1
  189.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  190.       else
  191.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  192.       end
  193.     end
  194.   end
  195.   
  196.   #-----------------------------开门2
  197.   # ○ 刷新光标矩形
  198.   #-----------------------------
  199.   def update_cursor_rect
  200. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  201.     # 最后一项的情况
  202.     if @index == @item_max - 1
  203.       self.cursor_rect.set(LAST0_X, LAST0_Y, LAST0_W, LAST0_H)
  204.     # 其他情况
  205.     else
  206.       if @index <= -2
  207.         self.cursor_rect.empty
  208.       elsif @index == -1
  209.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  210.       else
  211.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  212.       end
  213.     end
  214.   end
  215.   
  216.   #-----------------------------杜门3
  217.   # ○ 刷新光标矩形
  218.   #-----------------------------
  219.   def update_cursor_rect
  220. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  221.     # 最后一项的情况
  222.     if @index == @item_max - 1
  223.       self.cursor_rect.set(LAST1_X, LAST1_Y, LAST1_W, LAST1_H)
  224.     # 其他情况
  225.     else
  226.       if @index <= -2
  227.         self.cursor_rect.empty
  228.       elsif @index == -1
  229.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  230.       else
  231.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  232.       end
  233.     end
  234.   end   
  235.   
  236.   #-----------------------------休门4
  237.   # ○ 刷新光标矩形
  238.   #-----------------------------
  239.   def update_cursor_rect
  240. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  241.     # 最后一项的情况
  242.     if @index == @item_max - 1
  243.       self.cursor_rect.set(LAST2_X, LAST2_Y, LAST2_W, LAST2_H)
  244.     # 其他情况
  245.     else
  246.       if @index <= -2
  247.         self.cursor_rect.empty
  248.       elsif @index == -1
  249.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  250.       else
  251.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  252.       end
  253.     end
  254.   end  
  255.   
  256.   #-----------------------------生门5
  257.   # ○ 刷新光标矩形
  258.   #-----------------------------
  259.   def update_cursor_rect
  260. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  261.     # 最后一项的情况
  262.     if @index == @item_max - 1
  263.       self.cursor_rect.set(LAST3_X, LAST3_Y, LAST3_W, LAST3_H)
  264.     # 其他情况
  265.     else
  266.       if @index <= -2
  267.         self.cursor_rect.empty
  268.       elsif @index == -1
  269.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  270.       else
  271.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  272.       end
  273.     end
  274.   end  

  275.   #-----------------------------死门6
  276.   # ○ 刷新光标矩形
  277.   #-----------------------------
  278.   def update_cursor_rect
  279. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  280.     # 最后一项的情况
  281.     if @index == @item_max - 1
  282.       self.cursor_rect.set(LAST4_X, LAST4_Y, LAST4_W, LAST4_H)
  283.     # 其他情况
  284.     else
  285.       if @index <= -2
  286.         self.cursor_rect.empty
  287.       elsif @index == -1
  288.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  289.       else
  290.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  291.       end
  292.     end
  293.   end
  294.   
  295.   #-----------------------------惊门7
  296.   # ○ 刷新光标矩形
  297.   #-----------------------------
  298.   def update_cursor_rect
  299. #    self.cursor_rect.set(0, @index * 28+2, 176, 28)
  300.     # 最后一项的情况
  301.     if @index == @item_max - 1
  302.       self.cursor_rect.set(LAST5_X, LAST5_Y, LAST5_W, LAST5_H)
  303.     # 其他情况
  304.     else
  305.       if @index <= -2
  306.         self.cursor_rect.empty
  307.       elsif @index == -1
  308.         self.cursor_rect.set(0, 0, self.width - 32, @item_max * 80)
  309.       else
  310.         self.cursor_rect.set(6, @index * 71+37, self.width - 320, 48)
  311.       end
  312.     end
  313.   end
  314.   
  315. end
复制代码
奇门贯标.jpg
奇门.jpg
您需要登录后才可以回帖 登录 | 注册会员

本版积分规则

Powered by Discuz! X5.0 © 2001-2026 Discuz! Team.

在本版发帖返回顶部