117 lines
3.7 KiB
C++
117 lines
3.7 KiB
C++
|
|
#pragma once
|
|
|
|
|
|
//#include "SUIWnd.h"
|
|
|
|
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
//
|
|
// class SUIUpgradeWnd
|
|
//
|
|
// * 강화창.
|
|
//
|
|
//
|
|
//--------------------------------------------------------------------------------------------------------------------------------------------------------------
|
|
class SUIUpgradeWnd : public SUIWnd
|
|
{
|
|
private:
|
|
|
|
|
|
KUIControl * m_pFormalTextControl; // 공식출력 static 컨트롤.
|
|
std::string m_strFormal; // 공식.
|
|
std::string m_strDecoFormal; // 공식 꾸미기 태그.
|
|
std::string m_strFormalFontName; // 공식 폰트명.
|
|
|
|
KUIWnd * m_pCtrlFormalResult; // 결과출력 static 컨트롤.
|
|
std::string m_strDecoResult; // 결과 꾸미기 태그.
|
|
|
|
KUIControlVScrollSmallEx * m_pScrollFormal; // 스크롤바.
|
|
int m_nScrollPos; // 현재 스크롤 값.
|
|
|
|
std::string m_strDecoState; // 상태 텍스트 꾸미기 태그.
|
|
|
|
std::vector< std::string > m_vLineList; // 공식 리스트 배열.
|
|
#ifdef _AUTOMATERIAL
|
|
AR_HANDLE m_enhanceItem[5];
|
|
AR_HANDLE m_materialItem[5][9];
|
|
int m_materialItemNum[5][9];
|
|
int m_nRegEnhance;
|
|
#endif // _AUTOMATERIAL
|
|
bool m_bSpaceEnhance;
|
|
public:
|
|
|
|
|
|
|
|
public:
|
|
SUIUpgradeWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo ) : SUIWnd( pGameManager )
|
|
, m_pDisplayInfo( pDisplayInfo ), m_CombineItemHandel(0)
|
|
#ifdef _AUTOMATERIAL
|
|
, m_nRegEnhance(0)
|
|
#endif // _AUTOMATERIAL
|
|
, m_bSpaceEnhance(FALSE)
|
|
{};
|
|
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool bReload = false );
|
|
virtual void* Perform( KID id, KArg& msg );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
|
|
private:
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
|
|
struct COMBINEITEM
|
|
{
|
|
AR_HANDLE handle;
|
|
count_t usiCount;
|
|
|
|
COMBINEITEM()
|
|
: handle( NULL ), usiCount( 0 ) { }
|
|
|
|
COMBINEITEM( AR_HANDLE _handle, count_t _usiCount = count_t( 1 ) )
|
|
: handle( _handle ), usiCount( _usiCount ) { }
|
|
|
|
void Clear(){
|
|
handle = 0; usiCount=count_t(0);
|
|
}
|
|
};
|
|
typedef std::vector<COMBINEITEM> COMBINEITEM_VECTOR;
|
|
|
|
COMBINEITEM m_SourceItem;
|
|
COMBINEITEM_VECTOR m_CombineItemsVector;
|
|
|
|
AR_HANDLE GetItemHandle( const char* szControlID ) const;
|
|
SUIUpgradeWnd::COMBINEITEM_VECTOR::iterator GetItemIterator( AR_HANDLE hItem );
|
|
|
|
void AddCombineItem( AR_HANDLE hItem, count_t usiCount );
|
|
void RemoveCombineItem( AR_HANDLE hItem );
|
|
void RemoveAllCombineItems( bool bRefreshSlot = true );
|
|
|
|
void RefreshSlots();
|
|
void SetItemIconStatic( class KUIControlMultiIcon* pIconStatic, KUIWnd* pItemCountControl, count_t nCount = count_t( 0 ), SInventorySlot* pSlot = NULL, bool bMain=false );
|
|
|
|
bool IsEquipItem( class SInventorySlot* pSlot, count_t usiCount );
|
|
void AddMainCombineItem( AR_HANDLE hItem, count_t usiCount );
|
|
void AddSubCombineItem( AR_HANDLE hItem, count_t usiCount );
|
|
|
|
bool AbleAddSlot( COMBINEITEM Item );
|
|
bool AbleMainSlot( class SInventorySlot* pSlot );
|
|
bool AbleSubSlot( class SInventorySlot* pSlot );
|
|
|
|
AR_HANDLE m_CombineItemHandel;
|
|
|
|
|
|
private:
|
|
|
|
// 공식텍스트 출력.
|
|
void RefreshFormal();
|
|
|
|
};
|
|
|
|
|
|
|