class Window_2 < Window_Base
$defaultfontsize = 20 #Change to the font size you want
@GOLD_ICON = RPG::Cache.icon("acce_005")
def draw_normal_barz(x, y, type, length, thick, e1, e2, c1 = Color.new(153,238,153,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
def draw_actor_barz(actor,x, y, type, length, thick, e1, e2, c1 = Color.new(255,0,0,255), c2 = Color.new(0,0,0,255))
if type == "horizontal"
width = length
height = thick
self.contents.fill_rect(x-1, y - 1, width+2, height + 3, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width, height + 1, Color.new(0, 0, 0, 255))
w = width * e1 / e2
for i in 0..height
r = c1.red + (c2.red - c1.red) * (height -i)/height + 0 * i/height
g = c1.green + (c2.green - c1.green) * (height -i)/height + 0 * i/height
b = c1.blue + (c2.blue - c1.blue) * (height -i)/height + 0 * i/height
a = c1.alpha + (c2.alpha - c1.alpha)* (height -i)/height + 255 * i/height
self.contents.fill_rect(x, y+i, w, 1, Color.new(r, g, b, a))
end
elsif type == "vertical"
width = thick
height = length
self.contents.fill_rect(x-1, y - 1, width+3, height + 2, Color.new(255, 255, 255, 255))
self.contents.fill_rect(x, y, width+1, height , Color.new(0, 0, 0, 255))
h = height * e1 / e2
for i in 0..width
r = c1.red + (c2.red - c1.red) * (width -i)/width + 0 * i/width
g = c1.green + (c2.green - c1.green) * (width -i)/width + 0 * i/width
b = c1.blue + (c2.blue - c1.blue) * (width -i)/width + 0 * i/width
a = c1.alpha + (c2.alpha - c1.alpha)* (width -i)/width + 255 * i/width
self.contents.fill_rect(x+i, y, 1, h, Color.new(r, g, b, a))
end
end
end
def initialize
super(0, 0, 225, 120)
self.contents = Bitmap.new(width-32, height-32)
self.contents.font.size = 12 #Change to the font size you want
self.opacity = 127
self.contents.font.name = "Tahoma" #Change to your font stile
refresh
end
def refresh
self.contents.clear
draw_normal_barz(36, 27, "horizontal", 150, 8, $game_actors[1].hp.to_i, $game_actors[1].maxhp.to_i, Color.new (225, 0, 0, 150)) # HP BAR
draw_normal_barz(36, 40, "horizontal", 150, 8, $game_actors[1].sp.to_i, $game_actors[1].maxsp.to_i, Color.new (0,0,255,150)) # SP BAR
draw_normal_barz(36, 53, "horizontal", 150, 8, $game_actors[1].exp_s.to_i, $game_actors[1].next_exp_s.to_i, Color.new (0, 255, 0, 225)) #XP BAR
draw_actor_graphic($game_actors[1], 15, 63) #Actor 1 graphics
self.contents.font.size = 22 #Change to the font size you want
self.contents.font.bold = true #Change to bold yes or no
draw_actor_level($game_actors[1], 128, -5) #Actor 1 level
self.contents.font.size = 28 #Change to the font size you want
self.contents.font.name = "Monotype Corsiva" #Change to your font stile
draw_actor_name($game_actors[1],30 ,-5)
self.contents.font.bold = false #Change to bold yes or no
self.contents.font.size = 20 #Change to the font size you want
self.contents.blt(30, 63, RPG::Cache.icon("acce_005"), Rect.new(0, 0, 24, 24))#GOLD ICON
self.contents.draw_text(50, 60, 200, 32, "Gold: " + $game_party.gold.to_s)#GOLD AMOUNT
self.contents.font.size = 12 #Change to the font size you want
self.contents.font.name = "Tahoma" #Change to your font stile
self.contents.draw_text(65, 15, 200, 32, "HP: " + $game_party.actors[0].hp.to_s + "/" + $game_party.actors[0].maxhp.to_s)# HP BAR
self.contents.draw_text(65, 28, 200, 32, "SP: " + $game_party.actors[0].sp.to_s + "/" + $game_party.actors[0].maxsp.to_s)# SP BAR
self.contents.draw_text(65, 41, 200, 32, "Exp needed: " + $game_party.actors[0].next_rest_exp_s)#XP BAR
def update
refresh
end
def mouse_over?(window)
if $mouse.x > window.x and $mouse.x < window.x + window.width and
$mouse.y > window.y and $mouse.y < window.y + window.height
return true
end
return false
end
end
end
class Scene_Map
alias old_main main
alias old_update update
def init_hud
@Window2 = Window_2.new
@Exp = $game_party.actors[0].next_rest_exp_s
@Hp = $game_party.actors[0].hp
@Sp = $game_party.actors[0].sp
@gold = $game_party.gold
@str = $game_party.actors[0].str
@dex = $game_party.actors[0].dex
@agi = $game_party.actors[0].agi
@int = $game_party.actors[0].int
@level = $game_party.actors[0].level
@Name = $game_party.actors[0].name
end
def main
init_hud
old_main
end
def dispose
old_dispose
@Window2.dispose
end
def update
@Window2.update
old_update
end
end