/* ========================================================================== * ÆÄ ÀÏ : UIManager.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2006.09.25 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "UIEvent.h" #include "UISkin.h" #include "UIProperty.h" #include "UIRect.h" //#include "BaseStage.h" //#include "IndexGenerator.h" #include "Item_Common.h" const unsigned int MAXEDIT_DEFAULTLENGTH = 8; const unsigned int DEFAULT_SCREENWIDTH = 1024; const unsigned int DEFAULT_SCREENHEIGHT = 768; const int MODEIMAGE_W = 256; const int MODEIMAGE_H = 60; const int MODEIMAGE_Y = 100; const int LANGUAGE_ICON_INDEX = 10000; class cUINode; class cUIContainer; class cUIRootNode; class cUIWindow; class cUICursor; class cUIIDList; class cUIText; class cUIImageFont; class cUIFuncText; class cUIFuncTextNode; class cUINpcTelling; class cMsgBox; class cDragWindow; class cUnionDragWindow; class cUnionIcon; class cApplication; class cIconParam; class cBaseIcon; class cUIRoundGauge; class cPage; class cCenterText; class cCenterNoticeText; class cModeCenterImage; //class cPlaneObject; struct sSceneData; class cTipWindow; class cItemTipWindow; class cSkillTipWindow; class cBuffToolTipWindow; class cSimpleTipWindow; class cChatTipWindow; class cQuestTipWindow; enum eMSGBox_Type; enum eMSGBox_Event; enum eBoxSkin_Type; enum eDragFrom; enum eTip_Kind; /// UI °ü¸®ÀÚ class cUIManager { friend class cApplication; static cUIManager* mpSingleton; public: cUIManager(); ~cUIManager(); /// ÃʱâÈ­ bool Init(); cUISkin* GetSkin() const; /// ¼Ó¼ºÀ» ¸®ÅÏ cUIProperty* GetProperty() const; LPCTSTR GetUIText( unsigned int textId ); bool GetUIText( cStringT*, unsigned int textId ); /// Npc cUINpcTelling* GetNpcTelling( unsigned int npcId ) const; cUIFuncTextNode* GetNpcTextNode( unsigned int textId ); /// page bool AddPage( unsigned long pageIdx, cPage* page ); cPage* GetPage( unsigned long pageIdx ); /// ¾ÆÀÌÄÜ cIconParam* GetIconParam( unsigned int iconId ); protected: /// ·Îµù bool LoadIDList( const cString& pathName ); bool LoadSkin( const cString& pathName ); bool LoadProperty( const cString& pathName ); bool LoadSkinText( const cString& pathName ); /// À̹ÌÁö ÆùÆ® bool LoadImageFonts( const cString& pathName ); /// ¾ÆÀÌÄÜ bool LoadIconParams( const cString& pathName ); /// Npc bool LoadNpcText( const cString& pathName ); bool LoadNpcScripts( const cString& pathName ); bool LoadNpcScript( const cString& pathName ); bool LoadNpcScene( const cString& pathName ); public: /// ´ÜÀÏü¸¦ ¸®ÅÏ static cUIManager* GetSingleton(); protected: /// ½ºÅ² cUISkin* mpSkin; /// ¼Ó¼º cUIProperty* mpProperty; /// ÅØ½ºÆ® cUIText* mpSkinText; /// UI ID ¸®½ºÆ® cUIIDList* mpIDList; /// ·çÆ® ³ëµå cUIRootNode* mpRootNode; // cUIRootNode* mpStageRootNode[eStage_Max]; /// ¸¶¿ì½º ĸÃÄ ³ëµå cUINode* mpCaptureNode; /// ¸¶¿ì½º ¿À¹ö ³ëµå cUINode* mpHoveredNode; /// Æ÷Ä¿½º ³ëµå cUINode* mpFocusedNode; /// ¸Þ½ÃÁö ¹Ú½º cUIWindow* mpTopMsgBox; /// ¸¶¿ì½º À̺¥Æ® ¹ß»ý½ÃÀÇ Æ÷Áö¼Ç°ª ÀúÀå cUIPos mMousePos; /// ÆÁ cTipWindow* mTipWindow; /// äÆÃ ÆÁ À©µµ¿ì cChatTipWindow* mChatItemTipWindow; /// µå·¡±×À©µµ¿ì cDragWindow* mpDragWindow; cUnionDragWindow* mpUnionDragWindow; /// Á¦°Å µÇ¾îÁú MsgBoxµé¿¡ ´ëÇÑ Ã³¸®.. typedef tPointerList cDestroyMsgBoxList; cDestroyMsgBoxList mDestroyMsgBoxList; typedef tPointerHashMap cApplyFrontMap; cApplyFrontMap mApplyFrontMap; //cIndexGenerator mFrontIdGen; /// À̹ÌÁö ÆùÆ® typedef tHashMap cImageFontMap; cImageFontMap mImageFontMap; /// ¾ÆÀÌÄÜ typedef tHashMap cTextureMap; cTextureMap mIconTextureMap; typedef tHashMap cIconParamMap; cIconParamMap mIconParamMap; /// Npc cUIFuncText* mpNpcText; typedef tHashMap cNpcTellingMap; cNpcTellingMap mNpcTellingMap; /// ÆäÀÌÁö °ü¸®¿ë (ÆäÀÌÁöÀ妽º, ÆäÀÌÁö ³»¿ë) typedef tPointerHashMap cPageMap; cPageMap mPageMap; /// ÆäÀÌÁö Àå¸é À̹ÌÁö ½ºÅ©¸³Æ® typedef tPointerHashMap cSceneMap; cSceneMap mSceneMap; /// npc À©µµ¿ì°¡ ³¡³ª¸é º¸¿©Áà¾ßÇÒ À©µµ¿ì typedef tArray cRestoreShow; cRestoreShow mRestore; /// ¸Þ¼¼Áö¹Ú½º °ü¸®¿ë typedef tPointerList cMsgBoxList; cMsgBoxList mModalList; typedef tPointerList cMsgBoxList; cMsgBoxList mModallessList; /// eUIEVENT_MOUSE_OTHERCLICK ÅëÁö ¸Þ¼¼Áö º¸³¾ UI ¸ñ·Ï typedef tPointerList cOtherClickList; cOtherClickList mOtherClickList; /// npc À©µµ¿ì°¡ ´ÝÈú¶§ °°ÀÌ ´Ý¾ÆÁà¾ßÇÏ´Â À©µµ¿ìµé typedef tPointerArray cCloseByNpcHideArr; cCloseByNpcHideArr mCloseByNpcHideArr; /// °øÁö Ãâ·Â¿ë // cCenterNoticeText* mNoticePrintText; // cCenterNoticeText* mEnhancePrintText; // È­¸é Ãâ·Â¿ë À̹ÌÁö //cPlaneObject* mpModeImage; // //cIndexGenerator mImageIndexGenerator; // pair // À̹ÌÁö °ü¸® : À©µµ¿ì¿¡ ¼Ò¼ÓµÇÁö ¾ÊÀº Ãâ·Â¿ë À̹ÌÁöµé (image ID, cImagePair ) typedef tPair cImagePair; // typedef tHashMap cImageHashMap; cImageHashMap mImageHashMap; /// typedef tPointerList cManagedSortUIList; cManagedSortUIList mManagedSortUIList; }; inline cUIManager* cUIManager::GetSingleton() { return mpSingleton; } inline cUISkin* cUIManager::GetSkin() const { return mpSkin; } inline cUIProperty* cUIManager::GetProperty() const { return mpProperty; } #define UIMAN cUIManager::GetSingleton()