class Window_Screen_XY < Window_Base
#--------------------------------------------------------------------------
# 걶 긆긳긙긃긏긣룊딖돸
#--------------------------------------------------------------------------
def initialize
one_line = ((PLAN_SCREEN_XY::FONT_SIZE * 100 / 22) * 32) / 100
super(PLAN_SCREEN_XY::WIN_X, PLAN_SCREEN_XY::WIN_Y, PLAN_SCREEN_XY::WIN_WIDTH, 32+one_line*2)
self.contents = Bitmap.new(width - 32, height - 32)
self.contents.font.size = PLAN_SCREEN_XY::FONT_SIZE
self.opacity = PLAN_SCREEN_XY::WIN_OPACITY
@old_x = $game_player.x
@old_y = $game_player.y
refresh
end
#--------------------------------------------------------------------------
# 걶 깏긲깒긞긘깄
#--------------------------------------------------------------------------
def refresh
one_line = ((PLAN_SCREEN_XY::FONT_SIZE * 100 / 22) * 32) / 100
self.contents.clear
self.contents.draw_text(4, 0, self.contents.width-8, one_line, "X:", 0)
self.contents.draw_text(4, 0, self.contents.width-8, one_line, $game_player.x.to_s, 2)
self.contents.draw_text(4, one_line, self.contents.width-8, one_line, "Y:", 0)
self.contents.draw_text(4, one_line, self.contents.width-8, one_line, $game_player.y.to_s, 2)
end
#--------------------------------------------------------------------------
# 걶 긲깒??뛛륷
#--------------------------------------------------------------------------
def update
if @old_x != $game_player.x or @old_y != $game_player.y
refresh
@old_x = $game_player.x
@old_y = $game_player.y
end
end
end
end
출처: "네이버 지식 인"