阅读:2598回复:2
游戏内添加时间显示及在线时间
添加文件:
------------------------- WndWorld.cpp ------------------------- CString string; CTime time = CTime::GetCurrentTime(); string = time.Format( "真实时间: %H:%M:%S" ); p2DRender->TextOut( 5, 140 , string, D3DCOLOR_ARGB( 255, 0, 255, 255 ) ); TCHAR str[64]; _stprintf( str, "瑞嘉时间: %d:%d:%d",g_GameTimer.m_nHour,g_GameTimer.m_nMin,g_GameTimer.m_nSec); p2DRender->TextOut( 5, 155 , str, D3DCOLOR_ARGB( 255, 0, 255, 255 ) ); TCHAR strtime[64]; char* szT = new char[32]; MakeShowTime((GetCurrentTime() - g_jointime) / 1000,szT); _stprintf(strtime,"在线时间:%s",szT); p2DRender->TextOut(5,170,strtime,0xff00ffff); |
|
最新喜欢:cfanpc |
板凳#
发布于:2023-12-16 08:32
为了一个铜币努力177107046
|
|