183 lines
5.4 KiB
C++
183 lines
5.4 KiB
C++
|
|
#pragma once
|
|
|
|
//#include "KUIControl.h"
|
|
#include "KPrimitiveSprite.h"
|
|
|
|
class KUIControlStatic;
|
|
class KUIControlSimpleButton; /// 2011.09.23 - prodongi
|
|
class KUIControlCheck;
|
|
|
|
/// Quest Info Static
|
|
class KUIControlQuestInfo : public KUIControl
|
|
{
|
|
public:
|
|
KUIControlQuestInfo();
|
|
~KUIControlQuestInfo();
|
|
|
|
virtual void Render(KViewportObject * pViewport, bool isFront = false );
|
|
|
|
void InitQuestInfoControl();
|
|
void SetQuestInfo( const char * strTitle, std::vector<std::string>& strProgressList, std::vector<std::string>& strTooltipList, int difficulty );
|
|
void RefreshQuestInfo(bool bShortmode = false);
|
|
void SetSimpleMode( bool bFlag );
|
|
|
|
virtual void OnPosChangeNofity(int XOffset, int YOffset);
|
|
virtual void OnClipChangeNotify(const KRect& rcClipRect);
|
|
virtual void OnAlphaChangeNotify(float fAlpha);
|
|
|
|
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
|
|
virtual void PumpUpMessage(LPCSTR lpszControlID, DWORD dwMessage, DWORD lParam, DWORD wParam);
|
|
|
|
void updateOpacity(float alpha); /// 2011.09.23 - prodongi
|
|
char const* getBackAniName() const { return m_wndBack->GetAniName(); }
|
|
void setBackAniName(char const* aniName) { m_wndBack->SetAniName(aniName); }
|
|
char const* getSelectAniName() const { return m_wndSelect->GetAniName(); }
|
|
void setSelectAniName(char const* aniName) { m_wndSelect->SetAniName(aniName); }
|
|
void setUnSelect() { m_wndSelect->SetShow(false); }
|
|
void setSelect();
|
|
void setIndex(DWORD i) { m_index = i; }
|
|
void setOpacityShow(bool show);
|
|
void setDifficulty(int difficulty);
|
|
|
|
protected:
|
|
/// 2011.09.28 난이도 컨트롤에 툴팁 설정 - prodongi
|
|
void setDifficultyToolTip();
|
|
|
|
protected:
|
|
bool m_IsSimpleMode;
|
|
|
|
#ifdef _COUNTRY_ME_
|
|
std::vector<KTextLayout2*> m_vProgressPhrase;
|
|
#else
|
|
std::vector<KTextPhrase*> m_vProgressPhrase;
|
|
#endif
|
|
|
|
std::string m_strTitle;
|
|
std::vector<std::string> m_strProgress;
|
|
std::vector<std::string> m_strTooltip;
|
|
|
|
private:
|
|
std::vector<KUIControlStatic*> m_pQuestObjectList;
|
|
std::vector<KUIControlStatic*> m_pQuestObjectSelectList;
|
|
KUIWnd* m_wndGiveUp;
|
|
KUIWnd* m_wndDifficulty;
|
|
KUIWnd* m_wndDotLine;
|
|
KUIWnd* m_wndBack;
|
|
KUIWnd* m_wndSelect;
|
|
KUIWnd* m_ctrlTitle;
|
|
DWORD m_index;
|
|
int m_difficulty;
|
|
};
|
|
|
|
/// Quest Info Static Manager
|
|
class KUIControlQuestInfoManager : public KUIControl
|
|
{
|
|
public:
|
|
enum
|
|
{
|
|
KQUESTINFOMNG_NORMAL = 0,
|
|
KQUESTINFOMNG_ACTIVATE,
|
|
KQUESTINFOMNG_DOWN,
|
|
};
|
|
|
|
KUIControlQuestInfoManager();
|
|
~KUIControlQuestInfoManager();
|
|
|
|
/// 2011.09.23 progress 추가 - prodongi
|
|
void AddQuestInfo( int questCode, const char * strTitle, std::vector<std::string>& strProgressList,
|
|
std::vector<std::string>& strTooltipList, bool bSelect, bool bVisible, bool bPending,
|
|
bool isProgress, int isCheck, int difficulty, bool isNew );
|
|
int GetQuestInfoHeight( int questCode );
|
|
|
|
bool IsQuestInfoShortMode( int questCode );
|
|
int GetSelectIndex() { return m_nSelectIndex; }
|
|
int GetQuestInfoCtrlListCount() { return m_slot.size(); }
|
|
KUIControlQuestInfo *GetQuestInfoCtrl(int idx) { return m_slot[idx].m_info; }
|
|
|
|
void ClearQuestInfo();
|
|
|
|
void RefreshQuestInfo();
|
|
void SetSimpleMode( bool bFlag );
|
|
|
|
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
|
|
/// 2011.09.15 - prodongi
|
|
virtual void OnAlphaChangeNotify(float fAlphaDiff);
|
|
virtual void PumpUpMessage(LPCSTR lpszControlID, DWORD dwMessage, DWORD lParam, DWORD wParam);
|
|
|
|
void InitQuestInfoControl();
|
|
void SetSelectIndex(int index=0) { m_nSelectIndex = index; }
|
|
void RefreshSelectBar( int nIndex );
|
|
void updateOpacity(float alpha); /// 2011.09.23 - prodongi
|
|
void setOpacityShow(bool show);
|
|
bool isCheck(int idx) const;
|
|
/// 2011.12.07 모든 퀘스트를 short 상태로 만든다 - prodongi
|
|
void setAllShort();
|
|
/// 2011.12.07 모든 퀘스트를 unshort 상태로 만든다 - prodongi
|
|
void setAllUnshort();
|
|
/// 2011.12.07 모든 퀘스트가 short 상태인지 체크 - prodongi
|
|
bool isAllShortList();
|
|
bool isAllUnshortList();
|
|
|
|
protected:
|
|
void SetButtonState( DWORD State );
|
|
int checkQuestInfo( int x, int y );
|
|
void addOpacityList();
|
|
void addOpacityChild(char const* id);
|
|
void hideSelect();
|
|
bool isInQuestInfo(int x, int y); /// 2011.11.28 - prodongi
|
|
|
|
protected:
|
|
bool m_IsSimpleMode;
|
|
int m_nCanUseIndex;
|
|
int m_nUseCnt;
|
|
|
|
DWORD m_dwButtonState;
|
|
bool m_bLeftButton;
|
|
|
|
int m_nSelectIndex;
|
|
|
|
typedef struct _quest_item
|
|
{
|
|
std::string strTitle;
|
|
std::vector<std::string> strProgress;
|
|
int questCode;
|
|
int questInfoCtrlID;
|
|
bool pendingQuest;
|
|
|
|
} _QUEST_ITEM;
|
|
|
|
struct sSlot
|
|
{
|
|
struct sNew
|
|
{
|
|
sNew() : m_static(NULL), m_button(NULL) {}
|
|
void SetShow(bool show, bool simple);
|
|
void MovePos(int x, int y);
|
|
bool IsShow() const;
|
|
void SetSimpleMode(bool simple);
|
|
KUIControlStatic* m_static;
|
|
KUIControlSimpleButton* m_button;
|
|
};
|
|
sSlot() : m_info(NULL), m_auto(NULL), m_check(NULL), m_view(NULL) {}
|
|
void setShow(bool show);
|
|
void setNewShow(bool show, bool simple);
|
|
/// 2011.10.06 new 상태를 저장해 놓는다 - prodongi
|
|
void backupNewShow();
|
|
/// 2011.10.06 저장해 놓은 new 상태를 복구한다, refresh 할 때 쓰임 - prodongi
|
|
void restoreNewShow(bool simple);
|
|
|
|
KUIControlQuestInfo* m_info;
|
|
KUIControlStatic* m_auto;
|
|
KUIControlCheck* m_check;
|
|
KUIControlSimpleButton* m_view;
|
|
sNew m_new;
|
|
bool m_backupNewShow;
|
|
};
|
|
|
|
std::vector< _QUEST_ITEM > m_strQuestItemList;
|
|
std::vector<sSlot> m_slot;
|
|
std::vector<KUIWnd*> m_opacityList;
|
|
std::vector< int > m_QuestShortInfoCodeList;
|
|
|
|
}; |