123 lines
3.5 KiB
C++
123 lines
3.5 KiB
C++
|
|
#ifndef _SUIMissionWnd_h_
|
|
#define _SUIMissionWnd_h_
|
|
|
|
//#include "SUIWnd.h"
|
|
|
|
class SGameManager;
|
|
class KUIControlSimpleButton;
|
|
|
|
/* 2011.11.30 미션 nui(기존의 오토 퀘스트 시스템이 사라지고 미션 시스템이 들어감 - prodongi
|
|
*/
|
|
class SUIMissionWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUIMissionWnd(SGameManager* pGameManager);
|
|
virtual ~SUIMissionWnd();
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool bReload = false );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
virtual void Process(DWORD dwTime);
|
|
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
|
|
|
|
protected:
|
|
void initBackup();
|
|
/// 미션 수행 타겟 개수에 따른 nui 수정
|
|
void setObjectCount(int objectCount);
|
|
/// 미션 수행 타겟 개수에 따른 타겟 컨트롤들 show/hide
|
|
void modifyObjectControls(int objectCount);
|
|
/// 미션 수행 타겟 개수에 따른 size 조정
|
|
void modifySize(int objectCount);
|
|
/// 타겟 라인 컨트롤을 show/hide
|
|
void showObjectLineControls(int objectNum, bool show);
|
|
////
|
|
void toggleTransparency();
|
|
void setTransparency(bool transparency);
|
|
/// proc functions
|
|
void procChatMsg(std::vector<std::string> const& strList);
|
|
/// 타이틀 캡션을 설정하고 지역명 표시
|
|
void setTitle(char const* titleStringId);
|
|
void setReward(char const* reward);
|
|
void setObject(int slotIndex, int maxProgress, char const* text);
|
|
void setProgress(int slotIndex, int curProgress);
|
|
void refresh();
|
|
/// 현재의 데이타들을 초기화 한다
|
|
void clearData();
|
|
|
|
protected:
|
|
enum { MAX_OBJECT_COUNT = 10, OBJECT_LINE_HEIGHT = 24 };
|
|
|
|
/// 투명화 되는 컨트롤들
|
|
struct sTransparency
|
|
{
|
|
enum { NONE, FADE_OUT, FADE_IN };
|
|
|
|
sTransparency() : m_transparency(false) {}
|
|
~sTransparency() { m_list.clear(); }
|
|
void initialize(SUIWnd* parentWnd);
|
|
void setTransparency(bool transparency);
|
|
void toggleTransparency();
|
|
void addAllList(SUIWnd* parentWnd);
|
|
void addList(KUIWnd* wnd);
|
|
void update(float elapsedtime);
|
|
void setMode(int mode);
|
|
void setAlpha(float alpha);
|
|
void updateAlpha();
|
|
|
|
int m_mode;
|
|
float m_updateTime;
|
|
float m_alpha;
|
|
float m_updateV;
|
|
bool m_transparency;
|
|
KUIControlSimpleButton* m_transparencyButton;
|
|
std::vector<KUIWnd*> m_list;
|
|
};
|
|
/// 사이즈 변경 할 때 쓰일 초기 값들을 저장
|
|
struct sBackup
|
|
{
|
|
int m_wndHeight;
|
|
int m_inframeHeight;
|
|
int m_outframeHeight;
|
|
int m_rewardOffsetTop;
|
|
};
|
|
/// object slot info
|
|
struct sObject
|
|
{
|
|
sObject(int index, int max, int cur, char const* text) : m_index(index), m_max(max), m_cur(cur), m_text(text) {}
|
|
bool operator == (int index);
|
|
void set(sObject const& obj);
|
|
|
|
int m_index;
|
|
int m_max;
|
|
int m_cur;
|
|
std::string m_text;
|
|
};
|
|
struct sObjectList
|
|
{
|
|
~sObjectList() { clear(); }
|
|
void clear() { m_list.clear(); }
|
|
void insert(sObject const& object);
|
|
void erase(int index);
|
|
void update(SUIWnd* parentWnd);
|
|
void setObject(int index, int maxProgress, const char* text, SUIWnd* parentWnd);
|
|
bool setProgress(int index, int curProgress, SUIWnd* parentWnd, std::string& progressNotice);
|
|
/// 출력될 진행률 공지 텍스트를 만든다
|
|
void makeProgressNotice(sObject const& object, std::string& progressNotice);
|
|
|
|
std::vector<sObject> m_list;
|
|
};
|
|
|
|
sBackup m_backup;
|
|
sTransparency m_transparency;
|
|
sObjectList m_objects;
|
|
KUIControl* m_rewardCtrl;
|
|
std::string m_title;
|
|
std::string m_reward;
|
|
|
|
DWORD m_time;
|
|
DWORD m_elapsedtime;
|
|
};
|
|
|
|
#endif |