class Window_MapStatus < Window_Base
def initialize
super(0,0,200,120)
self.contents = Bitmap.new(width - 32, height - 32)
@hp = 0
@sp = 0
refresh
end
def refresh
if @hp != $game_party.actors[0].hp or @sp != $game_party.actors[0].sp
@hp = $game_party.actors[0].hp
@sp = $game_party.actors[0].sp
self.contents.clear
self.contents.draw_text(0,0,60,32,"HP")
self.contents.draw_text(0,52,60,32,"SP")
self.contents.fill_rect(60,0,100,32,Color.new(255,255,255))
self.contents.fill_rect(60,52,100,32,Color.new(255,255,255))
[url=home.php?mod=space&uid=133944]@w[/url] = 96 * @hp / $game_party.actors[0].maxhp
for i in 0..@w-5
self.contents.fill_rect(64+i,4,1,24,Color.new(255,i*2,0))
end
@w = 96 * @sp / $game_party.actors[0].maxsp
for i in 0..@w-5
self.contents.fill_rect(64+i,56,1,24,Color.new(0,i*2,255))
end
end
end
def update
super
refresh
end
end
class Window_MapStatus < Window_Base
def initialize
super(0,0,200,120)
self.contents = Bitmap.new(width - 32, height - 32)
@hp = 0
@sp = 0
refresh
end
def refresh
if @hp != $game_party.actors[0].hp or @sp != $game_party.actors[0].sp
@hp = $game_party.actors[0].hp
@sp = $game_party.actors[0].sp
self.contents.clear
self.contents.draw_text(0,0,60,32,"HP")
self.contents.draw_text(0,52,60,32,"SP")
self.contents.fill_rect(60,0,100,32,Color.new(255,255,255))
self.contents.fill_rect(60,52,100,32,Color.new(255,255,255))
[url=home.php?mod=space&uid=133944]@w[/url] = 96 * @hp / $game_party.actors[0].maxhp
for i in 0..@w-5
self.contents.fill_rect(64+i,4,1,24,Color.new(255,i*2,0))
end
@w = 96 * @sp / $game_party.actors[0].maxsp
for i in 0..@w-5
self.contents.fill_rect(64+i,56,1,24,Color.new(0,i*2,255))
end
end
end
def update
super
refresh
end
end