87 lines
2.0 KiB
C++
87 lines
2.0 KiB
C++
|
|
/// 2011.10.12 - prodongi
|
|
|
|
#include "stdafx.h"
|
|
#include "SUIRaidSiegeResultRaidWnd.h"
|
|
#include "SGameManager.h"
|
|
#include "SGameOption.h"
|
|
#include <toolkit/XStringUtil.h>
|
|
#include "KUIControlStatic.h"
|
|
#include "SStringDB.h"
|
|
|
|
SUIRaidSiegeResultRaidWnd::SUIRaidSiegeResultRaidWnd(SGameManager* pGameManager) : SUIRaidSiegeResultBaseWnd(pGameManager)
|
|
{
|
|
}
|
|
|
|
SUIRaidSiegeResultRaidWnd::~SUIRaidSiegeResultRaidWnd()
|
|
{
|
|
}
|
|
|
|
void SUIRaidSiegeResultRaidWnd::PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam )
|
|
{
|
|
SUIWnd::PumpUpMessage(lpszControlID, nMessage, lparam, wparam);
|
|
}
|
|
|
|
void SUIRaidSiegeResultRaidWnd::ProcMsgAtStatic( SGameMessage* pMsg )
|
|
{
|
|
}
|
|
|
|
void SUIRaidSiegeResultRaidWnd::OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd )
|
|
{
|
|
}
|
|
|
|
bool SUIRaidSiegeResultRaidWnd::InitControls( KPoint kPos )
|
|
{
|
|
KUIControlStatic* textHelp = dynamicCast<KUIControlStatic*>(GetChild("raid_text_help_01"));
|
|
if (textHelp)
|
|
{
|
|
std::string str;
|
|
XStringUtil::Format(str, "<font:font_02><size:12><hcenter><#b7b7b7>%s", S(12023));
|
|
textHelp->SetCaption(str.c_str());
|
|
}
|
|
|
|
return true;
|
|
}
|
|
|
|
void SUIRaidSiegeResultRaidWnd::setResult(char const* result, int h, int m, int s)
|
|
{
|
|
bool success;
|
|
if (::_stricmp(result, "SUCC") == 0)
|
|
{
|
|
success = true;
|
|
}
|
|
else
|
|
{
|
|
success = false;
|
|
}
|
|
|
|
// complete
|
|
std::string strTemp;
|
|
if (success)
|
|
{
|
|
strTemp = S(12021);
|
|
}
|
|
else
|
|
{
|
|
strTemp = S(12022);
|
|
}
|
|
KUIControlStatic* staticComplete = dynamicCast<KUIControlStatic*>(GetChild("raid_text_complete_01"));
|
|
if (staticComplete)
|
|
staticComplete->SetCaption(strTemp.c_str());
|
|
|
|
// time
|
|
KUIControlStatic* staticTime = dynamicCast<KUIControlStatic*>(GetChild("raid_text_time_01"));
|
|
if (staticTime)
|
|
{
|
|
if (success)
|
|
{
|
|
staticTime->SetShow(true);
|
|
XStringUtil::Format(strTemp, "<font:font_01><size:22><hcenter><#ffffff>%s <#ba1414>'%02d:%02d:%02d", S(12020), h, m, s);
|
|
staticTime->SetCaption(strTemp.c_str());
|
|
}
|
|
else
|
|
{
|
|
staticTime->SetShow(false);
|
|
}
|
|
}
|
|
} |