作者: jhhuang 时间: 2009-6-3 22:51
找到问题所在了~
就是不会改
有人会吗
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作者: jhhuang 时间: 2009-6-3 23:22
恭喜我靠自己的力量修改好了`~~~55555~~感动
x = 4 + index % 2
y = index * 32