How in the game the upper right above the small map added that coordinates... ?
CRect rectRoot = m_pWndRoot->GetLayoutRect(); CRect rectWindow = GetWindowRect(); CPoint point( rectRoot.right - rectWindow.Width(), rectRoot.top ); Move( point );
#ifdef __MINIMAP_COORDINATES
CString StrCoordinates; //CString Variable erstellen
D3DXVECTOR3 vPos = g_pPlayer->GetPos(); //Position in 3D Vector speichern
StrCoordinates.Format( prj.GetText(TID_GAME_NOWPOSITION), vPos.x, vPos.y, vPos.z ); //Koordinaten in CString schreiben
CWndStatic* pSkillNameStatic;
pSkillNameStatic = (CWndStatic*) GetDlgItem( WIDC_STATIC2 );
pSkillNameStatic->SetTitle(StrCoordinates); //Koordinaten auf dem Bildschirm ausgeben
#endif //__MINIMAP_COORDINATES
char sMsg[256] = { 0 };
D3DXVECTOR3 pPos = g_pPlayer->GetPos();
sprintf( sMsg, "( %i, %i, %i )",pPos.x,pPos.y,pPos.z);
CRect rectWindow = GetClientRect();
p2DRender->TextOut(rectWindow.left + 18, rectWindow.bottom - 18, sMsg, 0xff000000);
#ifdef __SHOW_POS_ON_NAVIGATER
if( g_pPlayer == NULL ) {
SetTitle( "Navigater" );
return;
}
char szMsg[256] = { 0 };
D3DXVECTOR3 pPos = g_pPlayer->GetPos();
sprintf( szMsg, "Pos: (%i , %i, %i)",pPos.x,pPos.y,pPos.z);
SetTitle( szMsg );
#endif
The code to put where?Quote:
UseCode:#ifdef __SHOW_POS_ON_NAVIGATER if( g_pPlayer == NULL ) { SetTitle( "Navigater" ); return; } char szMsg[256] = { 0 }; D3DXVECTOR3 pPos = g_pPlayer->GetPos(); sprintf( szMsg, "Pos: (%d , %d, %d)",pPos.x,pPos.y,pPos.z); SetTitle( szMsg ); #endif
void CWndNavigator::OnDraw(C2DRender* p2DRender)
{
#if __VER >= 13 // __RAINBOW_RACE
// Rainbow Race Time Ãâ·Â
DWORD dwRainbowRaceTime = CRainbowRace::GetInstance()->m_dwRemainTime;
if(dwRainbowRaceTime > 0)
{
char szMsg[256] = { 0 };
CTimeSpan ct( (dwRainbowRaceTime - GetTickCount()) / 1000 );
sprintf( szMsg, "%.2d:%.2d:%.2d", ct.GetHours(), ct.GetMinutes(), ct.GetSeconds() );
CRect rectWindow = GetClientRect();
p2DRender->TextOut(rectWindow.right - 50, rectWindow.bottom - 16, szMsg, 0xffffff00);
}
#endif //__RAINBOW_RACE
Omg,Quote:
Monster dich hab ich nicht gefragt Pumbaaa hat das nicht gecodet ;)
er hat paar koreanische Zeichen zu "Pos" gemacht und nen fehlendes %d rangehängt.
Ausserdem die Variablen sNavPos,Get2DPos und sPos hättest ja wohl nutzen können ;)