XP 스크립트

#==============================================================================
# ■ 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

Comment '4'

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 스크립트 자료 게시물 작성시 주의사항 습작 2012.12.24 6202
114 기타 Trailing Characters ver.1 by SephirothSpawn 6 file 백호 2009.02.22 1551
113 기타 데미지 출력 스크립트 예제 9 file 백호 2009.02.22 1560
112 기타 RM2kXP file 습작 2014.03.17 1560
111 기타 Advanced Gold Display by Dubealex (돈 액수를 세자리씩 끊어 표기) 2 Alkaid 2010.11.18 1562
110 기타 이벤트 범위 스크립트 2 Tine 2012.07.25 1580
109 기타 치트키 시스템 3 백호 2009.02.22 1594
108 기타 레벨,능력치 9999 3 백호 2009.02.22 1596
107 기타 더블애니메이션 스크립트 1 백호 2009.02.22 1598
106 기타 발소리 스크립트 4 file 백호 2009.02.21 1614
105 기타 [자작]칼라 테이블입니다. 3 나뚜루 2009.01.24 1621
104 기타 endroll 주석 번역 6 file insertend 2010.05.15 1638
103 기타 [KGC]강화스크립트 백호 2009.02.21 1667
102 기타 포커(Blackjack) 게임을 도입하는 스크립트 5 file 백호 2009.02.21 1675
101 기타 레벨업포인트 3 백호 2009.02.22 1693
100 기타 Book Event v2 by Bruth 5 백호 2009.02.22 1694
99 기타 레벨업스크립트(xp) 2 게임을만들자! 2014.08.05 1695
98 기타 레벨, 능력치 무한 스크립트 3 백호 2009.02.22 1712
97 기타 테트리스 ?구현 스크립트 2 file 백호 2009.02.21 1715
96 기타 양손무기, 전신갑옷 스크립트 2 백호 2009.02.22 1716
95 기타 창고 스크립트 5 긔염둥이♥ 2012.06.18 1727
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 11 12 13 Next
/ 13