| 赞 | 2  | 
 
| VIP | 19 | 
 
| 好人卡 | 10 | 
 
| 积分 | 3 | 
 
| 经验 | 57661 | 
 
| 最后登录 | 2019-5-20 | 
 
| 在线时间 | 574 小时 | 
 
 
 
 
 
Lv2.观梦者 
	- 梦石
 - 0 
 
        - 星屑
 - 253 
 
        - 在线时间
 - 574 小时
 
        - 注册时间
 - 2006-8-25
 
        - 帖子
 - 969
 
 
 
 | 
	
2楼
 
 
 楼主 |
发表于 2009-6-3 22:51:14
|
只看该作者
 
 
 
找到问题所在了~ 
就是不会改 
有人会吗 
  def refresh 
    if self.contents != nil 
      self.contents.dispose 
      self.contents = nil 
    end 
    #項目数が 0 でなければビットマップを作成し、全項目を描画 
    return if @item_max == 0 
    self.contents = Bitmap.new(width - 32, row_max * 32) 
    for i in 0...@item_max 
      draw_item(i) 
    end 
  end 
  def draw_item(index) 
    item = @data[index] 
    x = 4 + index % 2 * (288 + 32) 
    y = index / 2 * 32 
    rect = Rect.new(x, y, self.width / @column_max - 32, 32) 
    self.contents.fill_rect(rect, Color.new(0, 0, 0, 0)) 
    self.contents.font.color = normal_color 
    self.contents.draw_text(x, y, 32, 32, item.id.to_s) if DRAW_ID 
    if item.title_visible? 
      diary_title = transfer(item.title) 
      if TITLE_TEXT_EX 
        draw_ex_text(x+48, y - 4, diary_title, 0) 
      else 
        self.contents.draw_text(x+48, y, 212, 32, diary_title, 0) 
      end 
    else 
      self.contents.draw_text(x+48, y, 212, 32, " -----", 0) 
    end 
  end 
end |   
 
 
 
 |