58 lines
1.5 KiB
C++
58 lines
1.5 KiB
C++
|
|
#include "stdafx.h"
|
|
#include "SUIRaidSiegeRotationSiegeWnd.h"
|
|
#include "SUIRaidSiegeProgressSiegeWnd.h"
|
|
#include "SGameManager.h"
|
|
#include "KUIControlStatic.h"
|
|
#include "SStringDB.h"
|
|
|
|
SUIRaidSiegeRotationSiegeWnd::SUIRaidSiegeRotationSiegeWnd(SGameManager* pGameManager) : SUIWnd(pGameManager), m_end(false), m_time(0)
|
|
{
|
|
}
|
|
|
|
SUIRaidSiegeRotationSiegeWnd::~SUIRaidSiegeRotationSiegeWnd()
|
|
{
|
|
}
|
|
|
|
void SUIRaidSiegeRotationSiegeWnd::Process(DWORD dwTime)
|
|
{
|
|
if (m_end)
|
|
return ;
|
|
|
|
DWORD elapsedtime = 0;
|
|
if (m_time)
|
|
elapsedtime = dwTime - m_time;
|
|
m_time = dwTime;
|
|
|
|
float e = (float)elapsedtime/1000.0f;
|
|
if (!m_updateTime.update(e))
|
|
{
|
|
m_end = true;
|
|
}
|
|
}
|
|
|
|
void SUIRaidSiegeRotationSiegeWnd::setOwnerType(int newOwnerType)
|
|
{
|
|
m_updateTime.begin(40.0f, false);
|
|
|
|
KUIControlStatic* staticText1 = dynamicCast<KUIControlStatic*>(GetChild("seige_text_rotation_attackteam_01"));
|
|
KUIControlStatic* staticText2 = dynamicCast<KUIControlStatic*>(GetChild("seige_help_text_rotation_attackteam_01"));
|
|
|
|
std::string str1, str2;
|
|
/// 공격자로 바꼈을 때
|
|
if (SUIRaidSiegeProgressSiegeWnd::OFFENSE == newOwnerType)
|
|
{
|
|
XStringUtil::Format(str1, "<font:font_02><size:18><hcenter><#b61621>%s", S(9835));
|
|
XStringUtil::Format(str2, "<font:font_02><size:12><hcenter><#b7b7b7>%s", S(9836));
|
|
}
|
|
/// 방어자로 바겼을 때
|
|
else
|
|
{
|
|
XStringUtil::Format(str1, "<font:font_02><size:18><hcenter><#8dc63f>%s", S(9833));
|
|
XStringUtil::Format(str2, "<font:font_02><size:12><hcenter><#b7b7b7>%s", S(9834));
|
|
}
|
|
|
|
staticText1->SetCaption(str1.c_str());
|
|
staticText2->SetCaption(str2.c_str());
|
|
}
|