| 
 
| 赞 | 1 |  
| VIP | 255 |  
| 好人卡 | 52 |  
| 积分 | 1 |  
| 经验 | 77416 |  
| 最后登录 | 2016-1-18 |  
| 在线时间 | 1269 小时 |  
 Lv1.梦旅人 薄凉看客
	梦石0 星屑50 在线时间1269 小时注册时间2010-6-20帖子1316 | 
| 本帖最后由 恋′挂机 于 2013-9-23 19:47 编辑 
 学习下怎么着色的
 我用(xp)
 复制代码  # ------------------------------------------
  # * shop_draw_item
  # ------------------------------------------
  def shop_draw_item(i, color, color_2)
    x = 36 + i % @column_max * (288 + 32)
    y = i / @column_max * 32
    for b in 1..150
    case color_2
    when 1
      @color_2 = Color.new(128, 128, 255, 100 - b)
    when 2
      @color_2 = Color.new(255, 128, 128, 100 - b)
    when 3
      @color_2 = Color.new(128, 255, 128, 100 - b)
    when 4
      @color_2 = Color.new(128, 255, 255, 100 - b)
    when 5
      @color_2 = Color.new(255, 128, 255, 100 - b)
    when 6
      @color_2 = Color.new(255, 255, 128, 100 - b)
    when 7
      @color_2 = Color.new(192, 192, 192, 100 - b)
    end
    self.contents.fill_rect(
    Rect.new(2 * b + x - 32, y, 2, 30), @color_2)
    end
    self.contents.font.color = color
    bitmap = RPG::Cache.character(@actor.character_name, @actor.character_hue)
    rect = Rect.new(0, 0, bitmap.width / 4, bitmap.height / 8)
    self.contents.blt(x - 32, y + 3, bitmap, rect)
    self.contents.draw_text(x, y, width - 8, 32, @commands[i])
  end
end
  
 稍稍有一点意思,但差距好大...
 
 这么好的帖果断顶起
 | 
 |