Project1

标题: 2排改成1排? [打印本页]

作者: jhhuang    时间: 2009-6-3 22:38
标题: 2排改成1排?
RT:
物品/技能之类的大家都知道是默认为2排的.
我想改相关的数据,(2排变1排),应该搜索什么?
PS:(如果分为"光标排列/文字排列/图片排列等"那么我要问的大概是"文字排列")



因为我有东西要改
原来:
1 2
3 4
5

效果:
1
2
3
4
5


作者: 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




欢迎光临 Project1 (https://rpg.blue/) Powered by Discuz! X3.1