| 
 
| 赞 | 8 |  
| VIP | 14 |  
| 好人卡 | 35 |  
| 积分 | 32 |  
| 经验 | 46931 |  
| 最后登录 | 2025-10-22 |  
| 在线时间 | 1438 小时 |  
 Lv3.寻梦者 
	梦石0 星屑3171 在线时间1438 小时注册时间2009-7-27帖子1453 | 
| 赤夜玄魔 发表于 2012-1-12 16:35 ![]() 好了 ,你检查一下吧。我测试了一下,好像没错的样子。
复制代码class Chaochao_Window_PartyLeft < Window_Selectable
  def initialize
    super(0, 0, 320, 224)
    self.contents = Bitmap.new(width - 32, height - 32)
    self.index = 0
    refresh
  end
  def actor
    return @actors[self.index]
  end
  def refresh
    if self.contents != nil
      self.contents.dispose
      self.contents = nil
    end
    @actors = []
    for i in 0...$game_party.actors.size
      @actors.push($game_party.actors[i])
    end
    
    @item_max = 4
    if @item_max > 0
      self.contents = Bitmap.new(width - 32, (row_max+1) * 32)
      for i in 0...@item_max
        draw_item(i)
      end
    end
  end
  def draw_item(index)
    if @actors[index] != nil
      actor = @actors[index]
      text = @actors[index].name
      lv = @actors[index].level.to_s + " "
      if $game_party.actors.size <= 1
        
        
 #这里。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
       
        self.contents.font.color = Color.new(192, 224, 255, 255)
         self.contents.draw_text(4, 0, 128, 32, "出战队伍:")
         
         
         
        self.contents.font.color = Color.new(255, 0, 0) #不能被移动的颜色
      else
        self.contents.font.color = Color.new(0, 255, 0) #可以被移动的颜色
      end
      self.contents.draw_text(4, index * 32 + 32, 288, 32, text)
      self.contents.font.color = normal_color
      self.contents.font.size = 16
      self.contents.draw_text(4, index * 32 + 36, 288, 32,  "等级:  ", 2)
      #colorx = [255.0000 - 255.0000/60 * @actors[index].level,0].max
      #colory = [255.0000 / 60 * @actors[index].level,255].min
     # self.contents.font.color = Color.new(colorx, colory, 0)
      self.contents.draw_text(4, index * 32 + 36, 288, 32,  lv, 2)
      self.contents.font.color = normal_color
      self.contents.font.size = 22
    else
      self.contents.draw_text(4, index * 32 + 32, 288, 32,  "[无]")
    end
  end
  def update_cursor_rect
    if @index < 0
      self.cursor_rect.empty
      return
    end
    row = @index / @column_max
    if row < self.top_row
      self.top_row = row
    end
    if row > self.top_row + (self.page_row_max - 1)
      self.top_row = row - (self.page_row_max - 1)
    end
    cursor_width = self.width / @column_max - 32
    x = @index % @column_max * (cursor_width + 32)
    y = @index / @column_max * 32 - self.oy + 32
    self.cursor_rect.set(x, y, cursor_width, 32)
  end
  def item_max
    return @item_max
  end
  def actor?(index)
    return @actors[index] == nil ? false : true
  end
  def set_index(x)
    @index = x
  end
end
#------------------------------------------------------------------------------
 | 
 |