#include "stdafx.h"
#include "LoginUIManager.h"
#include "UIBackWindow.h"
#include "LoginWindow.h"

#include "EditBox.h"

cLoginUIManager::cLoginUIManager()
{
	mpLoginWindow = 0;
}

cLoginUIManager::~cLoginUIManager()
{
	mpLoginWindow = 0;
}

/// 주의사항 :
void cLoginUIManager::Init()
{
	UIMAN->SetCurrentStage( eStage_Login );

	/// 로그인 윈도우 생성 
	mpLoginWindow = new cLoginWindow;
	mpLoginWindow->CreateByPropertyName( "P_LoginWindow", 0 );
}

/// 주의사항 :
void cLoginUIManager::Open()
{
	UIMAN->SetCurrentStage( eStage_Login );

	mpLoginWindow->UIStageIn();
}

/// 주의사항 :
void cLoginUIManager::Close()
{
	UIMAN->SetCurrentStage( eStage_Login );

	mpLoginWindow->Hide();
}

/// 주의사항 :
void cLoginUIManager::Process( unsigned long /*accumtime*/ )
{
}

void cLoginUIManager::FocusIDEdit()
{
	mpLoginWindow->ClearPass();
	mpLoginWindow->ClearID( true );
}

void cLoginUIManager::FocusPassEdit()
{
	mpLoginWindow->ClearPass( true );
}

void cLoginUIManager::Visible()
{
	mpLoginWindow->SetEnabled( true );
	mpLoginWindow->ShowTop();
}

void cLoginUIManager::SetSendLoginFlag( bool set )
{
	mpLoginWindow->SetSendLoginFlag( set );
}
