Пример #1
0
void CWndVendorMessage::AddMessage( LPCTSTR lpszFrom, LPCTSTR lpszMessage )
{


#if __VER >= 11 // __MOD_VENDOR
	CString strMessage;

	if( !strcmp( lpszFrom, g_pPlayer->GetName() ) )
		strMessage.Format( "#cffff0000%s%s :#nc\n  %s\n", lpszFrom, prj.GetText(TID_GAME_FROM3), lpszMessage );
	else
		strMessage.Format( "#cff0000ff%s%s :#nc\n  %s\n", lpszFrom, prj.GetText(TID_GAME_FROM3), lpszMessage );
	//  	strMessage.Format( "#cff0000ff%s님의 말 :#nc\n  %s\n", lpszFrom, lpszMessage );
	
	m_wndChat.AddString( strMessage );
	m_wndChat.m_wndScrollBar.SetMaxScrollPos();

#else
	CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
	CString strMessage;

	if( !strcmp( lpszFrom, g_pPlayer->GetName() ) )
		strMessage.Format( "#cffff0000%s%s :#nc\n  %s\n", lpszFrom, prj.GetText(TID_GAME_FROM3), lpszMessage );
	else
		strMessage.Format( "#cff0000ff%s%s :#nc\n  %s\n", lpszFrom, prj.GetText(TID_GAME_FROM3), lpszMessage );
	//  	strMessage.Format( "#cff0000ff%s님의 말 :#nc\n  %s\n", lpszFrom, lpszMessage );
	
	pWndText->AddString( strMessage );
	pWndText->m_wndScrollBar.SetMaxScrollPos();
#endif
	
}
Пример #2
0
void CWndDuelResult::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요
	
	CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
	//	CWndStatic* pWndStatic;
	//	pWndStatic = (CWndStatic*)GetDlgItem( WIDC_STATIC1 );
	CString strTemp;

	if( m_bDuelWin == FALSE )
		strTemp.Format( _T( prj.GetText(TID_DIAG_DUELRESULT_LOSE) ), m_szSrc ); // 메시지 바꾸려면 이걸 바꾸시오
	else
		strTemp.Format( _T( prj.GetText(TID_DIAG_DUELRESULT_WIN) ), m_szSrc ); // 메시지 바꾸려면 이걸 바꾸시오
	
	pWndText->SetString( strTemp );

	// 윈도를 중앙으로 옮기는 부분.
	/*
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
	*/
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( ( rectRoot.right - rectWindow.Width() ) / 2, 70 );
	Move( point );	
} 
Пример #3
0
void CWndVendorMessage::RemoveChattingMemver(LPCTSTR lpszName)
{
#if __VER >= 11 // __MOD_VENDOR
	if( m_nIsOwner )
	{
		CString str;
		str.Format( prj.GetText(TID_GAME_VENCHATOUT), lpszName );

		CString strMessage;
		strMessage.Format( "#cffff0000%s\n", str );
		
		m_wndInfo.AddString( strMessage );
		m_wndInfo.m_wndScrollBar.SetMaxScrollPos();
	}
#else
	CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
	CString str;
	str.Format( prj.GetText(TID_GAME_VENCHATOUT), lpszName );

	CString strMessage;
	strMessage.Format( "#cffff0000%s\n", str );
	
	pWndText->AddString( strMessage );
	pWndText->m_wndScrollBar.SetMaxScrollPos();	
#endif	
}
Пример #4
0
void CWndGuideTextMgr::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 

	DelWndStyle(WBS_MOVE);
	AddWndStyle(WBS_TOPMOST);
	m_wndTitleBar.SetVisible( FALSE );

	m_bVisible = FALSE;

	CWndText* pWndText;
	CWndButton* pWndButton;
    pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
	m_Rect[0] = pWndText->GetWndRect();
	pWndButton = (CWndButton*)GetDlgItem( WIDC_BACK );
	m_Rect[1] = pWndButton->GetWndRect();
#if __VER >= 12 // __MOD_TUTORIAL
	pWndButton->SetVisible(FALSE);
#endif
	pWndButton  = (CWndButton*)GetDlgItem( WIDC_NEXT );	
	m_Rect[2] = pWndButton->GetWndRect();
	m_Rect[3] = GetWndRect();

	m_nCurrentVector = 0;
	m_VecGuideText.clear();	

	m_pTextureBG = m_textureMng.AddTexture( g_Neuz.m_pd3dDevice, MakePath( DIR_THEME, "GuideBG.tga" ), 0, TRUE );
} 
Пример #5
0
void CWndPartyConfirm::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요

	CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
//	CWndStatic* pWndStatic;
//	pWndStatic = (CWndStatic*)GetDlgItem( WIDC_STATIC1 );
	CString strTemp;
	strTemp.Format(_T(prj.GetText(TID_DIAG_0072)),m_szLeaderName); // 메시지 바꾸려면 이걸 바꾸시오
//	strTemp.Format(_T("%s 님이 극단에 초청하고 있습니다. 참여하시겠습니까?"),m_szLeaderName); // 메시지 바꾸려면 이걸 바꾸시오
	pWndText->SetString( strTemp );
//	pWndStatic->SetTitle(strTemp); 
	
	// 윈도를 중앙으로 옮기는 부분.
	/*
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
	*/
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( ( rectRoot.right - rectWindow.Width() ) / 2, 70 );
	Move( point );	
} 
Пример #6
0
BOOL CWndTutorial::OnChildNotify( UINT message, UINT nID, LRESULT* pLResult ) 
{ 
	switch(nID)
	{
		case WIDC_LIST1: // view ctrl
			{
				CWndListBox* pWndListBox = (CWndListBox*)GetDlgItem( WIDC_LIST1 );
				int sel = pWndListBox->GetCurSel();
				map<int, TUTORIAL_STRING>::iterator iter = m_mapTutorial.find(pWndListBox->GetCurSel());
				m_strKeyword = iter->second.strTitle;
				CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT2 );
				pWndText->m_string.Init( m_pFont, &pWndText->GetClientRect() );
				pWndText->m_string.SetString("");
				pWndText->m_string.AddParsingString(LPCTSTR(iter->second.strContents));
				pWndText->UpdateScrollBar();
			}
			break;
	}

	return CWndNeuz::OnChildNotify( message, nID, pLResult ); 
} 
Пример #7
0
void CWndDuelConfirm::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요
	
	CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
	//	CWndStatic* pWndStatic;
	//	pWndStatic = (CWndStatic*)GetDlgItem( WIDC_STATIC1 );
	CString strTemp;

	/*
	if( m_bDuelParty == FALSE )
		strTemp.Format( _T("%s 님이 듀얼신청을 하였습니다. 허락하겠습니까?"), m_szSrc ); // 메시지 바꾸려면 이걸 바꾸시오
	else
		strTemp.Format( _T("%s 님이 극단듀얼신청을 하였습니다. 허락하겠습니까?"), m_szSrc ); // 메시지 바꾸려면 이걸 바꾸시오
	*/
	if( m_bDuelParty == FALSE )
		strTemp.Format( _T( prj.GetText(TID_DIAG_0066) ), m_szSrc ); // 메시지 바꾸려면 이걸 바꾸시오
	else
		strTemp.Format( _T( prj.GetText(TID_DIAG_0067) ), m_szSrc ); // 메시지 바꾸려면 이걸 바꾸시오
	
	pWndText->SetString( strTemp );

	// 윈도를 중앙으로 옮기는 부분.
	/*
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
	*/
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( ( rectRoot.right - rectWindow.Width() ) / 2, 70 );
	Move( point );	
} 
Пример #8
0
void CWndGuideTextMgr::_SetGuideText(GUIDE_STRUCT guide)
#endif
{
	CWndText* pWndText;
	CWndButton* pWndButton;

	pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
	pWndText->SetWndRect( m_Rect[0] );
	pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
	pWndButton->SetWndRect( m_Rect[1] );
	pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
	pWndButton->SetWndRect( m_Rect[2] );
	SetWndRect(	m_Rect[3] );
#if __VER >= 12 // __MOD_TUTORIAL
	if(bIsNext) pWndButton->SetVisible(TRUE);
	else		pWndButton->SetVisible(FALSE);
#endif
	
	m_bVisible = TRUE;

	m_strHelpKey = guide.m_str;
	pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
#if __VER >= 12 // __MOD_TUTORIAL
	pWndText->SetString("");
	pWndText->m_string.AddParsingString(LPCTSTR(guide.m_str));
	pWndText->ResetString();
#else
	pWndText->SetString( (guide.m_nkey == CWndGuideSystem::KEY) ? prj.GetHelp( m_strHelpKey ) : guide.m_str );
#endif
	CRect rect = pWndText->GetWndRect();

	pWndText->m_string.Align( m_pFont );
	
	int nLine = pWndText->m_string.GetLineCount();
	
	if( nLine < 10 )
	{
		if( nLine < 8 )
			nLine = 8;

		CRect clientrect = GetWndRect();
		
		int ngap = rect.Height() - (nLine * 22);
		clientrect.top += ngap;
		SetWndRect(clientrect);

		rect.bottom -= ngap;
		pWndText->SetWndRect( rect );

		CRect ptRect;
#ifndef __MOD_TOTURIAL
		pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
		ptRect = pWndButton->GetWndRect();
		ptRect.OffsetRect( 0, -ngap );
		pWndButton->SetWndRect(ptRect);
#endif
		pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
		ptRect = pWndButton->GetWndRect();
		ptRect.OffsetRect( 0, -ngap );
		pWndButton->SetWndRect(ptRect);
		
		pWndText->m_wndScrollBar.m_bVisible = FALSE;
	}
	else
	{
		/*
		pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );
		pWndText->SetWndRect( m_Rect[0] );
		pWndButton= (CWndButton*)GetDlgItem( WIDC_BACK );
		pWndButton->SetWndRect( m_Rect[1] );
		pWndButton= (CWndButton*)GetDlgItem( WIDC_NEXT );
		pWndButton->SetWndRect( m_Rect[2] );
		SetWndRect(	m_Rect[3] );
		*/

		pWndText->m_wndScrollBar.m_bVisible = TRUE;
		pWndText->SetWndRect( rect );
	}

	CWndGuideSystem* pWndGuide = (CWndGuideSystem*)GetWndBase( APP_GUIDE );
	CRect rectGuide = pWndGuide->GetWindowRect( TRUE );
	CPoint ptGuide = rectGuide.TopLeft();
	CPoint ptMove;

	pWndGuide->m_bVisible = TRUE;
	
	CRect windowrect = GetWindowRect( TRUE );
	
	if( ptGuide.x > windowrect.Width() )
		ptMove = ptGuide - CPoint( windowrect.Width(), 0 );
	else
		ptMove = ptGuide + CPoint( rectGuide.Width(), 0 );

	ptMove.y = rectGuide.bottom;
	ptMove.y -= windowrect.Height();
	
	if( ptMove.y < 0 )
		ptMove.y = rectGuide.top;
	
	Move( ptMove );
}
Пример #9
0
void CWndInfoNotice::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요

	CWndButton* pWndCheck = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
	pWndCheck->SetCheck( !g_Option.m_bNotice );
	CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT1 );

#ifdef __YNOTICE_UNI1026
	CString strnotice;
	strnotice = GetLangFileName( ::GetLanguage(), FILE_NOTICE );
		
	CScript scanner;
	if( scanner.Load( "Client\\"+strnotice ) == FALSE )
		return;
	
	pWndText->m_string.AddParsingString( scanner.m_pProg  );
	pWndText->ResetString();
#else //__YNOTICE_UNI1026
	CFileStatus fileStatus;
	
	CString strnotice;
	strnotice = GetLangFileName( ::GetLanguage(), FILE_NOTICE );
	
	if( CFile::GetStatus( "Client\\"+strnotice, fileStatus ) == TRUE )
	{
		if( g_Option.m_tNoticeTime != fileStatus.m_mtime.GetTime() )
			g_Option.m_tNoticeTime = static_cast< time_t >( fileStatus.m_mtime.GetTime() );

		CFileIO file;

		strnotice = GetLangFileName( ::GetLanguage(), FILE_NOTICE );
	
		if(::GetLanguage() == LANG_VTN)
		{
			if( file.Open( "Client\\"+strnotice, "rb" ) )
			{
				int nLength = file.GetLength();
				TCHAR* pChar = new TCHAR[ nLength + 2 ];
				file.Read( pChar, nLength );
				*(pChar + nLength ) = '\0';
				*(pChar + nLength + 1 ) = '\0';

				char* lpMultiByte = new char[ nLength + 2 ];

				int nResult = WideCharToMultiByteEx( g_codePage, 0, 
					                               (LPWSTR)(pChar+2), -1, 
						                           lpMultiByte, nLength, 
												   NULL, NULL );

				if( nResult > 0 )
				{
					lpMultiByte[nResult-1] = 0;
					pWndText->m_string.AddParsingString( lpMultiByte );
					pWndText->ResetString();
				}
				safe_delete_array(pChar);
				safe_delete_array(lpMultiByte);
			}
		}
		else
		{
			if( file.Open( "Client\\"+strnotice, "rb" ) )
			{
				int nLength = file.GetLength();
				TCHAR* pChar = new TCHAR[ nLength + 1];
				file.Read( pChar, nLength );
				pChar[ nLength ] = 0;
				//pWndText->SetString( pChar );
				pWndText->m_string.AddParsingString( pChar );
				pWndText->ResetString();
				safe_delete( pChar );
			}
		}
	}
#endif //__YNOTICE_UNI1026

	// 윈도를 중앙으로 옮기는 부분.
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();

/////////////////////////////////////////////////////////////////////////////////////////
	int nCount = 0;	
	CScript script;
	if( script.Load(MakePath(DIR_THEME, "TexBannerList.inc" )) )
	{
		int nLang;
		nLang = script.GetNumber();
		do 
		{
			if( nLang == ::GetLanguage() )
			{
				script.GetToken();
				
				nCount = atoi( script.token );
				
				script.GetToken();				
				
				for( int i=0; i<nCount; i++ )
				{
					CString addStr = script.token;
					m_vecStrBanner.push_back( addStr );
					script.GetToken();
				}
				
				if( nCount <= 0 )
				{
					Error( "TexBannerList.inc의 갯수가 0이다" );
					return;
				}
				
				break;
			}
			else
				script.GetLastFull();

			nLang = script.GetNumber();
		} while( script.tok != FINISHED );		
	}
	
	SAFE_DELETE( m_atexPannel );
	if( nCount > 0 )
	{
		m_atexPannel = new IMAGE;
		LoadImage( MakePath( DIR_THEME, m_vecStrBanner[xRandom(nCount)] ), m_atexPannel );
		AdjustWndBase();	
	}
/////////////////////////////////////////////////////////////////////////////////////////	
}