127 lines
3.8 KiB
C++
127 lines
3.8 KiB
C++
|
|
#ifndef _SUIArenaGameWnd_h_
|
|
#define _SUIArenaGameWnd_h_
|
|
|
|
#include "SGameMessage.h"
|
|
#include "ArenaUtility.h"
|
|
//#include "SUIWnd.h"
|
|
//#include "SUIUtil.h"
|
|
|
|
class KUIControlSimpleButton;
|
|
|
|
/*
|
|
*/
|
|
struct sOpacityInfo
|
|
{
|
|
public:
|
|
sOpacityInfo() : m_isOpacity(false), m_opacityButton(NULL), m_titleOpacity(NULL) {}
|
|
~sOpacityInfo() { m_hideList.clear(); }
|
|
void initialize(SUIWnd* parent);
|
|
bool checkIsInButton(int x, int y);
|
|
void toggleOpacity();
|
|
void setOpacity(bool opacity);
|
|
bool isOpacity() const { return m_isOpacity; }
|
|
|
|
private:
|
|
void setShowHideList(bool show);
|
|
void addHideControl(KUIWnd* wnd);
|
|
|
|
private:
|
|
KUIControlSimpleButton* m_opacityButton;
|
|
KUIControlSimpleButton* m_statusButton;
|
|
KUIControlSimpleButton* m_inviteButton;
|
|
KUIWnd* m_titleOpacity; /// 투명일 때 보이고, 불투명일 때 안 보여야 된다.
|
|
KUIWnd* m_timeOpacity;
|
|
bool m_isOpacity;
|
|
std::list<KUIWnd*> m_hideList;
|
|
};
|
|
/*
|
|
*/
|
|
class SUIArenaGameWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUIArenaGameWnd(SGameManager* pGameManager);
|
|
virtual ~SUIArenaGameWnd();
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool reload = false );
|
|
virtual void Process(DWORD dwTime);
|
|
virtual void ProcMsgAtStatic( SGameMessage* msg );
|
|
virtual void PumpUpMessage( LPCTSTR controlID, DWORD msg, DWORD lparam, DWORD wparam );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
|
|
|
|
protected:
|
|
void initFp();
|
|
virtual void setTooltip();
|
|
virtual void setTitle();
|
|
virtual void getWndInfo();
|
|
virtual void initOpacityInfo();
|
|
virtual void moveWnd();
|
|
|
|
void resetData();
|
|
void procRemainTime();
|
|
void syncPos();
|
|
void setRank();
|
|
void setMyKillCount(int count);
|
|
void setMyDeathCount(int count);
|
|
void setRemainTime(int second);
|
|
void updateMyTeam();
|
|
void postUpdateMainMenuButton();
|
|
void procCenterCount();
|
|
/// 서버에서 받은 시간값을 가지고 경기가 시작榮쩝嗤?체크해야 된다.
|
|
void checkGameStart();
|
|
/// 파티창에 팀 타입을 보내서 팀에 맞는 타이틀바 ANINAME과 이름을 설정한다
|
|
void setPartyTitleBarArenaInfo();
|
|
void getRemainTimeColorAndTooltip(int second, std::string& color, int& tooltipStringId);
|
|
void updateMemberCount();
|
|
void updateScore();
|
|
|
|
void setMyTeamMemberCount(int count);
|
|
void setMyTeamScore(int score);
|
|
void setMyTeamScoreGauge(int score);
|
|
|
|
void setOpponentTeamMemberCount(int count);
|
|
void setOpponentTeamScore(int score);
|
|
void setOpponentTeamScoreGauge(int score);
|
|
///
|
|
void toggleOpacity();
|
|
virtual void setOpacity(bool opacity);
|
|
void toggleResult();
|
|
virtual void inviteTeam() {}
|
|
virtual void setShow(bool /*show*/) = 0;
|
|
///
|
|
virtual void procMsgInviteTeam(SGameMessage* /*msg*/) {}
|
|
virtual void procMsgBattleInfo(SGameMessage* msg);
|
|
virtual void procMsgBattleStatus(SGameMessage* /*msg*/) {}
|
|
virtual void procMsgBattleScore(SGameMessage* msg);
|
|
virtual void procMsgJoinBattle(SGameMessage* msg);
|
|
virtual void procMsgReconnectBattle(SGameMessage* msg);
|
|
virtual void procMsgLeave(SGameMessage* msg);
|
|
virtual void procMsgPromote(SGameMessage* /*msg*/) {}
|
|
virtual void procMsgResult(SGameMessage* msg);
|
|
virtual void procMsgHotKeyEx(SGameMessage* msg);
|
|
virtual void procMsgLogin(SGameMessage* msg);
|
|
|
|
protected:
|
|
enum { MAX_GAUGE_SCORE = 100 };
|
|
|
|
int m_gameMode;
|
|
bool m_isPlaying;
|
|
int m_oldCount; /// 중앙 공지에 카운트를 출력해 줄 때 쓰인다.
|
|
bool m_isEnd; /// 경기가 끝났을 때 (경기 결과를 받았을 때)
|
|
sOpacityInfo m_opacityInfo;
|
|
cClassFuncP<SUIArenaGameWnd> m_controlFp;
|
|
cClassParamFuncP<SUIArenaGameWnd, SGameMessage*, int> m_msgFp;
|
|
KUIWnd* m_wndMyKillCount;
|
|
KUIWnd* m_wndMyDeathCount;
|
|
KUIWnd* m_wndMyTeamScore;
|
|
KUIWnd* m_wndOpponentTeamScore;
|
|
KUIControl* m_wndTime;
|
|
KUIWnd* m_wndMyTeamGaugeScoreNumber;
|
|
KUIWnd* m_wndOpponentTeamGaugeScoreNumber;
|
|
KUIControlGauge* m_gaugeMyTeamScore;
|
|
KUIControlGauge* m_gaugeOpponentTeamScore;
|
|
};
|
|
|
|
|
|
#endif |