129 lines
3.8 KiB
C++
129 lines
3.8 KiB
C++
#pragma once
|
|
|
|
//#include "SUIWnd.h" // UI 공통 클래스
|
|
#include "SMixCategoryDB.h"
|
|
|
|
//---------------------------------------------------------------------------------------------
|
|
//---------------------------------------------------------------------------------------------
|
|
//
|
|
// class SUIFormulaListWnd
|
|
//
|
|
// * 공식 리스트 윈도우.
|
|
//
|
|
//
|
|
//---------------------------------------------------------------------------------------------
|
|
|
|
|
|
class SUIFormulaListWnd : public SUIWnd
|
|
{
|
|
private:
|
|
|
|
enum LIST_GROUP
|
|
{
|
|
LIST_HIGH, // 대분류
|
|
LIST_MIDDLE,// 중분류
|
|
LIST_LOW, // 소분류
|
|
|
|
LIST_MAX,
|
|
};
|
|
|
|
// List 출력을 위한 구조체.
|
|
struct SList
|
|
{
|
|
SList() : m_pList(NULL), m_pScrollBar(NULL), m_nScrollPos(0), m_nMaxSize(0)
|
|
{}
|
|
|
|
// 2010.09.03 - prodongi
|
|
~SList();
|
|
// ~SList(){
|
|
// SAFE_DELETE( m_pList );
|
|
// }
|
|
|
|
void clear(){
|
|
m_nScrollPos = 0; m_nMaxSize = 0;
|
|
if( m_pSelectedControl )
|
|
m_pSelectedControl->SetShow( false );
|
|
}
|
|
|
|
void Set( class KUIListControl * pList=NULL, class KUIControlVScrollSmallEx * pScroll=NULL, int nScrollPos=0 ){
|
|
m_pList = pList; m_pScrollBar = pScroll; m_nScrollPos = nScrollPos;
|
|
}
|
|
|
|
void RefreshScrollBar();
|
|
|
|
class KUIListControl * m_pList; // 공식 분류 리스트 컨트롤.
|
|
class KUIControlVScrollSmallEx * m_pScrollBar; // 스크롤바.
|
|
int m_nScrollPos; // scroll bar의 변경 정보.
|
|
int m_nMaxSize; // 리스트 총개수.
|
|
|
|
KUIWnd * m_pSelectedControl; // 선택아이템에 출력될 컨트롤.
|
|
};
|
|
|
|
SList m_List[ LIST_GROUP::LIST_MAX ]; // 공식리스트 구조체 배열.
|
|
int m_nSelectIndex[ LIST_GROUP::LIST_MAX ]; // 선택된 아이템 인덱스. ( 스크롤값을 제외한 보이는 아이템에서의 인덱스 )
|
|
|
|
int m_nSystheticID; // 합성분류 - 강화/조합/수리/복원....
|
|
|
|
|
|
SMixCategoryDB::SCount m_CategoryCount; // 합성분류당 대,중,소 분류 각각의 개수.
|
|
|
|
KUIWnd * m_arrSelectedText[ LIST_GROUP::LIST_MAX ]; // 선택한 아이템의 텍스트를 출력할 컨트롤.
|
|
|
|
std::string m_strDecoTitle; // 타이틀 꾸미기텍스트.
|
|
std::string m_strDecoListItem; // 리스트 아이템 꾸미기텍스트.
|
|
std::string m_strDecoSelected; // 선택된 아이템 꾸미기텍스트.
|
|
|
|
|
|
public :
|
|
|
|
SUIFormulaListWnd( SGameManager * pGameManager );
|
|
|
|
virtual ~SUIFormulaListWnd();
|
|
|
|
//------------------------------------------
|
|
|
|
virtual SUIWnd* CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID );
|
|
virtual bool InitControls( KPoint kPos );
|
|
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
|
|
//virtual void OnPosChangeNofity(int nLeft, int nTop);
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
|
|
|
|
|
|
//------------------------------------------
|
|
|
|
void Release(); // 메모리 해제.
|
|
|
|
//------------------------------------------
|
|
|
|
private:
|
|
|
|
// 공식 적용.
|
|
void Apply();
|
|
|
|
// 리스트 채움.
|
|
void RefreshList( int listIndex );
|
|
void RefreshListAll();
|
|
void RefreshListControl( int nScrollIndex );
|
|
|
|
// ClearListControl : 리스트 의 아이템 초기화.
|
|
void ClearListControl( int nScrollIndex );
|
|
|
|
// 리스트의 아이템 선택시 처리.
|
|
void ListItemClick( struct MSG_LISTCONTROL & msg );
|
|
|
|
// GetCategory : 인자에 해당하는 카테고리 정보를 반환.
|
|
MixCategoryBase * GetCategory( int nListIndex, int nDataIndex );
|
|
|
|
// 셀렉트 컨트롤 가시성 결정.
|
|
void VisibilitySelectedControl( bool flag, int listIndex, int itemIndex=0 );
|
|
|
|
// 셀렉트컨트롤 조정.
|
|
void RefreshSelectedContol( int nScrollIndex );
|
|
|
|
// 셀렉트컨트롤 설정.
|
|
void SetSelectedControl( int listIndex, int itemIndex );
|
|
}; |