Files
2026-06-01 12:46:52 +02:00

143 lines
2.7 KiB
C++

#include "stdafx.h"
#include "SStringDB.h"
#include <toolkit/XStringUtil.h>
#include "SGameManager.h"
#include "SGameMessage.h"
//#include "SGameMessageUI.h"
#include "SMessengerMgr.h"
#include "SChatType.h"
//#include "KUIControl.h"
#include "KUIControlEdit.h"
#include "SUIHelpTeamPopupWnd.h"
namespace
{
const int g_LimitText = 20; // Edit 컨트롤 최대 텍스트.
}
SUIHelpTeamPopupWnd::SUIHelpTeamPopupWnd( SGameManager * pGameManager ) :
SUIWnd( pGameManager )
{
}
SUIHelpTeamPopupWnd::~SUIHelpTeamPopupWnd()
{
Release();
}
void SUIHelpTeamPopupWnd::Release()
{
}
SUIWnd* SUIHelpTeamPopupWnd::CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID )
{
SUIWnd::CreateWnd( szFile, pWndManager, kPos, nWindowID );
//// 스크롤바 관련 이미지.
//GetChild( "scroll_bg_trim_01" )->SetShow( false );
//GetChild( "scroll_bar_trim_01" )->SetShow( false );
//GetChild( "scroll_up_trim_01" )->SetShow( false );
//GetChild( "scroll_down_trim_01" )->SetShow( false );
KUIWnd * pScroll = GetChild( "scroll_bg_trim_01" );
if( pScroll )
pScroll->SetShow( false );
return this;
}
bool SUIHelpTeamPopupWnd::InitControls( KPoint kPos )
{
return SUIWnd::InitControls( kPos );
}
void SUIHelpTeamPopupWnd::OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd)
{
if( bOpen )
{
this->SetShow( true );
// 기존 포커스 제거.
this->m_pManager->RemoveWnd( this );
// wnd 출력 리스트의 최하단에 추가. ( wnd 들중 가장 상위에 뜨게 된다. )
this->m_pManager->AddWnd( this );
// 가장위에 뜨도록 한다.
this->m_pManager->SetFocus( this );
}
}
void SUIHelpTeamPopupWnd::ProcMsgAtStatic( SGameMessage* pMsg )
{
switch( pMsg->nType )
{
case IMSG_UI_MOVE:
{
SIMSG_UI_MOVE* pMoveMsg = ( SIMSG_UI_MOVE* )pMsg;
MovePos( pMoveMsg->m_nX, pMoveMsg->m_nY );
pMsg->bUse = true;
}
break;
case IMSG_SHOW_UIWINDOW:
pMsg->bUse = true;
break;
}
}
void SUIHelpTeamPopupWnd::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
{
switch( nMessage )
{
case KUI_MESSAGE::KBUTTON_CLICK :
// close.
if( !::_stricmp( lpszControlID, "button_close" ) ) //servantes 2010.10.13
{
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_GUILD_SUB_MANAGE_TEAM_HELP, false ) ); // 닫기
}
break;
// 윈도우 이동
case KUI_MESSAGE::KGENWND_MOVE:
LimitMoveWnd(); // 게임 외부로 나가지 못하게 제한
break;
}
SUIWnd::PumpUpMessage( lpszControlID, nMessage, lparam, wparam );
}
DWORD SUIHelpTeamPopupWnd::OnMouseMessage(DWORD dwMessage, int x, int y)
{
return SUIWnd::OnMouseMessage(dwMessage, x, y);
}