XP 스크립트

main 위에 넣으세요


#==============================================================================
# ■ Window_PlayTime
#------------------------------------------------------------------------------
#  메뉴 화면에서 플레이 시간을 표시하는 윈도우입니다.
#==============================================================================

class Window_PlayTime < Window_Base
#--------------------------------------------------------------------------
# ● 오브젝트 초기화
#--------------------------------------------------------------------------
def initialize
super(0, 0, 160, 126)
self.contents = Bitmap.new(width - 32, height - 32)
refresh
end
#--------------------------------------------------------------------------
# ● 리프레쉬
#--------------------------------------------------------------------------
def refresh
self.contents.clear
self.contents.font.color = text_color(6)
time = Time.now
text = time.strftime(" 시계 - %X")
self.contents.draw_text(-10, 0, 135, 32, text, 2)
self.contents.font.color = system_color
self.contents.draw_text(4, 32, 120, 32, "플레이시간")
@total_sec = Graphics.frame_count / Graphics.frame_rate
hour = @total_sec / 60 / 60
min = @total_sec / 60 % 60
sec = @total_sec % 60
text = sprintf("%02d:%02d:%02d", hour, min, sec)
self.contents.font.color = normal_color
self.contents.draw_text(4, 32, 120, 88, text, 2)
end

#--------------------------------------------------------------------------
# ● 프레임 갱신
#--------------------------------------------------------------------------
def update
super
if Graphics.frame_count / Graphics.frame_rate != @total_sec
refresh
end
end
end

Who's 백호

?

이상혁입니다.

http://elab.kr


List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 7314
821 메시지 Hermes(Hermes Extends RPGXP Message System) 0.4 by derula 1 Alkaid 2011.02.27 3082
820 스킬 스킬창 업그레이드? ps인간 2009.01.23 3072
819 메시지 한글자씩 뜨는 스크립트 6 백호 2009.02.21 3062
818 전투 심플액알 더더 수정(스위치, 변수) 17 file 백호 2009.02.21 3059
817 타이틀/게임오버 게임오버 화면 에서 커맨드 윈도우 스크립트 12 file 백호 2009.02.21 3050
816 메뉴 제가 쓰고있는 메뉴 13 file 백호 2009.02.21 3049
815 키입력 AInput Module 3.10 by vgvgf (전체키, 마우스 입력) 6 file Alkaid 2010.09.01 3047
814 메뉴 링 메뉴 소지금,플레이시간 추가 버젼 17 Neowitch* 2008.04.20 3044
813 전투 GTBS 1.4 스크립트 9 아방스 2009.02.05 3035
812 아이템 아이템획득스크립트 ps인간 2009.01.23 3019
811 전투 횡스크롤형식의 스크립트 7 백호 2009.02.21 3008
810 HUD 맵이름 넣기(bs님의 강의랑 다르게 스크립트로) 16 file 아방스 2007.11.09 3007
809 이동 및 탈것 캐릭터 이동 프레임? 증가 스크립트 9 백호 2009.02.21 3005
808 그래픽 WhiteFlute - BitmapEX 4 file JACKY 2012.12.10 3005
807 맵/타일 World Map version 1.2 11 백호 2009.02.22 2999
806 아이템 [신기술 체험] 인벤토리 8 file 백호 2009.02.22 2988
805 전투 CTB by Charlie Fleed 3.1 - FF10 스타일의 전투시스템 6 Alkaid 2010.09.10 2986
804 메뉴 메뉴 단축키 스크립트 14 백호 2009.02.22 2972
803 HUD 맵 이름을 표시해주는 스크립트입니다. 25 임희성 2011.02.12 2968
802 메뉴 Mog-메뉴업그레이드? ps인간 2009.01.23 2966
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 ... 52 Next
/ 52