Project1
标题:
如何呼出窗口?
[打印本页]
作者:
zhouzhuofan1
时间:
2013-10-20 11:43
标题:
如何呼出窗口?
class Window_zczt < Window_Base
def initialize
super(0,0,640,480)
self.contents = Bitmap.new(width-32,height-32)
self.contents.font.color = Color.new(105,255,150)
refresh
end
def refresh
self.contents.clear
bitmap = Bitmap.new('Graphics/Faces/阿尔西斯头像.png')
rect = Rect.new(0,0,bitmap.width,bitmap.height)
self.contents.blt(6,13,bitmap,rect)
w = 22
h = 22
self.contents.font.color = Color.new(235,5,4)
self.contents.draw_text(143,31,w,h,'HP')
bitmap = Bitmap.new('Graphics/Faces/塞尔维亚头像.png')
rect = Rect.new(0,0,bitmap.width,bitmap.height)
self.contents.blt(341,25,bitmap,rect)
self.contents.draw_text(486,37,w,h,'HP')
w = 275
self.contents.font.color = Color.new(254,255,255)
self.contents.draw_text(180,33,w,h,$game_variables[100].to_s)
w = 286
self.contents.draw_text(523,39,w,h,$game_variables[55].to_s)
end
end
复制代码
如何呼出这个窗口?
作者:
yagami
时间:
2013-10-20 11:46
Window_zczt.new 但这样由于RUBY自动释放内存很快就消失的 给个变量 a=Window_zczt.new 这样引用计数就加1了 a存在的话 那个new出来的不会消失
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1