206 lines
6.6 KiB
C++
206 lines
6.6 KiB
C++
|
|
#include "stdafx.h"
|
|
#include "SUIRaceSelectWnd.h"
|
|
#include "SGameRenewalLobby.h"
|
|
//#include "SGameMessageUI.h"
|
|
#include "SGameManager.h"
|
|
//#include "SGameMessageUI.h"
|
|
|
|
#include "KUIControlQJTV.h"
|
|
#include <kfile/KFileManager.h>
|
|
#include "QJTVObj.h"
|
|
#include "KUITextureManager.h"
|
|
#include "KDeviceManager.h"
|
|
|
|
#include "SGameMessage.h"
|
|
|
|
#include "GameDefine.h"
|
|
|
|
|
|
SUIRaceSelectWnd::SUILobbyProcessWnd::SUILobbyProcessWnd( SGameManager* pGameManager) : SUIWnd(pGameManager)
|
|
{
|
|
}
|
|
|
|
|
|
DWORD SUIRaceSelectWnd::SUILobbyProcessWnd::OnMouseMessage(DWORD dwMessage, int x, int y)
|
|
{
|
|
|
|
/* if( 0 == ::_stricmp( "asurabtn", lpszControlID ) )
|
|
{
|
|
m_pGameManager->StartSound( "ui_bgm_antechamber02.wav" );
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_RACE_SELECT( GCLAN_ASURA ) );
|
|
}
|
|
else if( 0 == ::_stricmp( "devabtn", lpszControlID ) )
|
|
{
|
|
m_pGameManager->StartSound( "ui_bgm_antechamber02.wav" );
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_RACE_SELECT( GCLAN_DEVA ) );
|
|
}
|
|
else if( 0 == ::_stricmp( "gaiabtn", lpszControlID ) )
|
|
{
|
|
m_pGameManager->StartSound( "ui_bgm_antechamber02.wav" );
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_RACE_SELECT( GCLAN_GAIA ) );
|
|
}*/
|
|
|
|
static DWORD prevplayeffectsound = 0;
|
|
if(GetSafeTickCount() - prevplayeffectsound > 300)
|
|
{
|
|
|
|
KUIWnd *wnd=GetChild("asurabtn");
|
|
if(wnd == NULL)
|
|
wnd=GetChild("gaiabtn");
|
|
if(wnd == NULL)
|
|
wnd=GetChild("devabtn");
|
|
|
|
if(wnd)
|
|
{
|
|
if(wnd->GetRect().IsInRect(x,y))
|
|
{
|
|
m_pGameManager->StartSound( "ui_popup_window01.wav" );
|
|
prevplayeffectsound = GetSafeTickCount();
|
|
}
|
|
}
|
|
}
|
|
|
|
return SUIWnd::OnMouseMessage(dwMessage, x, y);
|
|
}
|
|
|
|
|
|
void SUIRaceSelectWnd::SUILobbyProcessWnd::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
|
|
switch( nMessage )
|
|
{
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
if( 0 == ::_stricmp( "asurabtn", lpszControlID ) )
|
|
{
|
|
m_pGameManager->StartSound( "ui_bgm_antechamber02.wav" );
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_RACE_SELECT( GCLAN_ASURA ) );
|
|
}
|
|
else if( 0 == ::_stricmp( "devabtn", lpszControlID ) )
|
|
{
|
|
m_pGameManager->StartSound( "ui_bgm_antechamber02.wav" );
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_RACE_SELECT( GCLAN_DEVA ) );
|
|
}
|
|
else if( 0 == ::_stricmp( "gaiabtn", lpszControlID ) )
|
|
{
|
|
m_pGameManager->StartSound( "ui_bgm_antechamber02.wav" );
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UI_RACE_SELECT( GCLAN_GAIA ) );
|
|
}
|
|
else
|
|
{
|
|
m_pGameManager->StartSound( "ui_bgm_antechamber01.wav" );
|
|
m_pGameManager->ProcMsgAtStatic( &SIMSG_UIWND_NOTIFY_TO_LOBBY( lpszControlID ) );
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
|
|
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
|
|
}
|
|
|
|
|
|
SUIRaceSelectWnd::SUIRaceSelectWnd( SGameManager* pGameManager, bool bMovieRender ) : SUIWnd(pGameManager)
|
|
{
|
|
}
|
|
|
|
|
|
|
|
SUIWnd* SUIRaceSelectWnd::CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID )
|
|
{
|
|
SUIWnd::CreateWnd( szFile, pWndManager, kPos, nWindowID );
|
|
|
|
int adjustwidth = pWndManager->GetResolution().height * 4 / 3;
|
|
if(adjustwidth>KUIWndManager::GetResolution().cx)
|
|
adjustwidth = KUIWndManager::GetResolution().cx;
|
|
|
|
int adjustheight = pWndManager->GetResolution().height;
|
|
int adjustx = KUIWndManager::GetResolution().cx/2 - adjustwidth/2;
|
|
if(adjustx<0)
|
|
adjustx = 0;
|
|
|
|
//캐릭터 이름 판넬
|
|
{
|
|
SUIWnd *asuracharnamewnd = new SUIWnd( m_pGameManager );
|
|
asuracharnamewnd->CreateWnd( "window_lobby_clan_asura_info.nui", pWndManager, KPoint(adjustx+20*adjustwidth/1024, 415*adjustheight/768) );
|
|
asuracharnamewnd->SetParent(this);
|
|
AddChild(asuracharnamewnd);
|
|
asuracharnamewnd->SetShow(true);
|
|
|
|
SUIWnd *gaiacharnamewnd = new SUIWnd( m_pGameManager );
|
|
gaiacharnamewnd->CreateWnd( "window_lobby_clan_gaia_info.nui", pWndManager, KPoint(adjustx+343*adjustwidth/1024, 553*adjustheight/768) );
|
|
gaiacharnamewnd->SetParent(this);
|
|
AddChild(gaiacharnamewnd);
|
|
gaiacharnamewnd->SetShow(true);
|
|
|
|
SUIWnd *devacharnamewnd = new SUIWnd( m_pGameManager );
|
|
devacharnamewnd->CreateWnd( "window_lobby_clan_deva_info.nui", pWndManager, KPoint(adjustx+840*adjustwidth/1024, 415*adjustheight/768) );
|
|
devacharnamewnd->SetParent(this);
|
|
AddChild(devacharnamewnd);
|
|
devacharnamewnd->SetShow(true);
|
|
}
|
|
|
|
|
|
//종족선택 이름 판넬
|
|
{
|
|
SUILobbyProcessWnd *asuraewnd = new SUILobbyProcessWnd( m_pGameManager );
|
|
asuraewnd->CreateWnd( "window_lobby_clan_asura_choice.nui", pWndManager, KPoint(adjustx+0*adjustwidth/1024, 498*adjustheight/768) );
|
|
asuraewnd->SetParent(this);
|
|
AddChild(asuraewnd);
|
|
asuraewnd->SetShow(true);
|
|
|
|
SUILobbyProcessWnd *gaiawnd = new SUILobbyProcessWnd( m_pGameManager );
|
|
gaiawnd->CreateWnd( "window_lobby_clan_gaia_choice.nui", pWndManager, KPoint(adjustx+481*adjustwidth/1024, 524*adjustheight/768) );
|
|
gaiawnd->SetParent(this);
|
|
AddChild(gaiawnd);
|
|
gaiawnd->SetShow(true);
|
|
|
|
SUILobbyProcessWnd *devawnd = new SUILobbyProcessWnd( m_pGameManager );
|
|
devawnd->CreateWnd( "window_lobby_clan_deva_choice.nui", pWndManager, KPoint(adjustx+844*adjustwidth/1024, 497*adjustheight/768) );
|
|
devawnd->SetParent(this);
|
|
AddChild(devawnd);
|
|
devawnd->SetShow(true);
|
|
}
|
|
|
|
//이전버튼
|
|
{
|
|
SUILobbyProcessWnd *processwnd = new SUILobbyProcessWnd( m_pGameManager );
|
|
processwnd->CreateWnd( "window_lobby_clan_process.nui", pWndManager, KPoint(adjustx+859*adjustwidth/1024, 677*adjustheight/768) );
|
|
processwnd->SetParent(this);
|
|
AddChild(processwnd);
|
|
processwnd->SetShow(true);
|
|
}
|
|
|
|
//기타 텍스트
|
|
{
|
|
SUIWnd *clantext = new SUIWnd( m_pGameManager );
|
|
clantext->CreateWnd( "window_lobby_clan_choice_text.nui", pWndManager, KPoint(adjustx+42*adjustwidth/1024, 677*adjustheight/768) );
|
|
clantext->SetParent(this);
|
|
AddChild(clantext);
|
|
clantext->SetShow(true);
|
|
|
|
SUIWnd *topinfo = new SUIWnd( m_pGameManager );
|
|
topinfo->CreateWnd( "window_lobby_clan_topinfo.nui", pWndManager, KPoint(0, 9*adjustheight/768) );
|
|
topinfo->SetParent(this);
|
|
AddChild(topinfo);
|
|
topinfo->MovePos( adjustx+adjustwidth/2 - topinfo->GetRect().GetWidth()/2, 9*adjustheight/768 );
|
|
topinfo->SetShow(true);
|
|
|
|
SUIWnd *story = new SUIWnd( m_pGameManager );
|
|
story->CreateWnd( "window_lobby_clan_story.nui", pWndManager, KPoint(0, 83*adjustheight/768) );
|
|
story->SetParent(this);
|
|
AddChild(story);
|
|
story->MovePos( adjustx+adjustwidth/2 - story->GetRect().GetWidth()/2, 83*adjustheight/768 );
|
|
story->SetShow(true);
|
|
|
|
SUIWnd *downinfo = new SUIWnd( m_pGameManager );
|
|
downinfo->CreateWnd( "window_lobby_clan_downinfo.nui", pWndManager, KPoint(0, 700*adjustheight/768) );
|
|
downinfo->SetParent(this);
|
|
AddChild(downinfo);
|
|
downinfo->MovePos( adjustx+adjustwidth/2 - downinfo->GetRect().GetWidth()/2, 700*adjustheight/768 );
|
|
downinfo->SetShow(true);
|
|
}
|
|
|
|
return this;
|
|
}
|