/* ========================================================================== * ÆÄ ÀÏ : TradeWindow.h * ¸ñ Àû : * ÀÛ ¼º ÀÚ : ±è°¡¶÷ * ÀÛ ¼º ÀÏ : 2008-04-17 * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #include "UIWindow.h" #include "ItemManager.h" class cLabel; class cPushButton; class cButton; class cItemIcon; struct sThatInvetory { sInventory mThatInv; cItemIcon* mThatIcon; sThatInvetory() { mThatIcon = 0; mThatInv.idx = 0; mThatInv.ItemIndex = 0; mThatInv.number = USHRT_MAX; mThatInv.count = 0; mThatInv.enhanced = 0; mThatInv.seal = 0; mThatInv.cash = 0; } }; /// °Å·¡ À©µµ¿ì class cTradeWindow : public cUIWindow { public: cTradeWindow(); virtual ~cTradeWindow(); virtual void Open(); virtual void Close(); void Clear(); void SetStatus( eItemExchangeStatus status, bool myTurn ); eItemExchangeStatus GetStatus() { return mStatus; } /// µÎ¸í ¾ÆÀ̵𠼼ÆÃ void SetNames( LPCTSTR otherName ); /// ¾ÆÀÌÅÛ »ðÀÔ bool AddMyItem( unsigned short slot ); bool DeleteMyItem( unsigned short arrIndex ); /// Æ®·¹ÀÌµå ½½·Ô /// »ó´ë¹æ¾ÆÀÌÅÛ »ðÀÔ bool AddThatItem( sInventory* inv ); bool DeleteThatItem( sInventory* inv ); /// void AddMyMoney( unsigned long money ); void AddThatMoney( unsigned long money ); /// unsigned short GetMyLastSlot() { return mMyLastSlot; } unsigned short GetThatLastSlot() { return mThatLastSlot; } unsigned short GetMySlotIndex( int i ); sThatInvetory* GetThatItem() { return mThatItem; } unsigned long GetMyTotalWeight(); /// bool IsNetLock(); protected: bool OnCreate( cUINodeProperty* property ); void OnProcess( unsigned long deltaTime, unsigned long accumTime ); void OnRender(cUIFontItemKeeper* pKeeper ); void OnCommand( cUINode* node, unsigned int id ); void OnPushButtonPressed( cUINode* , unsigned int id ); void OnIconDragged( cUINode* caller, unsigned int id, const cUIPos& pos, bool shift ); void OnIconHovered( cUINode* caller, unsigned int id, const cUIPos& pos ); void OnHide(); void HideESC( bool onsound ); void OnNetLock( int lockTry ); void OnNetUnLock( int lockTry ); void UpdateSkin(); void UpdateMyData( unsigned short index ); void UpdateThatData( unsigned short index ); protected: /// ³» µî·Ï¾ÆÀÌÅÛ cItemIcon* mMyItem[MAX_ITEM_EXCHANGE]; /// »ó´ë¹æ µî·Ï ¾ÆÀÌÅÛ sThatInvetory mThatItem[MAX_ITEM_EXCHANGE]; /// ¸¶Áö¸·À¸·Î ä¿öÁø ¾ÆÀÌÅÛ Æ®·¹ÀÌµå ½½·ÔÀ妽º unsigned short mMyLastSlot; unsigned short mThatLastSlot; /// ¾ÆÀ̵ð cLabel* mpName; cLabel* mpOtherName; /// ±Ý¾× cLabel* mpMyMoney; cLabel* mpThatMoney; /// ¹öư : [press: ¹°Ç°¿Ï·á»óÅÂ, not press: ¹°Ç°¼öÁ¤»óÅÂ] cButton* mTradeButton; cPushButton* mpMyOk; cPushButton* mpThatOk; /// °Å·¡»óÅ (³»»óÅÂ, »ó´ë¹æ»óÅÂ) eItemExchangeStatus mStatus; eItemExchangeStatus mThatStatus; // ¹°Ç°È®Àιöư µô·¹ÀÌ unsigned long mOKAccumTime; };