module RPG module Cache def self.gallery(filename) self.load_bitmap("Graphics/Gallery/", filename) end def self.gallery2(filename) self.load_bitmap("Graphics/Gallery2/", filename) end end end #============================================================================== # ■ Window_Base #============================================================================== class Window_Base < Window #-------------------------------------------------------------------------- # Draw_Thumbnail #-------------------------------------------------------------------------- def draw_thumbnail(x,y,id) image = RPG::Cache.gallery2(id.to_s) rescue nil return if image == nil cw = image.width ch = image.height src_rect = Rect.new(0, 0, cw , ch) src_rect2 = Rect.new(x, y, 150, 80) self.contents.stretch_blt(src_rect2, image, src_rect) end end
module RPG
module Cache
def self.gallery(filename)
self.load_bitmap("Graphics/Gallery/", filename)
end
def self.gallery2(filename)
self.load_bitmap("Graphics/Gallery2/", filename)
end
end
end
#==============================================================================
# ■ Window_Base
#==============================================================================
class Window_Base < Window
#--------------------------------------------------------------------------
# Draw_Thumbnail
#--------------------------------------------------------------------------
def draw_thumbnail(x,y,id)
image = RPG::Cache.gallery2(id.to_s) rescue nil
return if image == nil
cw = image.width
ch = image.height
src_rect = Rect.new(0, 0, cw , ch)
src_rect2 = Rect.new(x, y, 150, 80)
self.contents.stretch_blt(src_rect2, image, src_rect)
end
end
复制后把第2部份的图放Graphics/Gallery2下就可以了 |