266 lines
7.6 KiB
C++
266 lines
7.6 KiB
C++
#pragma once
|
|
|
|
//#include "SUIWnd.h"
|
|
#include "SNetMessage.h"
|
|
//#include "SUIUtil.h" // sonador 1.9.1 인벤토리 및 창고 정렬 기능 구현
|
|
|
|
class SUIDisplayInfo;
|
|
class SInventorySlot;
|
|
|
|
//////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////
|
|
//
|
|
typedef std::vector<SInventorySlot*> vec_inventoryslot;
|
|
typedef std::vector<SInventorySlot*>::iterator it_inventoryslot;
|
|
typedef std::vector<SInventorySlot*>::const_iterator cit_inventoryslot;
|
|
|
|
class SUIStorageWnd : public SUIWnd, public sui::ticker
|
|
{
|
|
public:
|
|
SUIStorageWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( pGameManager )
|
|
, m_pDisplayInfo ( pDisplayInfo )
|
|
, m_pArrangeButton( 0 )
|
|
, m_pArrangeButtonAction( 0 )
|
|
, m_ActionTicker( 30000 )
|
|
, m_bOpenNumberInputDlg_moveItemtoInventory( false ) //servantes 2010.10.19
|
|
,m_bIsSetChildTop(false)
|
|
,m_iMaxSlot(0)
|
|
{
|
|
enter();
|
|
};
|
|
virtual ~SUIStorageWnd(); // sonador 1.9.1 인벤토리 및 창고 정렬 기능 구현
|
|
virtual void Process( DWORD dwTime ); //
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool bReload = false );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
virtual void* Perform( KID id, KArg& msg );
|
|
|
|
private:
|
|
/// init
|
|
void CreateControls();
|
|
void InitStaticText();
|
|
void DisableSlot( int nSlot );
|
|
|
|
/// selectbar
|
|
void EnableSelectBar();
|
|
AR_HANDLE GetSelectHandle( int nIndex );
|
|
|
|
/// slot
|
|
void RefreshSlots( int nSlotStart = 0 );
|
|
void EnableSlots( int nSlot, bool bEnable = true );
|
|
void SetSlotData( int nSlot, SInventorySlot* pSlot = NULL );
|
|
AR_HANDLE GetItemHandle( const char* szControlID );
|
|
void RefreshGold();
|
|
|
|
/// scrollbar
|
|
void RefreshScrollBar();
|
|
void ResetScrollBar();
|
|
/// resize
|
|
void ResizeScrollBar();
|
|
|
|
void RefreshLendingItemTooltip();
|
|
|
|
/// item
|
|
void SetItemList();
|
|
int GetMode();
|
|
void ReqSwapItem( AR_HANDLE hBEGIN_DRAG, AR_HANDLE hRECV_DROP );
|
|
|
|
AR_HANDLE m_hSelItem;
|
|
money_t m_n64Gold; ///< [sonador][3.4.1]소지금 한도 증가 관련 서버 메시지 변경
|
|
|
|
int m_nInvenSlotStartIndex;
|
|
|
|
int m_nViewSlot;
|
|
KRect m_rtOldRect;
|
|
int m_nScrollPos;
|
|
int m_nSelectSlot;
|
|
|
|
int m_nTabMode;
|
|
|
|
bool m_bOpenNumberInputDlg_moveItemtoInventory; //servantes 2010.10.27
|
|
|
|
SInventorySlot* GetItemInfo( AR_HANDLE hItem );
|
|
private:
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
vec_inventoryslot m_vecItemList;
|
|
|
|
KUIControlSimpleButton* m_pArrangeButton; ///< sonador 1.9.1 인벤토리 및 창고 정렬 기능 구현
|
|
sui::ActionBinder* m_pArrangeButtonAction; //
|
|
sui::conditional_fixed_rate_one_time_ticker m_ActionTicker; //
|
|
void _ReqArrange(); //
|
|
|
|
// 2011. 9 .15 - marine
|
|
// epic7 part4 창고 리뉴얼
|
|
enum{
|
|
QUEST_TYPE = 9999,
|
|
};
|
|
bool m_bIsSetChildTop;
|
|
unsigned int m_iMaxSlot;
|
|
/*
|
|
KUIWnd* m_pCtrlSlotGauge; // 사용안함
|
|
float m_fSlotGaugeWidth;
|
|
*/
|
|
KUIControlStatic* m_pSlotStatic;
|
|
|
|
/// 2012.08.09 예전 아이템 개수, 현재 아이템 개수와 틀리면 스크롤 업데이트를 시킴,
|
|
/// 창고 구조가 쫌 이상하지만 더 크게 건들기가 힘들어서 원래 있던 코드에서 약간만 수정함- prodongi
|
|
int m_lastItemCountAtRefreshScroll;
|
|
|
|
void SetChildTopStorage(void);
|
|
void UpdateSlot();
|
|
void SetSlotGage(){};
|
|
void SetScrollRange( const int nCurCount ); // 2011. 12. 13 - marine 스크롤 범위 설정
|
|
};
|
|
|
|
//////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////
|
|
|
|
typedef std::vector<TS_SC_COMMERCIAL_STORAGE_LIST::CommercialItemInfo> vec_commercial_list;
|
|
typedef std::vector<TS_SC_COMMERCIAL_STORAGE_LIST::CommercialItemInfo>::iterator it_commercial_list;
|
|
/// 캐쉬 아이템 창고
|
|
class SUICashStorageWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUICashStorageWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( pGameManager )
|
|
, m_pDisplayInfo ( pDisplayInfo )
|
|
{};
|
|
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool bReload = false );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
virtual void* Perform( KID id, KArg& msg );
|
|
|
|
private:
|
|
/// init
|
|
void CreateControls();
|
|
void InitStaticText();
|
|
void DisableSlot( int nSlot );
|
|
|
|
bool IsTakeAble( const char* szControlID );
|
|
|
|
/// selectbar
|
|
void EnableSelectBar();
|
|
unsigned int GetSelectUID( int nIndex );
|
|
count_t GetItemCount( unsigned int uitemUID );
|
|
|
|
/// slot
|
|
void RefreshSlots( int nNewScrollPos = 0 ); // sonador #2.3.1.40
|
|
void EnableSlots( int nSlot, bool bEnable = true );
|
|
void SetSlotData( int nSlot, TS_SC_COMMERCIAL_STORAGE_LIST::CommercialItemInfo* pSlot = NULL );
|
|
unsigned int GetItemUID( const char* szControlID, count_t & count );
|
|
|
|
/// scrollbar
|
|
void RefreshScrollBar();
|
|
|
|
/// resize
|
|
void ResizeScrollBar();
|
|
|
|
/// item
|
|
void SetItemList();
|
|
int GetMode();
|
|
|
|
unsigned int m_hSelItem;
|
|
|
|
int m_nInvenSlotStartIndex;
|
|
|
|
int m_nViewSlot;
|
|
KRect m_rtOldRect;
|
|
int m_nScrollPos;
|
|
int m_nSelectSlot;
|
|
|
|
int m_nTabMode;
|
|
|
|
private:
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
vec_commercial_list m_vecItemList;
|
|
};
|
|
|
|
|
|
//////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////
|
|
/// 캐쉬 Title
|
|
class SUICashTitleWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUICashTitleWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
|
|
private:
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
|
|
};
|
|
|
|
//////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////
|
|
/// 길드 웹페이지 타이틀 바
|
|
class SUIGuildTitleWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUIGuildTitleWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( pGameManager )
|
|
, m_pDisplayInfo ( pDisplayInfo )
|
|
{};
|
|
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
|
|
private:
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
|
|
};
|
|
|
|
|
|
//////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////
|
|
/// HELP 웹페이지 타이틀 바
|
|
class SUIHelpTitleWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUIHelpTitleWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( pGameManager )
|
|
, m_pDisplayInfo ( pDisplayInfo )
|
|
{};
|
|
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true ); //servantes 2010.10.13
|
|
|
|
private:
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
|
|
};
|
|
|
|
|
|
//////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////
|
|
/// POPUP 웹페이지 타이틀 바
|
|
class SUIPopURLTitleWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUIPopURLTitleWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( pGameManager )
|
|
, m_pDisplayInfo ( pDisplayInfo )
|
|
{};
|
|
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
|
|
void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
|
|
private:
|
|
void ResizeWnd();
|
|
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
|
|
std::vector< std::string > m_vURL_List;
|
|
int m_nURL_Width;
|
|
int m_nURL_Height;
|
|
}; |