Beispiel #1
0
void CWndOption::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 

	CWndButton* pWndAlpha = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
	pWndAlpha->SetCheck( g_Option.m_nWindowAlpha == 255 ? FALSE : TRUE);
	CWndButton* pWndHelp = (CWndButton*)GetDlgItem( WIDC_CHECK2 );
	pWndHelp->SetCheck( g_Option.m_nInstantHelp );
	
	CWndButton* pWndButton[ 4 ];

	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
	pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
	pWndButton[ 0 ]->SetGroup( TRUE );
	pWndButton[ g_Option.m_nSlangWord ]->SetCheck( TRUE );

	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO3 );
	pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO4 );
	pWndButton[ 2 ] = (CWndButton*)GetDlgItem( WIDC_RADIO5 );
	pWndButton[ 3 ] = (CWndButton*)GetDlgItem( WIDC_RADIO6 );
	pWndButton[ 0 ]->SetGroup( TRUE );
	pWndButton[ g_Option.m_nChatCommand ]->SetCheck( TRUE );

	// ÀÎÅÍÆäÀ̽º ¹æ½Ä(±¸¹öÀüÀÌ µðÆúÆ®)
	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO7 );
	pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO8 );
#ifdef __Y_INTERFACE_VER3
	pWndButton[ 2 ] = (CWndButton*)GetDlgItem( WIDC_RADIO12 );
#endif //__Y_INTERFACE_VER3
	pWndButton[ 0 ]->SetGroup( TRUE );
	pWndButton[ g_Option.m_nInterface ]->SetCheck( TRUE );

	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO9 );
	pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO10 );
	pWndButton[ 2 ] = (CWndButton*)GetDlgItem( WIDC_RADIO11 );
	pWndButton[ 0 ]->SetGroup( TRUE );
	pWndButton[ *g_Option.m_pGuide ]->SetCheck( TRUE );

	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_CHECK4 );
	if(pWndButton[ 0 ])
	pWndButton[ 0 ]->SetCheck( g_Option.m_bCameraLock );

	// ºñÇà½Ã ·Ñ¸µ È¿°ú.
	CWndButton* pWndRoll = (CWndButton*)GetDlgItem( WIDC_CHECK3 );		
	pWndRoll->SetCheck( g_Option.m_bRollEffect );

	#if __VER >= 11 // __ADD_ZOOMOPT
	CWndButton* pWndZoom = (CWndButton*)GetDlgItem( WIDC_CHECK5 );		
	pWndZoom->SetCheck(!g_Option.m_bZoomLimit);
	#endif
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
} 
Beispiel #2
0
void CWndOptWindow::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 

	CWndButton* pWndEffect = (CWndButton*)GetDlgItem( WIDC_CHECK );
	pWndEffect->SetCheck( g_Option.m_nWindowAlpha == 255 ? FALSE : TRUE);

	CWndButton* pWndButton[ 3 ];

	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
	pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
	pWndButton[ 2 ] = (CWndButton*)GetDlgItem( WIDC_RADIO3 );
	pWndButton[ 0 ]->SetGroup( TRUE );
	pWndButton[ g_Option.m_nWindowEffect ]->SetCheck( TRUE );
/*
	pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_OBJECT_DISTANT_HIGH );
	pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_OBJECT_DISTANT_MID );
	pWndButton[ 2 ] = (CWndButton*)GetDlgItem( WIDC_OBJECT_DISTANT_LOW );
	pWndButton[ 0 ]->SetGroup( TRUE );
*/

	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
} 
Beispiel #3
0
void CWndChat::SerializeRegInfo( CAr& ar, DWORD& dwVersion )
{
	CWndNeuz::SerializeRegInfo( ar, dwVersion );
	if( ar.IsLoading() )
	{
		if( dwVersion == 0 )
		{
		}
		else
		{
			ar >> m_bChatLock;
		}
#ifndef __CHAT_V19
		CWndButton* pWndLock = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
		pWndLock->SetCheck( m_bChatLock );
#endif //__CHAT_V19
	}
	else
	{
Beispiel #4
0
void CWndChat::OnInitialUpdate()
{
	CWndNeuz::OnInitialUpdate();

#ifdef __CHAT_V19
	CWndButton* pWndLock = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
	CWndButton* pWndLog = (CWndButton*)GetDlgItem( WIDC_CHECK3 );
	CWndButton* pWndMoveLock = (CWndButton*)GetDlgItem( WIDC_MOVELOCK );
	CWndButton* pWndHelp = (CWndButton*)GetDlgItem( WIDC_HELP );
	CWndButton* pWndCheck = (CWndButton*)GetDlgItem( WIDC_RADIO6 );
	pWndLock->SetVisible( false );
	pWndLog->SetVisible( true );
	pWndMoveLock->SetVisible( false );
	pWndHelp->SetVisible( false );
	pWndCheck->SetVisible(false);
#endif //__CHAT_V19

	//AddWndStyle( WBS_THICKFRAME );

	m_timerDobe.Set( SEC( 5 ) );

	LPWNDCTRL lpWndCtrl = GetWndCtrl( WIDC_MACRO_CHAT );
	LPWNDCTRL lpWndText = GetWndCtrl( WIDC_CUSTOM1 );
	m_wndMacroChat.Create( "g", WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_MACRO_CHAT );
	m_wndMacroChat.AddWndStyle( WBS_NODRAWFRAME );

	lpWndCtrl = GetWndCtrl( WIDC_EDIT );
	m_wndEdit.Create( g_Neuz.GetSafeHwnd(), WBS_NODRAWFRAME, lpWndCtrl->rect, this, WIDC_EDIT );
	m_wndText.Create( WBS_NOFRAME | WBS_NODRAWFRAME | WBS_VSCROLL, lpWndText->rect, this, WIDC_TEXT );
	CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT );
	CWndEdit* pWndHead = (CWndEdit*)GetDlgItem( WIDC_HEAD );
	CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem( WIDC_EDIT );

	if( g_pPlayer->IsAuthHigher( AUTH_GAMEMASTER ) )
	{
		pWndText->m_bEnableClipboard = TRUE;
		pWndHead->m_bEnableClipboard = TRUE;
		pWndEdit->m_bEnableClipboard = TRUE;
	}
	pWndEdit->SetNativeMode();

#if __VER >= 11 // __CSC_VER11_1
	CRect rectEdit = m_wndEdit.GetWndRect();
	rectEdit.left = rectEdit.left - 90;
	m_wndEdit.SetWndRect( rectEdit );

	CRect customRect = lpWndCtrl->rect;
	CWndCustom* pCustom = (CWndCustom*)GetDlgItem(WIDC_MACRO_CHAT);
	if(pCustom)
#ifdef __CHAT_V19
		pCustom->Move(customRect.TopLeft().x - 112, customRect.TopLeft().y - 2);
#else
		pCustom->Move(customRect.TopLeft().x - 119, customRect.TopLeft().y);
		pWndEdit->Move(customRect.TopLeft().x + 105, customRect.bottom + 30);
#endif //__CHAT_V19
	if(pWndHead)
	{
		pWndHead->EnableWindow(FALSE);
		pWndHead->SetVisible(FALSE);
	}
#endif //__CSC_VER11_1
	if( g_Option.m_nInstantHelp )
	{
		CScript	s;
		s.Load( MakePath( DIR_CLIENT, "InstantHelp.inc" ) );
		s.GetToken();
		while( s.tok != FINISHED )
		{
			m_strArray.Add( s.Token );
			s.GetToken();
		}
	}
	//m_strArray.

/*
	CRect rect = GetClientRect();
	rect.top = rect.bottom - 20;
	rect.right = 70;
	rect.left += 5;
	rect.DeflateRect( 1, 1 );
	m_wndBeginning.Create( g_Neuz.GetSafeHwnd(), WBS_NODRAWFRAME, rect, this, 1000);

	rect = GetClientRect();
	rect.top = rect.bottom - 20;
	rect.left = 75;
	rect.right -= 134;
	rect.DeflateRect( 1, 1 );
	//rect.left = rect.Width() * 20 / 100;
	//m_wndEdit.AddWndStyle( WBS_NODRAWFRAME );
	m_wndEdit.Create( g_Neuz.GetSafeHwnd(), WBS_NODRAWFRAME, rect, this, 1001 );
*/
//	m_texEdit.LoadTexture( m_pApp->m_pd3dDevice, MakePath( DIR_THEME, "WndChat2.bmp" ), 0xffff00ff, TRUE );
/*
	rect = GetClientRect();
	rect.top = rect.bottom - 20;
	rect.left = rect.right - 134;
	rect.right = r mnnnnft + 15;
	rect.DeflateRect( 1, 1 );
	m_wndShout.Create( " ", 0, rect, this, 1010 );

	rect = GetClientRect();
	rect.top = rect.bottom - 20;
	rect.left = rect.right - 117;
	rect.right = rect.left + 15;
	rect.DeflateRect( 1, 1 );
	m_wndParty.Create( " ", 0, rect, this, 1011 );
*/

/*
	m_wndText.AddWndStyle( WBS_VSCROLL );
	m_wndText.AddWndStyle( WBS_NOFRAME );
	m_wndText.AddWndStyle( WBS_NODRAWFRAME );
	m_wndText.Create( 0, rect, this, 1003 ); 
	m_wndText.SetFont( g_Neuz.m_Theme.m_pFontChat );
	m_wndText.m_string.Reset( m_pFont, &rect);
*/
/*
	rect = GetClientRect();
	rect.left = rect.right - 100;
	//rect.bottom -= 80;
	rect.DeflateRect( 1, 1 );
	m_wndReceiver.AddWndStyle( WBS_VSCROLL );
	m_wndReceiver.AddWndStyle( WBS_NOFRAME );
	m_wndReceiver.Create( EBS_AUTOVSCROLL, rect, this, 1002 );
	m_wndReceiver.AddString( "Vampyre\n" );
	m_wndReceiver.AddString( "Xuzhu\n" );
	m_wndReceiver.AddString( "Zodiacus\n" );
	m_wndReceiver.AddString( "Jeff\n" );
	m_wndReceiver.m_string.Reset( m_pFont, &rect);
*/

	//CWndText* pWndText = (CWndText*)GetDlgItem( WIDC_TEXT );
	SetChannel();
	CWndButton* pWndRadio1 = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
	CWndButton* pWndRadio2 = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
	CWndButton* pWndRadio3 = (CWndButton*)GetDlgItem( WIDC_RADIO3 );
	CWndButton* pWndRadio4 = (CWndButton*)GetDlgItem( WIDC_RADIO4 );
	CWndButton* pWndRadio5 = (CWndButton*)GetDlgItem( WIDC_RADIO5 );
	if( m_nChatChannel == CHATSTY_GENERAL ) pWndRadio1->SetCheck( TRUE );	else
	if( m_nChatChannel == CHATSTY_WHISPER ) pWndRadio2->SetCheck( TRUE );	else
	if( m_nChatChannel == CHATSTY_SHOUT   ) pWndRadio3->SetCheck( TRUE );	else
	if( m_nChatChannel == CHATSTY_PARTY   ) pWndRadio4->SetCheck( TRUE );	else
	if( m_nChatChannel == CHATSTY_GUILD   ) pWndRadio5->SetCheck( TRUE );
	//pWndText->m_string.Init(
	//pWndText->m_string = g_WndMng.m_ChatString;
	pWndText->m_nLineSpace = 2;
	//pWndText->m_string.Reset( m_pFont, &pWndText->GetClientRect() );
	
	//pWndText->
	/*
	CRect rect = GetClientRect();
	rect.bottom -= 20;
	rect.right -= 0;//100;
	rect.DeflateRect( 1, 1);
	m_wndText.SetWndRect( rect );
*/
	//LPBYTE m_wndChatEdit[3];
	//CSize sizeWndChatEdit[3];
#if __VER >= 11 // __CSC_VER11_1
	LoadTGA( MakePath( DIR_THEME, "WndChatEdit00_1.tga" ), &m_wndChatEdit[0] );
#else //__CSC_VER11_1
	LoadTGA( MakePath( DIR_THEME, "WndChatEdit00.tga" ), &m_wndChatEdit[0] );
#endif //__CSC_VER11_1
	LoadTGA( MakePath( DIR_THEME, "WndChatEdit01.tga" ), &m_wndChatEdit[1] );
#ifdef __LANG_IME_0327
	LoadTGA( MakePath( DIR_THEME,  ::GetLanguage(), "WndChatEdit02.tga" ), &m_wndChatEdit[2] );
#else	// __LANG_IME_0327
	LoadTGA( MakePath( DIR_THEME, "WndChatEdit02.tga" ), &m_wndChatEdit[2] );
#endif	// __LANG_IME_0327

	if( m_wndChatEdit[2].lpData == NULL )
	{
		Error( "CWndChat::OnInitialUpdate() m_wndChatEdit[2].lpData = NULL" );
		return;
	}
/*
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( 154, rectRoot.bottom - rectWindow.Height() );
	Move( point );
*/
#ifndef __CHAT_V19
	CWndButton* pWndLock = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
	pWndLock->SetCheck( m_bChatLock );
	CWndButton* pWndMoveLock = (CWndButton*)GetDlgItem( WIDC_MOVELOCK );
	pWndMoveLock->SetCheck( m_bMoveLock );
#endif //__CHAT_V19
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rect = GetWindowRect();
	int nWidth  = rect.Width(); 
	int nHeight = rect.Height(); 
	int x = 0;//rectRoot.left + (rectRoot.Width()  / 2) - (nWidth  / 2);
	int y = rectRoot.bottom - nHeight;	
	CPoint point( x, y );
	Move( point );

	m_timerInputTimeOut.Set( SEC( 300 ) );

#if __VER >= 8 //__Y_CHAT_SYSTEM_8
	if( g_WndMng.m_pWndChatLog == NULL )
	{
		g_WndMng.m_pWndChatLog = new CWndChatLog;
		
		if( g_WndMng.m_pWndChatLog )
		{
			g_WndMng.m_pWndChatLog->Initialize( NULL, APP_CHAT_LOG );
			
			CRect rectRoot = m_pWndRoot->GetLayoutRect();
			CRect rect = GetWindowRect(TRUE);
			CRect rect2 = g_WndMng.m_pWndChatLog->GetClientRect(TRUE);
			
			int x = 0;
			int y = rect.top;
			
			if( (rect.right+rect2.Width()) < rectRoot.right )
				x = rect.right;
			else
				x = (rect.left - rect2.Width() );
			
			CPoint point( x, y );
			g_WndMng.m_pWndChatLog->Move( point );

			g_WndMng.m_pWndChatLog->SetVisible(FALSE);
		}
	}

	if( g_WndMng.m_pWndChatLog )
	{
		CWndButton* pWndCheck3  = (CWndButton*)GetDlgItem( WIDC_CHECK3 );
		if( pWndCheck3 )
			pWndCheck3->SetCheck(g_WndMng.m_pWndChatLog->m_bVisible);
	}
#endif //__Y_CHAT_SYSTEM_8
}
Beispiel #5
0
void CWndDebugInfo::OnInitialUpdate() 
{ 
	CWndNeuz::OnInitialUpdate(); 
	// 여기에 코딩하세요

	CWndButton* pWndButton;

	pWndButton = (CWndButton*)GetDlgItem( WIDC_GRID       ); pWndButton->SetCheck( g_WorldMng()->m_bViewGrid      );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_TERRAIN    ); pWndButton->SetCheck( g_WorldMng()->m_bViewTerrain   );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_LOD_TERRAIN); pWndButton->SetCheck( g_WorldMng()->m_bViewLODTerrain);
	pWndButton = (CWndButton*)GetDlgItem( WIDC_LOD_OBJ    ); pWndButton->SetCheck( g_WorldMng()->m_bViewLODObj    );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_ANIMATION  ); pWndButton->SetCheck( CObj::IsAnimate()	 	      );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_LIGHT      ); pWndButton->SetCheck( g_WorldMng()->m_bViewLight     );
	//pWndButton = (CWndButton*)GetDlgItem( WIDC_CAPTURE    ); pWndButton->SetCheck( 	 	);
	pWndButton = (CWndButton*)GetDlgItem( WIDC_HIDE       ); pWndButton->SetCheck( !g_pPlayer->IsVisible() );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_WIREFRAME  ); pWndButton->SetCheck( g_WorldMng()->m_bViewWireframe  );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_OBJECT     ); pWndButton->SetCheck( g_WorldMng()->m_bViewAllObjects );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_FRAME_SKIP ); pWndButton->SetCheck( GetFrameSkip()	               );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_WEATHER    ); pWndButton->SetCheck( g_WorldMng()->m_bViewWeather	   );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_BOUNDBOX   ); pWndButton->SetCheck( g_WorldMng()->m_bViewBoundBox   );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_ATTRIBUTE  ); pWndButton->SetCheck( g_WorldMng()->m_bViewHeightAttribute	 	);
	pWndButton = (CWndButton*)GetDlgItem( WIDC_SKYBOX     ); pWndButton->SetCheck( g_WorldMng()->m_bViewSkybox 	  );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_NAME       ); pWndButton->SetCheck( g_WorldMng()->m_bViewName 	  );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_CULLOBJ    ); pWndButton->SetCheck( g_WorldMng()->m_bCullObj	      );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_COLLISION  ); pWndButton->SetCheck( CObj::m_bCollision	 	      );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_FOG        ); pWndButton->SetCheck( g_WorldMng()->m_bViewFog 	  );	 
	pWndButton = (CWndButton*)GetDlgItem( WIDC_IDSTATE    ); pWndButton->SetCheck( g_WorldMng()->m_bViewIdState   );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_WATER      ); pWndButton->SetCheck( g_WorldMng()->m_bViewWater 	  );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_HOUR       ); pWndButton->SetCheck( g_GameTimer.IsFixed()  );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_CHECK1     ); pWndButton->SetCheck( g_WorldMng()->m_bViewHP 	  );
	
	CString string;
	string.Format( "%d", g_GameTimer.m_nHour );
	CWndEdit* pWndEdit = (CWndEdit*)GetDlgItem( WIDC_EDIT_HOUR ); pWndEdit->SetString( string );
	pWndButton = (CWndButton*)GetDlgItem( WIDC_HOUR ); pWndButton->SetCheck(  g_GameTimer.IsFixed() );
	//g_World.m_bViewWater
	//////////////////////////////////////////////////////
	
	CRect rectRoot = m_pWndRoot->GetLayoutRect();
	CRect rectWindow = GetWindowRect();
	CPoint point( rectRoot.right - rectWindow.Width(), 110 );
	Move( point );
	MoveParentCenter();
} 
Beispiel #6
0
void CWndOptionGame::OnInitialUpdate()
{
    CWndNeuz::OnInitialUpdate();
    // 여기에 코딩하세요

    CWndButton* pWndButton[ 2 ];

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO1 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO2 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bTrade) ]->SetCheck( TRUE );

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO3 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO4 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bSay) ]->SetCheck( TRUE );

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO5 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO6 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bParty) ]->SetCheck( TRUE );
#if __VER >= 12 // __UPDATE_OPT
    m_Texture.LoadTexture( g_Neuz.GetDevice(), MakePath( DIR_THEME, "WndVolumeBar.tga" ), 0xffff00ff, TRUE );
    m_TexturePt.LoadTexture( g_Neuz.GetDevice(), MakePath( DIR_THEME, "ButtSpin.tga" ), 0xffffffff, TRUE );
    m_nStep[0] = (int)( g_Option.m_fEffectVolume * 10 );
    m_nStep[1] = (int)( g_Option.m_fBGMVolume * 10 );

    CWndButton* pWndHelp = (CWndButton*)GetDlgItem( WIDC_CHECK1 );
    pWndHelp->SetCheck( g_Option.m_nInstantHelp );

    CWndButton* pWndCheck = (CWndButton*)GetDlgItem( WIDC_CHECK2 );
    if(*g_Option.m_pGuide > 0)
        pWndCheck->SetCheck( FALSE );
    else
        pWndCheck->SetCheck( TRUE );

    CWndButton* pWndAlpha = (CWndButton*)GetDlgItem( WIDC_CHECK3 );
    pWndAlpha->SetCheck( g_Option.m_nWindowAlpha == 255 ? FALSE : TRUE);

#if __VER >= 15 // __IMPROVE_SYSTEM_VER15
    CWndButton* pWndCheckBattleBGM = (CWndButton*)GetDlgItem( WIDC_CHECK_BATTLE_BGM );
    pWndCheckBattleBGM->SetCheck( g_Option.m_bBattleBGM ? TRUE : FALSE );
#endif // __IMPROVE_SYSTEM_VER15
#ifdef __GAME_GRADE_SYSTEM
    CWndButton* pWndCheckGameGrade = (CWndButton*)GetDlgItem( WIDC_CHECK_GAME_GRADE );
    if( pWndCheckGameGrade )
    {
        if( ::GetLanguage() == LANG_KOR )
        {
            pWndCheckGameGrade->SetCheck( g_Option.m_bGameGradeRendering ? TRUE : FALSE );
        }
        else
        {
            pWndCheckGameGrade->SetVisible( FALSE );
        }
    }
#endif // __GAME_GRADE_SYSTEM

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO7 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO8 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bMessengerJoin) ]->SetCheck( TRUE );
#else
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_SHOUT_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_SHOUT_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bShout) ]->SetCheck( TRUE );
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_MESSENGERJOIN_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_MESSENGERJOIN_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bMessengerJoin) ]->SetCheck( TRUE );
#endif


    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_MESSENGER_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_MESSENGER_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    pWndButton[ !(g_Option.m_bMessenger) ]->SetCheck( TRUE );

#if __VER >= 9 // __CSC_VER9_REMOVE_PKSETTING
    CRect rect;
    LPWNDCTRL lpWndCtrl;
    // 자동 PK 모드 옵션 제거
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_AUTOPK_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_AUTOPK_OFF );
    pWndButton[ 0 ]->EnableWindow(FALSE);
    pWndButton[ 0 ]->SetVisible(FALSE);
    pWndButton[ 1 ]->EnableWindow(FALSE);
    pWndButton[ 1 ]->SetVisible(FALSE);
    CWndStatic* pStatic = (CWndStatic*)GetDlgItem( WIDC_STATIC8 );
    pStatic->EnableWindow(FALSE);
    pStatic->SetVisible(FALSE);

    // 옵션 위치 제조정
    lpWndCtrl = GetWndCtrl( WIDC_STATIC8 );
    rect = lpWndCtrl->rect;
    pStatic = (CWndStatic*)GetDlgItem( WIDC_STATIC9 );
    pStatic->Move(rect.TopLeft().x, rect.TopLeft().y);
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_ACCEPTPVP_ON );
    lpWndCtrl = GetWndCtrl( WIDC_AUTOPK_ON );
    rect = lpWndCtrl->rect;
    pWndButton[ 0 ]->Move(rect.TopLeft().x, rect.TopLeft().y);
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_ACCEPTPVP_OFF );
    lpWndCtrl = GetWndCtrl( WIDC_AUTOPK_OFF );
    rect = lpWndCtrl->rect;
    pWndButton[ 1 ]->Move(rect.TopLeft().x, rect.TopLeft().y);
#else //__CSC_VER9_REMOVE_PKSETTING
    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_AUTOPK_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_AUTOPK_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    if( g_pPlayer )
        pWndButton[ !(g_pPlayer->IsMode( FREEPK_MODE ) ) ]->SetCheck( TRUE );
    else
        pWndButton[ 1 ]->SetCheck( TRUE );
#endif //__CSC_VER9_REMOVE_PKSETTING

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_ACCEPTPVP_ON );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_ACCEPTPVP_OFF );
    pWndButton[ 0 ]->SetGroup( TRUE );
    if( g_pPlayer )
        pWndButton[ g_pPlayer->IsMode( PVPCONFIRM_MODE ) ]->SetCheck( TRUE );
    else
        pWndButton[ 0 ]->SetCheck( TRUE );

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO12 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO13 );
    pWndButton[ 0 ]->SetGroup( TRUE );
    if( g_pPlayer->IsMode( EQUIP_DENIAL_MODE ) )
        pWndButton[ 1 ]->SetCheck( TRUE );
    else
        pWndButton[ 0 ]->SetCheck( TRUE );

    pWndButton[ 0 ] = (CWndButton*)GetDlgItem( WIDC_RADIO14 );
    pWndButton[ 1 ] = (CWndButton*)GetDlgItem( WIDC_RADIO15 );
    pWndButton[ 0 ]->SetGroup( TRUE );

    if( g_Option.m_bAutoAttack )
        pWndButton[ 0 ]->SetCheck( TRUE );
    else
        pWndButton[ 1 ]->SetCheck( TRUE );

    // 윈도를 중앙으로 옮기는 부분.
    CRect rectRoot = m_pWndRoot->GetLayoutRect();
    CRect rectWindow = GetWindowRect();
    CPoint point( rectRoot.right - rectWindow.Width(), 110 );
    Move( point );
    MoveParentCenter();
}
Beispiel #7
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();	
	}
/////////////////////////////////////////////////////////////////////////////////////////	
}