105 lines
2.8 KiB
C++
105 lines
2.8 KiB
C++
|
|
#ifndef _SUIArenaGuideTooltipWnd_h_
|
|
#define _SUIArenaGuideTooltipWnd_h_
|
|
|
|
#include "SGameMessage.h"
|
|
//#include "SUIWnd.h"
|
|
//#include "SUIUtil.h"
|
|
|
|
/*
|
|
2012.04.26 유도 툴팁 - prodongi
|
|
베틀 아레나에서만 쓰이고, 이후에는 안 쓰인다.!!!!!!!
|
|
이거는 순전히 케이스 바이 케이스로 경우별로 모두 코딩을 해줘야 되고,
|
|
버그가 일어날 가능성도 많다.
|
|
아레나는 ui팀의 요청으로 하지만, 이후에는 못한다고 얘기가 되어 있다!!!!!!!!!!
|
|
혹시라도 나중에 ui팀에서 다시 얘기를 꺼낸다면 못하기로 했다는 내용을 상기시켜 주다
|
|
*/
|
|
class SUIArenaGuideTooltipWnd : public SUIWnd
|
|
{
|
|
public:
|
|
enum GUIDE { GUIDE_NONE = -1,
|
|
GUIDE_A, /// left arrow
|
|
GUIDE_B, /// right arrow
|
|
GUIDE_C, /// diagonal arrow
|
|
MAX_GUIDE_NUM
|
|
};
|
|
|
|
public:
|
|
SUIArenaGuideTooltipWnd(SGameManager* pGameManager);
|
|
virtual ~SUIArenaGuideTooltipWnd() {}
|
|
|
|
virtual void Process(DWORD dwTime);
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual void ProcMsgAtStatic( SGameMessage* msg );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
|
|
void procCheckGuideType();
|
|
|
|
private:
|
|
struct sGuide
|
|
{
|
|
sGuide() : m_wnd(NULL) {}
|
|
int m_wndId;
|
|
SUIWnd* m_wnd;
|
|
|
|
int m_stringId;
|
|
KPoint m_offset;
|
|
};
|
|
struct sArrowControl
|
|
{
|
|
void set(SUIWnd* parent, char const* id)
|
|
{
|
|
m_control = parent->GetChild(id);
|
|
m_oriOffset.x = m_control->GetRect().left - parent->GetRect().left;
|
|
m_oriOffset.y = m_control->GetRect().top - parent->GetRect().top;
|
|
}
|
|
void setShow(bool show)
|
|
{
|
|
m_control->SetShow(show);
|
|
}
|
|
KUIWnd* m_control;
|
|
KPoint m_oriOffset;
|
|
};
|
|
|
|
private:
|
|
void initFp();
|
|
void getWndInfo();
|
|
void initGuideType();
|
|
/// 유도 툴팁 위치와 타겟창과의 위치를 맞춘다
|
|
void syncTargetPos();
|
|
void postShowMsg(bool show);
|
|
/// 텍스트의 크기에 따라서 윈도우의 크기를 변화 시킨다
|
|
void resizeWndAtText();
|
|
void procType();
|
|
void calcArrowRelativelyPos(int targetX, int targetY, int& x, int& y);
|
|
/// guide 컨트롤들이 로드 되어 있는지 체크한다, SUIArenaGuideTooltipWnd가 생성될 때는 해당 컨트롤이 없을 수도 있기 때문에 체크를 해야 된다.
|
|
void checkValidWnd(int guideType);
|
|
bool checkGuideTypeA();
|
|
bool checkGuideTypeB();
|
|
bool checkGuideTypeC();
|
|
void setGuideType(int guideType);
|
|
|
|
void procMsgBattleInfo(SGameMessage* msg);
|
|
|
|
private:
|
|
struct sScreenChecker
|
|
{
|
|
sScreenChecker() : m_incAlpha(true) {}
|
|
void process(float elapsedtime, SUIWnd* parent);
|
|
|
|
bool m_incAlpha;
|
|
};
|
|
|
|
DWORD m_time;
|
|
int m_guideType;
|
|
int m_oriTextControlHeight; /// m_textControl의 원래 높이
|
|
KUIWnd* m_textControl;
|
|
sArrowControl m_arrowControl[MAX_GUIDE_NUM];
|
|
sGuide m_guide[MAX_GUIDE_NUM];
|
|
sScreenChecker m_screenChecker;
|
|
|
|
cClassParamFuncP<SUIArenaGuideTooltipWnd, SGameMessage*, int> m_msgFp;
|
|
};
|
|
|
|
#endif
|