#include "SunClientPrecompiledHeader.h" #if !defined(_NA_006802_20130704_REORGANIZATION_RANK_SYSTEM) #include "uiMissionRankList.h" #include "uiMissionRankMan/uiMissionRankMan.h" #include "uiSystemMan/uiSystemMan.h" #include "Hero.h" #include "GlobalFunc.h" #include "interfacemanager.h" #include "MapInfoParser.h" #define MAX_SUB_MISSION_COUNT 5 const int c_iDefaultRankLine = 3; const int c_iDefaultMemberLine = 4; #ifdef _INTERNATIONAL_UI const DWORD c_iListFont = StrToWzID("st10"); #else const DWORD c_iListFont = StrToWzID("m212"); #endif//_INTERNATIONAL_UI const DWORD c_ListSelBarColor = RGBA(0,51,102,100); const DWORD c_ListBKColor = RGBA(255,255,255,0); const DWORD c_ListTextColor = RGBA(255,255,255,255); const DWORD c_ListSelTextColor = RGBA(255,255,255,255); //GS_BUG_FIX:¹Ì¼Ç¼ø¼­¸¦ Á¤·ÄÇÒ ÇÔ¼ö°´Ã¼ Á¤ÀÇ ³»¸²Â÷¼øÀ¸·Î inline BOOL MapListSort_Funter::operator()(sMAPINFO *lhs, sMAPINFO* rhs) const { return ((lhs->byMType)<(rhs->byMType)); } //------------------------------------------------------------------------------ WzID uiMissionRankList::m_wzId[DIALOG_MAX] = { StrToWzID("B999"), // Á¾·á //DLGPOS_MRL_BTN_EXIT, StrToWzID("T002"), // °á»êÀÏ //DLGPOS_MRL_TXT_DATE, StrToWzID("T006"), // Áö¿ª ÅØ½ºÆ® //DLGPOS_MRL_TXT_AREA, StrToWzID("T008"), // ÀÓ¹« ÅØ½ºÆ® //DLGPOS_MRL_TXT_MISSION, StrToWzID("T200"), // ÆäÀÌÁö Ç¥½Ã //DLGPOS_MRL_TXT_PAGE, StrToWzID("LS00"), // ¸í¿¹ÀÇ Àü´ç ¸®½ºÆ® //DLGPOS_MRL_LST_FAME, StrToWzID("L001"), // ÁÖ°£¼øÀ§ ¸®½ºÆ® //DLGPOS_MRL_LST_WEEK, StrToWzID("L005"), // Àü ÁÖ°£¼øÀ§ ¸®½ºÆ® //DLGPOS_MRL_LST_PREWEEK, StrToWzID("L002"), // ±¸¼º¿ø Á¤º¸ ¸®½ºÆ® //DLGPOS_MRL_LST_MEMBER, StrToWzID("L004"), // Áö¿ª(¸ÞÀι̼Ç) ¸®½ºÆ® //DLGPOS_MRL_LST_AREA, StrToWzID("L003"), // ÀÓ¹«(¼­ºê¹Ì¼Ç)¸®½ºÆ® //DLGPOS_MRL_LST_MISSION, StrToWzID("S001"), // ÁÖ°£¼øÀ§ ½ºÅ©·Ñ //DLGPOS_MRL_VSCR_WEEK, StrToWzID("S002"), // Àü ÁÖ°£¼øÀ§ ½ºÅ©·Ñ //DLGPOS_MRL_VSCR_PREWEEK, StrToWzID("S003"), // ±¸¼º¿ø ½ºÅ©·Ñ //DLGPOS_MRL_VSCR_MEMBER, StrToWzID("B001"), // Áö¿ª(¸ÞÀι̼Ç)¼±Åà ¹öư //DLGPOS_MRL_BTN_AREA, StrToWzID("B002"), // ÀÓ¹«(¼­ºê¹Ì¼Ç)¼±Åà ¹öư //DLGPOS_MRL_BTN_MISSION, StrToWzID("B104"), // º¸»ó¹Þ±â ¹öư //DLGPOS_MRL_BTN_REWARD, StrToWzID("B000"), // ´Ý±â ¹öư //DLGPOS_MRL_BTN_CLOSE, StrToWzID("B105"), // ÆäÀÌÁö À妽º °¨¼Ò ¹öư(<-) //DLGPOS_MRL_BTN_PAGE_LEFT, StrToWzID("B106"), // ÆäÀÌÁö À妽º Áõ°¡ ¹öư(->) //DLGPOS_MRL_BTN_PAGE_RIGHT, StrToWzID("T001"), // DLGPOS_MRL_TXT_TITLE, StrToWzID("B009"), // DLGPOS_MRL_BTN_NAME1, StrToWzID("BT01"), // DLGPOS_MRL_BTN_NAME2, StrToWzID("B101"), // DLGPOS_MRL_BTN_NAME3, StrToWzID("B005"), // DLGPOS_MRL_BTN_POINT1, StrToWzID("B003"), // DLGPOS_MRL_BTN_POINT2, StrToWzID("B103"), // DLGPOS_MRL_BTN_POINT3, StrToWzID("CT00"), StrToWzID("CT01"), StrToWzID("BT00"), StrToWzID("BT01"), StrToWzID("BT02"), StrToWzID("B003"), StrToWzID("BT07"), StrToWzID("BT06"), StrToWzID("BT04"), StrToWzID("B008"), }; //------------------------------------------------------------------------------ /** */ uiMissionRankList::uiMissionRankList(InterfaceManager *pUIMan) : uiBase(pUIMan), m_bControlsInitialized(false) { this->m_pMissionRankMan = GET_DIALOG_MANAGER( uiMissionRankMan, UIMAN_MISSION_RANK ); assert (m_pMissionRankMan); if (!this->m_pMissionRankMan) { #ifdef _DEBUG uiSystemMan * pSystemMan = (uiSystemMan *)g_InterfaceManager.GetUserInterfaceManager(UIMAN_SYSTEM); if(pSystemMan) pSystemMan->Sys_VerifyLock(_T("m_pMissionRankManÀÌ ¾ø½À´Ï´Ù.")); #endif this->ShowInterface(FALSE); return; } m_bShow = false; m_bShowMainList = false; m_bShowSubList = false; m_iCurMainListIndex = -1; m_iCurSubListIndex = -1; m_MissionNo = 0; m_iCurEventMainListIndex = -1; m_iCurEventSubListIndex = -1; } //------------------------------------------------------------------------------ /** */ uiMissionRankList::~uiMissionRankList() { this->Release(); } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::Init(CDrawBase* pDrawBase) { uiBase::Init(pDrawBase); this->InitControls(); } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::Release() { } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::InitControls() { int i=0; for(i=0; i(this->getControl(DLGPOS_MRL_TXT_DATE + i)); } for(i=0; i(this->getControl(DLGPOS_MRL_LST_FAME + i)); } for(i=0; i(this->getControl(DLGPOS_MRL_BTN_AREA + i)); } for(i=0; i(this->getControl(DLGPOS_MRL_VSCR_WEEK + i)); } if(m_pScroll[MRL_VSCR_PREWEEK]) m_pScroll[MRL_VSCR_PREWEEK]->ShowWindowWZ( WZ_SHOW ); m_pTxtTitle = NULL; m_pTxtTitle = static_cast(this->getControl(DLGPOS_MRL_TXT_TITLE)); for(i=0; i(this->getControl(DLGPOS_MRL_BTN_NAME1 + i)); } m_pWeekCheckButton = static_cast( getControl( DLGPOS_MRL_BTN_WEEK ) ); m_pPreWeekCheckButton = static_cast( getControl( DLGPOS_MRL_BTN_PREWEEK ) ); this->m_bControlsInitialized = true; } //------------------------------------------------------------------------------ void uiMissionRankList::_initRankListSelect() { if(m_pListControl[MRL_LST_FAME]) m_pListControl[MRL_LST_FAME]->SetCurSel(-1); if(m_pListControl[MRL_LST_WEEK]) m_pListControl[MRL_LST_WEEK]->SetCurSel(-1); if(m_pListControl[MRL_LST_PREWEEK]) m_pListControl[MRL_LST_PREWEEK]->SetCurSel(-1); _initMemberList(); } //------------------------------------------------------------------------------ void uiMissionRankList::_initRankList() { CControlWZ * pRate = getControl( DLGPOS_MRL_STATIC_RATE ); CControlWZ * pPartyNumber = getControl( DLGPOS_MRL_STATIC_PARTY_NUMBER ); CControlWZ * pLevel = getControl( DLGPOS_MRL_STATIC_LEVEL ); CControlWZ * pTime = getControl( DLGPOS_MRL_STATIC_TIME ); CControlWZ * pFramePartyNumber = getControl( DLGPOS_MRL_BTN_NAME1 ); CControlWZ * pFrameLevel = getControl( DLGPOS_MRL_STATIC_FLAME_LEVEL ); CControlWZ * pFrameTime = getControl( DLGPOS_MRL_BTN_POINT1 ); if(m_pListControl[MRL_LST_FAME]) { m_pListControl[MRL_LST_FAME]->DeleteItemAll(); m_pListControl[MRL_LST_FAME]->SetColorSelBar(c_ListSelBarColor); m_pListControl[MRL_LST_FAME]->SetUseReport(true); m_pListControl[MRL_LST_FAME]->SetReportUseCnt(3); m_pListControl[MRL_LST_FAME]->SetHideReportRender(true); #ifdef _NA_000000_20130114_RENEWER_UI m_pListControl[MRL_LST_FAME]->SetStartLineGapTop(4); #endif//#ifdef _NA_000000_20130114_RENEWER_UI GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_FAME], 0, pFramePartyNumber->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_FAME], 1, pFrameLevel->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_FAME], 2, pFrameTime->GetSize().right, NULL ); } if(m_pListControl[MRL_LST_WEEK]) { m_pListControl[MRL_LST_WEEK]->DeleteItemAll(); m_pListControl[MRL_LST_WEEK]->SetColorSelBar(c_ListSelBarColor); m_pListControl[MRL_LST_WEEK]->SetUseReport(true); m_pListControl[MRL_LST_WEEK]->SetReportUseCnt(4); m_pListControl[MRL_LST_WEEK]->SetHideReportRender(true); #ifdef _NA_000000_20130114_RENEWER_UI m_pListControl[MRL_LST_WEEK]->SetStartLineGapTop(4); #endif//#ifdef _NA_000000_20130114_RENEWER_UI GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_WEEK], 0, pRate->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_WEEK], 1, pPartyNumber->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_WEEK], 2, pLevel->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_WEEK], 3, pTime->GetSize().right, NULL ); } if(m_pListControl[MRL_LST_PREWEEK]) { m_pListControl[MRL_LST_PREWEEK]->DeleteItemAll(); m_pListControl[MRL_LST_PREWEEK]->SetColorSelBar(c_ListSelBarColor); m_pListControl[MRL_LST_PREWEEK]->SetUseReport(true); m_pListControl[MRL_LST_PREWEEK]->SetReportUseCnt(4); m_pListControl[MRL_LST_PREWEEK]->SetHideReportRender(true); #ifdef _NA_000000_20130114_RENEWER_UI m_pListControl[MRL_LST_PREWEEK]->SetStartLineGapTop(4); #endif//#ifdef _NA_000000_20130114_RENEWER_UI GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_PREWEEK], 0, pRate->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_PREWEEK], 1, pPartyNumber->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_PREWEEK], 2, pLevel->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_PREWEEK], 3, pTime->GetSize().right, NULL ); } } //------------------------------------------------------------------------------ void uiMissionRankList::_initMemberList() { if(m_pListControl[MRL_LST_MEMBER]) { m_pListControl[MRL_LST_MEMBER]->DeleteItemAll(); m_pListControl[MRL_LST_MEMBER]->SetColorSelBar(c_ListSelBarColor); m_pListControl[MRL_LST_MEMBER]->SetUseReport(true); m_pListControl[MRL_LST_MEMBER]->SetReportUseCnt(3); m_pListControl[MRL_LST_MEMBER]->SetHideReportRender(true); m_pListControl[MRL_LST_MEMBER]->SetSellHeight(21); #ifdef _NA_000000_20130114_RENEWER_UI m_pListControl[MRL_LST_MEMBER]->SetStartLineGapTop(4); #endif//#ifdef _NA_000000_20130114_RENEWER_UI m_pListControl[MRL_LST_MEMBER]->SetCurSel(-1); if(m_pScroll[MRL_VSCR_MEMBER]) { m_pScroll[MRL_VSCR_MEMBER]->SetScrollRangeWZ(0,0); //½ºÅ©·Ñ ¹üÀ§ m_pScroll[MRL_VSCR_MEMBER]->SetScrollPosWZ(0); } } } //------------------------------------------------------------------------------ void uiMissionRankList::_initPageSet() { if(m_pListControl[MRL_LST_WEEK]) m_pListControl[MRL_LST_WEEK]->SetCurSel(-1); _initMemberList(); } //------------------------------------------------------------------------------ void uiMissionRankList::_prepareDisplay() { m_bShow = true; m_bShowMainList = false; m_bShowSubList = false; _setTitle(); SetAreaList(); _initRankListSelect(); // À̹øÁÖ ÁÖ°£ ¼øÀ§ if(m_pScroll[MRL_VSCR_WEEK]) { m_pScroll[MRL_VSCR_WEEK]->SetScrollPosWZ(0); } // Áö³­ÁÖ ÁÖ°£ ¼øÀ§ if(m_pScroll[MRL_VSCR_PREWEEK]) { m_pScroll[MRL_VSCR_PREWEEK]->SetScrollPosWZ(0); } // ±¸¼º¿ø Á¤º¸ if(m_pScroll[MRL_VSCR_MEMBER]) { m_pScroll[MRL_VSCR_MEMBER]->SetScrollPosWZ(0); } GetManager()->ClearRankData(); UpdateMissionSelectList(); UpdateMissionText(true); _initRankList(); } //------------------------------------------------------------------------------ void uiMissionRankList::OnShowWindow( BOOL val ) { if (val) { //uiBase::MoveCenter(); if (!this->m_bControlsInitialized) { this->ShowInterface(FALSE); return; } _prepareDisplay(); keyMsg msg; ZeroMemory(&msg,sizeof(msg)); msg.dwType = eDoType_dialog_mission_rank_list; if (GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK) { msg.wParam = IM_MISSION_RANK_MANAGER::MissionRankList; } else if (GetManager()->GetRankingSystemType() == eRANKING_TYPE_POINT) { msg.wParam = IM_MISSION_RANK_MANAGER::PointRankList; } msg.DoSomething = GlobalFunc::DoShowWindowEx; g_KeyQueueManager.PushBack(msg); if( GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK ) { if( m_pWeekCheckButton ) m_pWeekCheckButton->SetCheckState( TRUE ); if( m_pPreWeekCheckButton ) m_pPreWeekCheckButton->SetCheckState( FALSE ); m_pListControl[MRL_LST_WEEK]->ShowWindowWZ( WZ_SHOW ); m_pListControl[MRL_LST_PREWEEK]->ShowWindowWZ( WZ_HIDE ); } } else { g_KeyQueueManager.DeleteMsg(eDoType_dialog_mission_rank_list); } } //------------------------------------------------------------------------------ /** */ BOOL uiMissionRankList::_isEnable() { if(GENERALPARAM->IsNet()) { if (this->IsLock()) return FALSE; if(!g_pHero) return FALSE; if( g_pHero && g_pHero->IsShowFullMap() ) return FALSE; if(!GetManager()) return FALSE; return TRUE; } else { return TRUE; } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::MessageProc( SI_MESSAGE * pMessage ) { if (!_isEnable()) return; switch( pMessage->eResultMsg ) { case RT_MSG_LBUTTONCLICK: { switch( getCtrlIDToPos( pMessage->dwCtrlID ) ) { case DLGPOS_MRL_BTN_EXIT: case DLGPOS_MRL_BTN_CLOSE: { m_bShow = false; } break; case DLGPOS_MRL_BTN_PAGE_LEFT: { if(GetManager()->DecPage() == true) { _initRankListSelect(); UpdatePageText(); } } break; case DLGPOS_MRL_BTN_PAGE_RIGHT: { if(GetManager()->IncPage() == true) { _initRankListSelect(); UpdatePageText(); } } break; case DLGPOS_MRL_BTN_AREA: { m_bShowMainList = !m_bShowMainList; if(m_bShowMainList) m_bShowSubList = false; UpdateMissionSelectList(); } break; case DLGPOS_MRL_BTN_MISSION: { m_bShowSubList = !m_bShowSubList; if(m_bShowSubList) m_bShowMainList = false; UpdateMissionSelectList(); } break; case DLGPOS_MRL_BTN_REWARD: { if(GetManager()->IsEnableReward()) { GetManager()->ShowRankGamble(); } } break; case DLGPOS_MRL_LST_AREA: { if(m_pListControl[MRL_LST_AREA] && (m_pListControl[MRL_LST_AREA]->GetCurSel() >= 0)) { if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK) // ¹Ì¼Ç·©Å· { m_iCurMainListIndex = m_pListControl[MRL_LST_AREA]->GetCurSel(); } else // Æ÷ÀÎÆ® ·©Å· { m_iCurEventMainListIndex = m_pListControl[MRL_LST_AREA]->GetCurSel(); } m_bShowMainList = false; m_bShowSubList = false; SetMissionList(); UpdateMissionSelectList(); UpdateMissionText(false); _initRankListSelect(); } else { m_bShowMainList = false; m_bShowSubList = false; UpdateMissionSelectList(); } } break; case DLGPOS_MRL_LST_MISSION: { if(m_pListControl[MRL_LST_MISSION] && (m_pListControl[MRL_LST_MISSION]->GetCurSel() >= 0)) { if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK) // ¹Ì¼Ç·©Å· { m_iCurSubListIndex = m_pListControl[MRL_LST_MISSION]->GetCurSel(); } else // Æ÷ÀÎÆ® ·©Å· { m_iCurEventSubListIndex = m_pListControl[MRL_LST_MISSION]->GetCurSel(); } m_bShowMainList = false; m_bShowSubList = false; UpdateMissionSelectList(); UpdateMissionText(false); _initRankListSelect(); } else { m_bShowMainList = false; m_bShowSubList = false; UpdateMissionSelectList(); } } break; case DLGPOS_MRL_LST_FAME: { m_pListControl[MRL_LST_WEEK]->SetCurSel(-1); m_pListControl[MRL_LST_PREWEEK]->SetCurSel(-1); if( GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK ) { m_pListControl[MRL_LST_MEMBER]->SetCurSel(-1); } if(GetManager()->GetRankingSystemType() != eRANKING_TYPE_TIME_ATTACK) //¹Ì¼Ç·©Å· { break; } int iIndex = m_pListControl[MRL_LST_FAME]->GetCurSel(); if(iIndex >= 0) { GetManager()->Send_CG_MISSION_RANKING_MEMBER_INFO_SYN(m_MissionNo, iIndex, eRANKING_FAME); } } break; case DLGPOS_MRL_LST_WEEK: { m_pListControl[MRL_LST_FAME]->SetCurSel(-1); m_pListControl[MRL_LST_PREWEEK]->SetCurSel(-1); if( GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK ) { m_pListControl[MRL_LST_MEMBER]->SetCurSel(-1); } if(GetManager()->GetRankingSystemType() != eRANKING_TYPE_TIME_ATTACK) //¹Ì¼Ç·©Å· { break; } int iIndex = m_pListControl[MRL_LST_WEEK]->GetCurSel(); if(iIndex >= 0) { GetManager()->Send_CG_MISSION_RANKING_MEMBER_INFO_SYN(m_MissionNo, iIndex, eRANKING_TODAYWEEK); } } break; case DLGPOS_MRL_LST_PREWEEK: { m_pListControl[MRL_LST_FAME]->SetCurSel(-1); m_pListControl[MRL_LST_WEEK]->SetCurSel(-1); if( GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK ) { m_pListControl[MRL_LST_MEMBER]->SetCurSel(-1); } if(GetManager()->GetRankingSystemType() != eRANKING_TYPE_TIME_ATTACK) //¹Ì¼Ç·©Å· { break; } int iIndex = m_pListControl[MRL_LST_PREWEEK]->GetCurSel(); if(iIndex >= 0) { GetManager()->Send_CG_MISSION_RANKING_MEMBER_INFO_SYN(m_MissionNo, iIndex, eRANKING_LASTWEEK); } } break; case DLGPOS_MRL_LST_MEMBER: { } break; case DLGPOS_MRL_BTN_WEEK: { m_pWeekCheckButton->SetCheckState( TRUE ); m_pPreWeekCheckButton->SetCheckState( FALSE ); m_pListControl[MRL_LST_WEEK]->ShowWindowWZ( WZ_SHOW ); m_pListControl[MRL_LST_PREWEEK]->ShowWindowWZ( WZ_HIDE ); } break; case DLGPOS_MRL_BTN_PREWEEK: { m_pWeekCheckButton->SetCheckState( FALSE ); m_pPreWeekCheckButton->SetCheckState( TRUE ); m_pListControl[MRL_LST_WEEK]->ShowWindowWZ( WZ_HIDE ); m_pListControl[MRL_LST_PREWEEK]->ShowWindowWZ( WZ_SHOW ); } break; } } break; case RT_MSG_SB_LINETOP: //.À­ÂÊ È­»ìÇ¥¸¦ ´­·¶´Ù. { switch( getCtrlIDToPos( pMessage->dwCtrlID ) ) { case DLGPOS_MRL_VSCR_WEEK: { if(m_pScroll[MRL_VSCR_WEEK]) { int pos = m_pScroll[MRL_VSCR_WEEK]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù. int mmin = 0 , mmax = 0; m_pScroll[MRL_VSCR_WEEK]->GetScrollRangeWZ( &mmin, &mmax );//½ºÅ©·Ñ °ªÀÇ ÃÖ´ë ÃÖ¼Ò¸¦ ¾ò¾î ¿Â´Ù. if(pos>mmin)// ÇöÀç ÀÔ·ÂµÈ ¶óÀμö º¸´Ù ÀÛÀ¸¸é { pos--;//ÇÑÁÙ °¨¼Ò ½Ã۰í m_pScroll[MRL_VSCR_WEEK]->SetScrollPosWZ(pos); } } } break; case DLGPOS_MRL_VSCR_MEMBER: { if(m_pScroll[MRL_VSCR_MEMBER]) { int pos = m_pScroll[MRL_VSCR_MEMBER]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù. int mmin = 0 , mmax = 0; m_pScroll[MRL_VSCR_MEMBER]->GetScrollRangeWZ( &mmin, &mmax );//½ºÅ©·Ñ °ªÀÇ ÃÖ´ë ÃÖ¼Ò¸¦ ¾ò¾î ¿Â´Ù. if(pos>mmin)// ÇöÀç ÀÔ·ÂµÈ ¶óÀμö º¸´Ù ÀÛÀ¸¸é { pos--;//ÇÑÁÙ °¨¼Ò ½Ã۰í m_pScroll[MRL_VSCR_MEMBER]->SetScrollPosWZ(pos); } } } break; } } break; case RT_MSG_SB_LINEBOTTOM: //.¾Æ·§ÂÊ È­»ìÇ¥¸¦ ´­·¶´Ù { switch( getCtrlIDToPos( pMessage->dwCtrlID ) ) { case DLGPOS_MRL_VSCR_WEEK: { if(m_pScroll[MRL_VSCR_WEEK]) { int pos = m_pScroll[MRL_VSCR_WEEK]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù. int mmin = 0 , mmax = 0; m_pScroll[MRL_VSCR_WEEK]->GetScrollRangeWZ( &mmin, &mmax );//½ºÅ©·Ñ °ªÀÇ ÃÖ´ë ÃÖ¼Ò¸¦ ¾ò¾î ¿Â´Ù. if(posSetScrollPosWZ(pos); } } } break; case DLGPOS_MRL_VSCR_PREWEEK: { if(m_pScroll[MRL_VSCR_PREWEEK]) { int pos = m_pScroll[MRL_VSCR_PREWEEK]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù. int mmin = 0 , mmax = 0; m_pScroll[MRL_VSCR_PREWEEK]->GetScrollRangeWZ( &mmin, &mmax );//½ºÅ©·Ñ °ªÀÇ ÃÖ´ë ÃÖ¼Ò¸¦ ¾ò¾î ¿Â´Ù. if(posSetScrollPosWZ(pos); } } } break; case DLGPOS_MRL_VSCR_MEMBER: { if(m_pScroll[MRL_VSCR_MEMBER]) { int pos = m_pScroll[MRL_VSCR_MEMBER]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù. int mmin = 0 , mmax = 0; m_pScroll[MRL_VSCR_MEMBER]->GetScrollRangeWZ( &mmin, &mmax );//½ºÅ©·Ñ °ªÀÇ ÃÖ´ë ÃÖ¼Ò¸¦ ¾ò¾î ¿Â´Ù. if(posSetScrollPosWZ(pos); } } } break; } } break; default: { SolarDialog::MessageProc( pMessage ); } break; } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::OnUpdateSolarDialog() { if(!m_bShow) { ShowInterface(FALSE); return; } if (!_isEnable()) return; int iCurScrollPos = 0; int iStartDrawIndex = 0; if( GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK ) { if( m_pWeekCheckButton->GetCheckState() ) { if( m_pListControl[MRL_LST_WEEK] && m_pScroll[MRL_VSCR_WEEK] ) { iCurScrollPos = m_pScroll[MRL_VSCR_WEEK]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù iStartDrawIndex = iCurScrollPos; _UpdateMouseWheel(MRL_LST_WEEK); m_pListControl[MRL_LST_WEEK]->SetBeginDrawIndex( iStartDrawIndex ); } } else { if(m_pListControl[MRL_LST_PREWEEK] && m_pScroll[MRL_VSCR_WEEK]) { iCurScrollPos = m_pScroll[MRL_VSCR_WEEK]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù iStartDrawIndex = iCurScrollPos; _UpdateMouseWheel(MRL_LST_PREWEEK); m_pListControl[MRL_LST_PREWEEK]->SetBeginDrawIndex( iStartDrawIndex ); } } } else { if(m_pListControl[MRL_LST_WEEK] && m_pScroll[MRL_VSCR_WEEK]) { iCurScrollPos = m_pScroll[MRL_VSCR_WEEK]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù iStartDrawIndex = iCurScrollPos; _UpdateMouseWheel(MRL_LST_WEEK); m_pListControl[MRL_LST_WEEK]->SetBeginDrawIndex( iStartDrawIndex ); } // Áö³­ÁÖ ÁÖ°£ ¼øÀ§ if(m_pListControl[MRL_LST_PREWEEK] && m_pScroll[MRL_VSCR_PREWEEK]) { iCurScrollPos = m_pScroll[MRL_VSCR_PREWEEK]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù iStartDrawIndex = iCurScrollPos; _UpdateMouseWheel(MRL_LST_PREWEEK); m_pListControl[MRL_LST_PREWEEK]->SetBeginDrawIndex( iStartDrawIndex ); } } // ±¸¼º¿ø Á¤º¸ if(m_pListControl[MRL_LST_MEMBER] && m_pScroll[MRL_VSCR_MEMBER]) { iCurScrollPos = m_pScroll[MRL_VSCR_MEMBER]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù iStartDrawIndex = iCurScrollPos; _UpdateMouseWheel(MRL_LST_MEMBER); m_pListControl[MRL_LST_MEMBER]->SetBeginDrawIndex( iStartDrawIndex ); } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::SetAreaList() { if (!GetManager()) return; if(m_pListControl[MRL_LST_AREA]) { m_pListControl[MRL_LST_AREA]->DeleteItemAll(); m_pListControl[MRL_LST_AREA]->SetColorSelBar(c_ListSelBarColor); m_pListControl[MRL_LST_AREA]->SetUseReport(false); int index = -1; TCHAR szTemp[INTERFACE_STRING_LENGTH] = {0,}; if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK) //¹Ì¼Ç·©Å· { MISSION_GROUP_ITR itr = GetManager()->m_MapMissionGroup.begin(); for ( ; itr != GetManager()->m_MapMissionGroup.end(); ++itr) { MapGroup * pMapGroup = (MapGroup *)itr->second; if ( !pMapGroup ) { continue; } sMAPINFO * pMapInfo = GlobalFunc::GetMainMapFromGroup( (MAPCODE)itr->first ); if (pMapInfo) { index = m_pListControl[MRL_LST_AREA]->InsertItemBack(); ZeroMemory(szTemp, sizeof(szTemp)); g_InterfaceManager.GetInterfaceString( pMapInfo->dwANCode, szTemp, INTERFACE_STRING_LENGTH ); GlobalFunc::SetItem( m_pListControl[MRL_LST_AREA], index, 0, szTemp, c_iListFont, #ifdef _INTERNATIONAL_UI DT_BOTTOM | DT_CENTER, #else DT_VCENTER | DT_CENTER, #endif//_INTERNATIONAL_UI c_ListBKColor, c_ListTextColor, c_ListSelTextColor); m_pListControl[MRL_LST_AREA]->SetItemData(index, (VOID*)(pMapGroup)); } } } else if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_POINT) //Æ÷ÀÎÆ®·©Å· { std::vector vecCategory = GetManager()->GetEventMapCategory(); for(unsigned int i=0; iInsertItemBack(); ZeroMemory(szTemp, sizeof(szTemp)); g_InterfaceManager.GetInterfaceString( vecCategory[i].dwCategory, szTemp, INTERFACE_STRING_LENGTH ); GlobalFunc::SetItem( m_pListControl[MRL_LST_AREA], index, 0, szTemp, c_iListFont, DT_VCENTER | DT_CENTER, c_ListBKColor, c_ListTextColor, c_ListSelTextColor); m_pListControl[MRL_LST_AREA]->SetItemData(index, NULL); } } m_iCurMainListIndex = 0; m_iCurEventMainListIndex = 0; SetMissionList(); } } //------------------------------------------------------------------------------ /** ¸¶¿ì½º ÈÙó¸® */ void uiMissionRankList::_UpdateMouseWheel(eMRL_LST eListType) { RECT rc = m_pListControl[eListType]->GetSizeRect(); eMRL_VSCR eScrollType=MRL_VSCR_WEEK; switch(eListType) { case MRL_LST_PREWEEK:eScrollType=MRL_VSCR_PREWEEK; break; case MRL_LST_MEMBER: eScrollType=MRL_VSCR_MEMBER; break; } switch (GetMouseWheelStatus(&rc)) { case MOUSE_WHEEL_UP: _DecreaseScroll(eScrollType); break; case MOUSE_WHEEL_DOWN:_IncreaseScroll(eScrollType); break; } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::_IncreaseScroll(eMRL_VSCR eScrollType) { if(m_pScroll[eScrollType]) { int pos = m_pScroll[eScrollType]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù. int mmin = 0 , mmax = 0; m_pScroll[eScrollType]->GetScrollRangeWZ( &mmin, &mmax );//½ºÅ©·Ñ °ªÀÇ ÃÖ´ë ÃÖ¼Ò¸¦ ¾ò¾î ¿Â´Ù. if(posSetScrollPosWZ(pos); } } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::_DecreaseScroll(eMRL_VSCR eScrollType) { if(m_pScroll[eScrollType]) { int pos = m_pScroll[eScrollType]->GetScrollPosWZ();//ÇöÀç ½ºÅ©·Ñ °ªÀ» ¹Þ¾Æ ¿Â´Ù. int mmin = 0 , mmax = 0; m_pScroll[eScrollType]->GetScrollRangeWZ( &mmin, &mmax );//½ºÅ©·Ñ °ªÀÇ ÃÖ´ë ÃÖ¼Ò¸¦ ¾ò¾î ¿Â´Ù. if(pos>mmin)// ÇöÀç ÀÔ·ÂµÈ ¶óÀμö º¸´Ù ÀÛÀ¸¸é { pos--;//ÇÑÁÙ °¨¼Ò ½Ã۰í m_pScroll[eScrollType]->SetScrollPosWZ(pos); } } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::SetMissionList() { if (!GetManager()) return; // ¼±ÅÃµÈ Áö¿ª¿¡ ÇØ´çÇÏ´Â ¹Ì¼Ç ¸®½ºÆ®¸¦ Ãâ·ÂÇÑ´Ù. ¸ÞÀÎ/¼­ºê ¸ðµÎ if(m_pListControl[MRL_LST_MISSION]) { m_pListControl[MRL_LST_MISSION]->DeleteItemAll(); m_pListControl[MRL_LST_MISSION]->SetColorSelBar(c_ListSelBarColor); m_pListControl[MRL_LST_MISSION]->SetUseReport(false); int index = -1; if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK) //¹Ì¼Ç·©Å· { if(m_iCurMainListIndex < 0) return; MapGroup * pMapGroup = (MapGroup *)m_pListControl[MRL_LST_AREA]->GetItemData(m_iCurMainListIndex); if (pMapGroup) { sMAPINFO_HASH & mapHash = pMapGroup->GetMapInfoHash(); sMAPINFO_HASH::const_iterator itr = mapHash.begin(); sMAPINFO * pMapInfo = NULL; TCHAR szTemp[INTERFACE_STRING_LENGTH] = {0,}; std::vector< sMAPINFO* > vMapGroupSort; while ( itr != mapHash.end()) { pMapInfo = itr->second; itr++; //GS_BUG_FIX: first º¤ÅÍ¿¡ ¹Ì¼ÇÁ¤º¸ »ðÀÔ if(pMapInfo) vMapGroupSort.push_back(pMapInfo); } static MapListSort_Funter sFunter; //GS_BUG_FIX: second ÇÔ¼ö°´Ã¼¸¦ ÀÌ¿ëÇØ¼­ Mtype³»¸²Â÷¼øÀ¸·Î Á¤·Ä if(!vMapGroupSort.empty()) sort(vMapGroupSort.begin(),vMapGroupSort.end(),sFunter); for(unsigned int i=0;iFindMapInfo(vMapGroupSort[i]->MapCode); if(mapInfo) { if(GetManager()->IsMissionRanking(mapInfo->MapCode, eRANKING_TYPE_TIME_ATTACK)) { index = m_pListControl[MRL_LST_MISSION]->InsertItemBack(); ZeroMemory(szTemp, sizeof(szTemp)); g_InterfaceManager.GetInterfaceString( mapInfo->dwNCode, szTemp, INTERFACE_STRING_LENGTH ); GlobalFunc::SetItem( m_pListControl[MRL_LST_MISSION], index, 0, szTemp, c_iListFont, #ifdef _INTERNATIONAL_UI DT_BOTTOM | DT_CENTER, #else DT_VCENTER | DT_CENTER, #endif//_INTERNATIONAL_UI c_ListBKColor, c_ListTextColor, c_ListSelTextColor); m_pListControl[MRL_LST_MISSION]->SetItemData(index,(void*)mapInfo); } } } } } else if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_POINT) //Æ÷ÀÎÆ®·©Å· { if(m_iCurEventMainListIndex < 0) return; // À̺¥Æ® ¸Êµµ ·©Å·Á¤º¸¸¦ º¼ ¼ö ÀÖ¾î¾ß ÇÔ std::vector vecCategory = GetManager()->GetEventMapCategory(); for(unsigned int i=0; iGetEventMap(); EVENTMAP_ITER it; std::pair range; range = mapEventMap.equal_range(vecCategory[i].dwCategory); for(it=range.first; it!=range.second; ++it) { sMAPINFO* pMap = (*it).second; if(pMap) { // MissionRankingLVArea.txt ½ºÅ©¸³Æ®¿¡ ¾øÀ¸¸é ¹Ì¼Ç·©Å· ´ë»óÀÌ ¾Æ´Ï´Ù if(GetManager()->IsMissionRanking(pMap->MapCode, eRANKING_TYPE_POINT)) { index = m_pListControl[MRL_LST_MISSION]->InsertItemBack(); ZeroMemory(szTemp, sizeof(szTemp)); g_InterfaceManager.GetInterfaceString( pMap->dwNCode, szTemp, INTERFACE_STRING_LENGTH ); GlobalFunc::SetItem( m_pListControl[MRL_LST_MISSION], index, 0, szTemp, c_iListFont, #ifdef _INTERNATIONAL_UI DT_BOTTOM | DT_CENTER, #else DT_VCENTER | DT_CENTER, #endif//_INTERNATIONAL_U c_ListBKColor, c_ListTextColor, c_ListSelTextColor); m_pListControl[MRL_LST_MISSION]->SetItemData(index, (VOID*)pMap); } } } break; } } } m_iCurSubListIndex = 0; m_iCurEventSubListIndex = 0; } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::UpdateMissionText(bool bPrepare) { if (!_isEnable()) return; int iCurSubIndex = 0; if(m_pTxtControl[MRL_TXT_AREA]) { if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK) //¹Ì¼Ç·©Å· { iCurSubIndex = m_iCurSubListIndex; MapGroup * pMapGroup = (MapGroup *)m_pListControl[MRL_LST_AREA]->GetItemData(m_iCurMainListIndex); if (pMapGroup) { sMAPINFO * pMapInfo = NULL; size_t MapGroupCnt = pMapGroup->GetMapInfoHash().size(); if ( 0 == MapGroupCnt ) { return; } for ( size_t i = 0; i < MAX_SUB_MISSION_COUNT; ++i ) { pMapInfo = pMapGroup->GetMapInfoIndex(i); if ( pMapInfo ) break; } if (!pMapInfo) { // ¸ÞÀÎ¹Ì¼Ç È®ÀÎ. pMapInfo = pMapGroup->GetMapInfoIndex(0); } if ( pMapInfo ) { TCHAR szText[INTERFACE_STRING_LENGTH] ={0,}; g_InterfaceManager.GetInterfaceString( pMapInfo->dwANCode, szText, INTERFACE_STRING_LENGTH); GlobalFunc::SetCaption( m_pTxtControl[MRL_TXT_AREA], szText); } } } else if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_POINT) //Æ÷ÀÎÆ®·©Å· { // À̺¥Æ® ¸Êµµ ·©Å·Á¤º¸¸¦ º¼ ¼ö ÀÖ¾î¾ß ÇÔ iCurSubIndex = m_iCurEventSubListIndex; GlobalFunc::SetCaption( m_pTxtControl[MRL_TXT_AREA], _T("") ); std::vector vecEventMapCategory = GetManager()->GetEventMapCategory(); for(unsigned int i=0; i < vecEventMapCategory.size(); ++i) { if(vecEventMapCategory[i].iGroup == m_iCurEventMainListIndex) { DWORD dwAKCode = 0; dwAKCode = vecEventMapCategory[i].dwCategory; TCHAR szText[INTERFACE_STRING_LENGTH] ={0,}; g_InterfaceManager.GetInterfaceString( dwAKCode, szText, INTERFACE_STRING_LENGTH); GlobalFunc::SetCaption( m_pTxtControl[MRL_TXT_AREA], szText); break; } } } } if(m_pTxtControl[MRL_TXT_MISSION]) { const sMAPINFO * pMapInfo = (sMAPINFO *)m_pListControl[MRL_LST_MISSION]->GetItemData(iCurSubIndex); if ( pMapInfo ) { m_MissionNo = pMapInfo->MapCode; TCHAR szText[INTERFACE_STRING_LENGTH] ={0,}; g_InterfaceManager.GetInterfaceString( pMapInfo->dwNCode, szText, INTERFACE_STRING_LENGTH); GlobalFunc::SetCaption( m_pTxtControl[MRL_TXT_MISSION], szText); GetManager()->UpdateReceiveData(m_MissionNo, 0); } else { GlobalFunc::SetCaption( m_pTxtControl[MRL_TXT_MISSION], _T("") ); } } UpdatePageText(); } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::UpdateRankList() { if (!_isEnable()) return; _initRankList(); bool bPointRanking = false; if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_POINT) // Æ÷ÀÎÆ® ·©Å· { bPointRanking = true; } else if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK) // ¹Ì¼Ç·©Å· { } else { return; } // ¸í¿¹ÀÇ Àü´ç if(m_pListControl[MRL_LST_FAME]) { int index = 0; int iCnt = 0; if(GetManager()->m_FameData.iRank > 0) // µ¥ÀÌÅͰ¡ ÀÖÀ¸¸é ¸®½ºÆ®¿¡ Ãß°¡ { index = m_pListControl[MRL_LST_FAME]->InsertItemBack(); m_pListControl[MRL_LST_FAME]->SetItemData(index, &(GetManager()->m_FameData)); TCHAR szTemp[INTERFACE_STRING_LENGTH] = {0,}; DWORD dwStyle = 0; for(iCnt=0; iCntm_FameData.strName.c_str()); Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10s"), GetManager()->m_FameData.strName); } else { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10d"), GetManager()->m_FameData.iPartyNum); } dwStyle = DT_VCENTER | DT_CENTER; } else if(eFAME_LST_LEVEL == iCnt) // ·¹º§ { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-6d"), GetManager()->m_FameData.iLevel); dwStyle = DT_VCENTER | DT_CENTER; } else if(eFAME_LST_TIME == iCnt) // ÁøÇà½Ã°£ or Æ÷ÀÎÆ® { if(bPointRanking) { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10d"), GetManager()->m_FameData.dwTime); } else { util::_tstring strTime; GetManager()->GetTimeString(GetManager()->m_FameData.dwTime, strTime); Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10s"), strTime.c_str()); } dwStyle = DT_VCENTER | DT_CENTER; } GlobalFunc::SetItem(m_pListControl[MRL_LST_FAME], index, iCnt, szTemp, StrToWzID("m212"), dwStyle, c_ListBKColor, c_ListTextColor, c_ListSelTextColor); } } } // À̹øÁÖ ÁÖ°£ ¼øÀ§ if(m_pListControl[MRL_LST_WEEK]) { int index = 0; int iCnt = 0; DWORD dwStyle = 0; for(int i=0; im_CurWeekRank[i].iRank > 0) // µ¥ÀÌÅͰ¡ ÀÖÀ¸¸é ¸®½ºÆ®¿¡ Ãß°¡ { index = m_pListControl[MRL_LST_WEEK]->InsertItemBack(); m_pListControl[MRL_LST_WEEK]->SetItemData(index, &(GetManager()->m_CurWeekRank[i])); TCHAR szTemp[INTERFACE_STRING_LENGTH] = {0,}; for(iCnt=0; iCntm_CurWeekRank[i].iRank); dwStyle = DT_VCENTER | DT_CENTER; } else if(eWEEK_LST_PARTY_NUM == iCnt) // ÆÄƼ¹øÈ£ or ij¸¯¸í { if(bPointRanking) { //Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10s"), GetManager()->m_CurWeekRank[i].strName.c_str()); Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10s"), GetManager()->m_CurWeekRank[i].strName); } else { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10d"), GetManager()->m_CurWeekRank[i].iPartyNum); } dwStyle = DT_VCENTER | DT_CENTER; } else if(eWEEK_LST_LEVEL == iCnt) // ·¹º§ { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-6d"), GetManager()->m_CurWeekRank[i].iLevel); dwStyle = DT_VCENTER | DT_CENTER; } else if(eWEEK_LST_TIME == iCnt) // ÁøÇà½Ã°£ or Æ÷ÀÎÆ® { if(bPointRanking) { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10d"), GetManager()->m_CurWeekRank[i].dwTime); } else { util::_tstring strTime; GetManager()->GetTimeString(GetManager()->m_CurWeekRank[i].dwTime, strTime); Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10s"), strTime.c_str()); } dwStyle = DT_VCENTER | DT_CENTER; } GlobalFunc::SetItem(m_pListControl[MRL_LST_WEEK], index, iCnt, szTemp, StrToWzID("m212"), dwStyle, c_ListBKColor, c_ListTextColor, c_ListSelTextColor); } } } int iPage = 0; if(index) { if(index >= c_iDefaultRankLine) iPage = (index+1)-c_iDefaultRankLine; } if(m_pScroll[MRL_VSCR_WEEK]) { m_pScroll[MRL_VSCR_WEEK]->SetScrollRangeWZ(0,iPage); //½ºÅ©·Ñ ¹üÀ§ } } // Áö³­ÁÖ ÁÖ°£ ¼øÀ§ if(m_pListControl[MRL_LST_PREWEEK]) { int index = 0; int iCnt = 0; DWORD dwStyle = 0; for(int i=0; im_PreWeekRank[i].iRank > 0) // µ¥ÀÌÅͰ¡ ÀÖÀ¸¸é ¸®½ºÆ®¿¡ Ãß°¡ { index = m_pListControl[MRL_LST_PREWEEK]->InsertItemBack(); m_pListControl[MRL_LST_PREWEEK]->SetItemData(index, &(GetManager()->m_PreWeekRank[i])); TCHAR szTemp[INTERFACE_STRING_LENGTH] = {0,}; for(iCnt=0; iCntm_PreWeekRank[i].iRank); dwStyle = DT_VCENTER | DT_CENTER; } else if(eWEEK_LST_PARTY_NUM == iCnt) // ÆÄƼ¹øÈ£ or ij¸¯¸í { if(bPointRanking) { //Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10s"), GetManager()->m_PreWeekRank[i].strName.c_str()); Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10s"), GetManager()->m_PreWeekRank[i].strName); } else { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10d"), GetManager()->m_PreWeekRank[i].iPartyNum); } dwStyle = DT_VCENTER | DT_CENTER; } else if(eWEEK_LST_LEVEL == iCnt) // ·¹º§ { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-6d"), GetManager()->m_PreWeekRank[i].iLevel); dwStyle = DT_VCENTER | DT_CENTER; } else if(eWEEK_LST_TIME == iCnt) // ÁøÇà½Ã°£ or Æ÷ÀÎÆ® { if(bPointRanking) { Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10d"), GetManager()->m_PreWeekRank[i].dwTime); } else { util::_tstring strTime; GetManager()->GetTimeString(GetManager()->m_PreWeekRank[i].dwTime, strTime); Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%-10s"), strTime.c_str()); } dwStyle = DT_VCENTER | DT_CENTER; } GlobalFunc::SetItem(m_pListControl[MRL_LST_PREWEEK], index, iCnt, szTemp, StrToWzID("m212"), dwStyle, c_ListBKColor, c_ListTextColor, c_ListSelTextColor); } } } int iPage = 0; if(index) { if(index >= c_iDefaultRankLine) { iPage = (index+1)-c_iDefaultRankLine; } } if(m_pScroll[MRL_VSCR_PREWEEK]) { m_pScroll[MRL_VSCR_PREWEEK]->SetScrollRangeWZ(0,iPage); //½ºÅ©·Ñ ¹üÀ§ } } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::UpdateMissionSelectList() { if (!_isEnable()) return; if(m_pListControl[MRL_LST_AREA]) { m_pListControl[MRL_LST_AREA]->SetCurSel(-1); if(m_bShowMainList) { m_pListControl[MRL_LST_AREA]->ShowWindowWZ(WZ_SHOW); } else { m_pListControl[MRL_LST_AREA]->ShowWindowWZ(WZ_HIDE); } } if(m_pListControl[MRL_LST_MISSION]) { m_pListControl[MRL_LST_MISSION]->SetCurSel(-1); if(m_bShowSubList) { m_pListControl[MRL_LST_MISSION]->ShowWindowWZ(WZ_SHOW); } else { m_pListControl[MRL_LST_MISSION]->ShowWindowWZ(WZ_HIDE); } } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::UpdatePageText() { if (!_isEnable()) return; if(m_pTxtControl[MRL_TXT_PAGE]) { TCHAR szMessage[INTERFACE_STRING_LENGTH] ={0,}; int iPage1 = (GetManager()->m_CurRankPage * MAX_WEEK_RANK) + 1; int iPage2 = (GetManager()->m_CurRankPage * MAX_WEEK_RANK) + MAX_WEEK_RANK; #ifdef _JAPAN Snprintf(szMessage, INTERFACE_STRING_LENGTH-1, _T("%d - %d"), iPage1, iPage2); #else Snprintf(szMessage, INTERFACE_STRING_LENGTH-1, _T("%d ~ %d"), iPage1, iPage2); #endif GlobalFunc::SetCaption( m_pTxtControl[MRL_TXT_PAGE], szMessage); } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::UpdateMemberList() { if (!_isEnable()) return; // ±¸¼º¿ø Á¤º¸ if(m_pListControl[MRL_LST_MEMBER]) { int index = 0; int iCnt = 0; _initMemberList(); CControlWZ * pGuildLevel = getControl( DLGPOS_MRL_STATIC_GUILD_LEVEL ); CControlWZ * pGuild = getControl( DLGPOS_MRL_STATIC_GUILD ); CControlWZ * pName = getControl( DLGPOS_MRL_STATIC_NAME ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_MEMBER], 0, pGuildLevel->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_MEMBER], 1, pGuild->GetSize().right, NULL ); GlobalFunc::SetReportButtonInfo( m_pListControl[MRL_LST_MEMBER], 2, pName->GetSize().right, NULL ); for(int i=0; im_MemberData[i].iLevel > 0) { index = m_pListControl[MRL_LST_MEMBER]->InsertItemBack(); m_pListControl[MRL_LST_MEMBER]->SetItemData(index, &(GetManager()->m_MemberData[i])); TCHAR szTemp[INTERFACE_STRING_LENGTH] = {0,}; for(iCnt=0; iCntm_MemberData[i].iLevel); } else if(eMEMBER_LST_GUILD == iCnt) // ±æµå { //Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%s"), GetManager()->m_MemberData[i].strGuild.c_str()); Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%s"), GetManager()->m_MemberData[i].strGuild); } else if(eMEMBER_LST_NAME == iCnt) // À̸§ { //Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%s"), GetManager()->m_MemberData[i].strName.c_str()); Snprintf(szTemp, INTERFACE_STRING_LENGTH-1, _T("%s"), GetManager()->m_MemberData[i].strName); } GlobalFunc::SetItem(m_pListControl[MRL_LST_MEMBER], index, iCnt, szTemp, StrToWzID("m212"), DT_VCENTER | DT_CENTER, c_ListBKColor, c_ListTextColor, c_ListSelTextColor); } } } m_pListControl[MRL_LST_MEMBER]->SetCurSel(-1); int iPage = 0; if(index) { if(index >=c_iDefaultMemberLine) { iPage = (index+1)-c_iDefaultMemberLine; } } if(m_pScroll[MRL_VSCR_MEMBER]) { m_pScroll[MRL_VSCR_MEMBER]->SetScrollRangeWZ(0,iPage); //½ºÅ©·Ñ ¹üÀ§ m_pScroll[MRL_VSCR_MEMBER]->SetScrollPosWZ(0); } } } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::UpdateFinishDay() { if (!_isEnable()) return; TCHAR szTemp[INTERFACE_STRING_LENGTH] = {0,}; TCHAR szMessage[INTERFACE_STRING_LENGTH] = {0,}; //9952 °á»êÀÏ: %s g_InterfaceManager.GetInterfaceString( 9952, szTemp, INTERFACE_STRING_LENGTH ); Snprintf(szMessage, INTERFACE_STRING_LENGTH-1, szTemp, GetManager()->m_strFinishDay.c_str()); GlobalFunc::SetCaption( m_pTxtControl[MRL_TXT_DATE], szMessage ); } //------------------------------------------------------------------------------ /** */ void uiMissionRankList::_setTitle() { if(GetManager()) { TCHAR szMessage[INTERFACE_STRING_LENGTH] = {0,}; if(GetManager()->GetRankingSystemType() == eRANKING_TYPE_TIME_ATTACK) // ¹Ì¼Ç·©Å· { // ¹Ì¼Ç·©Å· g_InterfaceManager.GetInterfaceString( 5492, szMessage, INTERFACE_STRING_LENGTH ); GlobalFunc::SetCaption( m_pTxtTitle, szMessage ); //ÆÄƼ¹øÈ£ g_InterfaceManager.GetInterfaceString( 9956, szMessage, INTERFACE_STRING_LENGTH ); int i; for(i=0; i <= MRL_LST_BTN_NAME3; ++i) { if(m_pLstBtns[i]) { GlobalFunc::SetCaption( m_pLstBtns[i], szMessage ); } } //ÁøÇà½Ã°£ g_InterfaceManager.GetInterfaceString( 9957, szMessage, INTERFACE_STRING_LENGTH ); for(i=MRL_LST_BTN_POINT1; i <= MRL_LST_BTN_POINT3; ++i) { if(m_pLstBtns[i]) { GlobalFunc::SetCaption( m_pLstBtns[i], szMessage ); } } } else // Æ÷ÀÎÆ® ·©Å· { // Æ÷ÀÎÆ® ·©Å· g_InterfaceManager.GetInterfaceString( 1465, szMessage, INTERFACE_STRING_LENGTH ); GlobalFunc::SetCaption( m_pTxtTitle, szMessage ); //ij¸¯Å͸í g_InterfaceManager.GetInterfaceString( 9702, szMessage, INTERFACE_STRING_LENGTH ); int i; for(i=0; i <= MRL_LST_BTN_NAME3; ++i) { if(m_pLstBtns[i]) { GlobalFunc::SetCaption( m_pLstBtns[i], szMessage ); } } //Æ÷ÀÎÆ®Á¡¼ö g_InterfaceManager.GetInterfaceString( 1461, szMessage, INTERFACE_STRING_LENGTH ); for(i=MRL_LST_BTN_POINT1; i <= MRL_LST_BTN_POINT3; ++i) { if(m_pLstBtns[i]) { GlobalFunc::SetCaption( m_pLstBtns[i], szMessage ); } } } } } #endif // _NA_006802_20130704_REORGANIZATION_RANK_SYSTEM