Commit 17be1c26 authored by 神楽坂玲奈's avatar 神楽坂玲奈

LP条追加用户名显示

parent 356ba08a
...@@ -4,17 +4,21 @@ class Window_LP < Window ...@@ -4,17 +4,21 @@ class Window_LP < Window
super(x,y,360,72) super(x,y,360,72)
@player = player @player = player
@position = position @position = position
@font = TTF.open("fonts/WenQuanYi Micro Hei.ttf", 24) @font = TTF.open("fonts/WenQuanYi Micro Hei.ttf", 20)
@color = [255,255,255] @color = [255,255,255]
if @player if @player
@player.avatar do |avatar| @player.avatar do |avatar|
clear(position ? 0 : @width-Avatar_Size, 24, Avatar_Size, Avatar_Size) clear(position ? 0 : @width-Avatar_Size, 24, Avatar_Size, Avatar_Size)
@contents.put avatar, position ? 0 : @width-Avatar_Size, 24 @contents.put avatar, position ? 0 : @width-Avatar_Size, 24
end end
if @position
@font.draw_solid_utf8(@contents, @player.name, Avatar_Size, 24, *@color)
else
@font.draw_solid_utf8(@contents, @player.name, @width-Avatar_Size-96, 24, *@color)
end
end end
self.lp = 8000 self.lp = 8000
end end
def lp=(lp) def lp=(lp)
return if lp == @lp return if lp == @lp
@lp = lp @lp = lp
...@@ -27,11 +31,4 @@ class Window_LP < Window ...@@ -27,11 +31,4 @@ class Window_LP < Window
@font.draw_blended_utf8(@contents, @lp.to_s, @width-width-64, 0, *@color) @font.draw_blended_utf8(@contents, @lp.to_s, @width-width-64, 0, *@color)
end end
end end
#def draw_item(player)
# if player == @player
#
# end
#
# end
end end
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment