/* ==================================================================== * ÆÄ ÀÏ : FontAgent.h * ¸ñ Àû : »ý¼ºµÈ ÆùÆ® °´Ã¼ÀÇ °ü¸® ¹× ÆùÆ® È­¸é Ãâ·Â ó¸® * ÀÛ ¼º ÀÚ : À̹ý¼® * ÀÛ ¼º ÀÏ : 2006.10.17 * * Ãß°¡³»¿ë : * Ãß°¡³¯Â¥ ÀÛ¾÷ÀÚ Ãß°¡³»¿ë * 06.10.17 À̹ý¼® »ý¼º * * ÁÖÀÇ»çÇ× : * =================================================================== */ #pragma once class cFontObject; class cFontAgent { public: static cFontAgent* mpFontAgent; cFontAgent(); ~cFontAgent(); enum eFont { eFont_UI = 0, /// UI¿ë ÆùÆ® ( UI¿ë, °íÁ¤ SystemMsg ) eFont_UI_Bold, eFont_System, /// ½Ã½ºÅÛ ÆùÆ® (Tooltip, GameInfo, À¯µ¿SystemMsg) eFont_Chat, /// äÆÃ¿ë eFont_Notice, /// °øÁö¿ë(use back) eFont_DepthFont, /// ±íÀ̰¡ ÀÖ´Â ¸é¿¡ ±×·ÁÁú ÆùÆ®¿ë(use back) eFont_Npc, /// NPC ´ëȭâ ÆùÆ® eFont_Max, }; /// ÃʱâÈ­ bool Init(); /// Á¾·áºÎ void Exit(); void BeginRender(); void EndRender(); /// ÀåÄ¡ ¼Ò½Ç½Ã 󸮺Πvoid Invalidate(); void Restore(); /// °°ÀÌ ÂïÀ»¼ö ÀÖ´Â ÇüŸ¦ ¹­¾î¼­ ·£´õ¸µ ÇÑ´Ù. (Font Keeper¿Í ¿¬µ¿½Ã۱â À§ÇÑ ÇÔ¼ö) void AddText( unsigned short fontIdx, LPTSTR text, int textLen, POINT* textPos, unsigned long textColor ); void BatchDrawText(); /// DrawText ÀÎÅÍÆäÀ̽º Á¦°ø void DrawText( unsigned short fontIdx, LPTSTR text, int textLen, POINT* textPos, unsigned long textColor, bool outerLine = false ); void DrawText( unsigned short fontIdx, LPTSTR text, int textLen, unsigned int posX, unsigned int posY, unsigned long textColor, bool outerLine = false ); /// ¹®ÀÚ¿­ ±æÀÌ Á¤º¸ long GetTextExtent( unsigned short fontIdx, LPCTSTR text, unsigned int textLen ); long GetTextWidth( unsigned short fontIdx ); long GetTextHeight( unsigned short fontIdx ); protected: /// FontObject ¸®½ºÆ® // typedef tArray cFontArray; typedef tArray cFontArray; cFontArray mFontArray; LPD3DXSPRITE mpSprite; LPD3DXSPRITE mpSpriteTemp; HANDLE mhFont; }; #define FONTAGENT cFontAgent::mpFontAgent