irpg Community

Full Version: สอบถามวิธีแก้สคริปท์ ให้แสดงไอคอนเป็น32 ในหน้าEquip
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: 150614083301.PNG]
คือในจุดอื่นผมแก้หมดแร้ว แต่ในจุดนี้หาสคริปท์ไม่เจอจริงๆครับ
ขอบคุณครับ
ตรงช่อง Window_Base อยู่บรรทัดล่างสุด

Code:
def draw_item_name(item, x, y)
   if item == nil
     return
   end
   bitmap = RPG::Cache.icon(item.icon_name)
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24))
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 28, y, 212, 32, item.name)
 end

แก้เป็น

Code:
def draw_item_name(item, x, y)
   if item == nil
     return
   end
   bitmap = RPG::Cache.icon(item.icon_name)
   self.contents.blt(x, y + 4, bitmap, Rect.new(0, 0, 24, 24)) if bitmap.height == 24
   self.contents.blt(x, y , bitmap, Rect.new(0, 0, 32, 32)) if bitmap.height == 32
   self.contents.font.color = normal_color
   self.contents.draw_text(x + 28 + 4, y, 212, 32, item.name)
 end
ขอบคุณมากครับ กดรีเฟรตทุก10นาทีเรย ฮาๆ