297 lines
8.1 KiB
C++
297 lines
8.1 KiB
C++
#pragma once
|
|
|
|
//#include "SUIWnd.h"
|
|
#include "SGameOption.h"
|
|
#include "SGameWorldKeymapping.h"
|
|
|
|
class SUIDisplayInfo;
|
|
class SUISystemNormalChild;
|
|
class SUISystemEnvironmentChild;
|
|
class SUISystemPlayChild;
|
|
class SUISystemKeymappingChild;
|
|
//class SUISystemInterfaceChild;
|
|
|
|
////////////////////////////////////////////////////////
|
|
//
|
|
/// SUISystemMainWnd
|
|
class SUISystemMainWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUISystemMainWnd( 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 );
|
|
|
|
private:
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
};
|
|
|
|
////////////////////////////////////////////////////////
|
|
//
|
|
/// SUISystemWnd
|
|
class SUISystemWnd : public SUIWnd
|
|
{
|
|
public:
|
|
SUISystemWnd( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( pGameManager )
|
|
, m_pDisplayInfo( pDisplayInfo )
|
|
{ }
|
|
|
|
virtual SUIWnd* CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID );
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool bReload = false );
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
virtual void OnNotifyUIWindowOpen( bool bOpen, bool bLimitWnd = true );
|
|
|
|
//public:
|
|
// void ChangeTabChild( int nTabType );
|
|
|
|
void EnableButton( const char* szChildName, bool bEnable );
|
|
|
|
private:
|
|
/// 현재 활성탭 차일드를 열어준다
|
|
void ShowTabChild( int nTabType );
|
|
void ApplyOption();
|
|
void ApplyCancel();
|
|
void procMsgData(SGameMessage* msg); /// 2012.05.09 - prodongi
|
|
|
|
private:
|
|
int m_nTabType;
|
|
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
|
|
// 차일드
|
|
SUISystemEnvironmentChild* m_pEnvironmentChild;
|
|
SUISystemPlayChild* m_pPlayChild;
|
|
SUISystemKeymappingChild* m_pKeymappingChild;
|
|
};
|
|
|
|
|
|
////////////////////////////////////////////////////////
|
|
//
|
|
// SUISystemEnvironmentChild
|
|
/// graphic
|
|
//////////////////////////////////////////////////////////
|
|
class SUISystemEnvironmentChild : public SUIWnd
|
|
{
|
|
public:
|
|
SUISystemEnvironmentChild( SGameManager* pGameManager )
|
|
: SUIWnd( pGameManager )
|
|
, m_pWnd( NULL )
|
|
{ }
|
|
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool bReload = false );
|
|
|
|
void UpdateOption();
|
|
void UpdateDef();
|
|
// 게임에 요청
|
|
void ApplyOption();
|
|
void ApplyCancel();
|
|
void SetSystemParent( SUISystemWnd* pWnd ) { m_pWnd = pWnd; };
|
|
|
|
private:
|
|
SUISystemWnd* m_pWnd;
|
|
SUISystemWnd* GetSystemParent() { return m_pWnd; };
|
|
|
|
void CheckControlEnable();
|
|
bool IsCustomMode() { return (m_optData.nPresetOption == 0) ? true : false; }
|
|
|
|
void UpdateControl( const _OPT_DATA & opt_data );
|
|
|
|
int GetCheckBoxValue( const char * pControlName );
|
|
void SetControlEnable( const char * pControlName, bool bEnable );
|
|
void SetControlEnableColor( const char * pControlName, const char* lpColor );
|
|
void SetControlDisableColor( const char * pControlName, const char* lpColor );
|
|
void SetComboBox( const char * pControlName, int nValue );
|
|
void SetCheckBox( const char * pControlName, int nValue );
|
|
void SetSlider( const char * pControlName, int nValue );
|
|
|
|
void InitControlText();
|
|
void InitStaticControlEnableOption();
|
|
void SetControlEnableWithColor( const char* lpControl, bool bEnable, const char* lpColor );
|
|
|
|
private:
|
|
|
|
_OPT_DATA m_optData; //
|
|
|
|
KHash< std::string, hashPr_string > m_hsControlText;
|
|
};
|
|
|
|
////////////////////////////////////////////////////////
|
|
//
|
|
// SUISystemPlayChild
|
|
/// sound
|
|
//////////////////////////////////////////////////////////
|
|
class SUISystemPlayChild : public SUIWnd
|
|
{
|
|
public:
|
|
SUISystemPlayChild( SGameManager* pGameManager )
|
|
: SUIWnd( pGameManager )
|
|
, m_nMinimapAlpha( -1 )
|
|
, m_bMinimapOpen( false )
|
|
{ }
|
|
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool bReload = false );
|
|
// 2010.05.20 - prodongi
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
public:
|
|
void UpdateOption();
|
|
void UpdateControl();
|
|
void UpdateDef();
|
|
// 게임에 요청
|
|
void ApplyOption();
|
|
void ApplyCancel();
|
|
private:
|
|
int GetCheckBoxValue( const char * pControlName );
|
|
void SetControlEnable( const char * pControlName, bool bEnable );
|
|
void SetControlEnableColor( const char * pControlName, const char* lpColor );
|
|
void SetControlDisableColor( const char * pControlName, const char* lpColor );
|
|
void SetComboBox( const char * pControlName, int nValue );
|
|
void SetCheckBox( const char * pControlName, int nValue );
|
|
void SetSlider( const char * pControlName, int nValue );
|
|
|
|
void SetMinimapAlpha( int nLevel );
|
|
void SetMinimapOpen();
|
|
|
|
// 업뎃
|
|
void RefreshValue( int nMode, int nLevel );
|
|
|
|
void InitStaticControlEnableOption();
|
|
void InitControlText();
|
|
void SetControlEnableWithColor( const char* lpControl, bool bEnable, const char* lpColor );
|
|
void UpdateSubCheckControl();
|
|
|
|
// 2010.05.19 서버에 투구 보이기 설정 요청- prodongi
|
|
void PendMessageHideEquipInfo(unsigned int flag, int show);
|
|
// 2010.05.20 - prodongi
|
|
void OnMsgHideEquipInfo(SIMSG_HIDE_EQUIP_INFO* hideEquipInfo);
|
|
|
|
private:
|
|
_OPT_DATA m_optData; //
|
|
|
|
int m_nMinimapAlpha;
|
|
bool m_bMinimapOpen;
|
|
|
|
KHash< std::string, hashPr_string > m_hsControlText;
|
|
};
|
|
|
|
|
|
//////////////////////////////////////////////////////////
|
|
////
|
|
// SUIKeymappingChild
|
|
/// interface
|
|
////////////////////////////////////////////////////////////
|
|
class SUISystemKeymappingChild : public SUIWnd
|
|
{
|
|
public:
|
|
SUISystemKeymappingChild( SGameManager* pGameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( pGameManager ),
|
|
m_pDisplayInfo(pDisplayInfo),
|
|
m_PrevTipTime(0),
|
|
m_TipLevel(999),
|
|
m_TipLifeTime(-1)
|
|
{
|
|
m_GameWorldKeymapping.Clear();
|
|
InitPrevKey();
|
|
}
|
|
virtual bool InitControls( KPoint kPos );
|
|
virtual bool InitData( bool bReload = false );
|
|
|
|
virtual DWORD OnMouseMessage(DWORD dwMessage, int x, int y);
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual void ProcMsgAtStatic( SGameMessage* pMsg );
|
|
void Process(DWORD dwTime);
|
|
|
|
public:
|
|
void UpdateOption();
|
|
void UpdateControl(int hotkeycode=-1);
|
|
void UpdateScrollControl();
|
|
void UpdateDef();
|
|
void UpdateRappelzDef();
|
|
|
|
void ApplyOption();
|
|
void ApplyCancel();
|
|
|
|
void UserSave();
|
|
void UserLoad();
|
|
void AllUndo();
|
|
|
|
private:
|
|
/** 출력할 팁을 설정한다.
|
|
level은 높을수록 tip출력의 우선권을 갖는다.
|
|
iLifeTiem == -1 이면 출력 시간에 제약을 받지 않는다.
|
|
szTip 이 NULL이면 해당 level의 tip을 해제한다. */
|
|
void SetTip(int level, const char *szTip, int lifetime = -1);
|
|
|
|
int SetHotkey(int hotkeycode, KEYEX &key, bool vailetest = true);
|
|
|
|
void RefreshKeyControl();
|
|
void QuickScroll(const char *str);
|
|
SGameWorldKeymapping m_GameWorldKeymapping;
|
|
|
|
int m_HighlightKeymappingNumber;
|
|
bool m_EnterChatMode;
|
|
|
|
SUIDisplayInfo* m_pDisplayInfo;
|
|
|
|
//SGameWorldKeymapping m_PrevKeymapping;
|
|
SGameWorldKeymapping m_DefKeymapping;
|
|
SGameWorldKeymapping m_PrevRappelzDefKeymapping;
|
|
|
|
std::string m_szTip;
|
|
int m_TipLifeTime;
|
|
int m_TipLevel;
|
|
int m_PrevTipTime;
|
|
|
|
void InitPrevKey();
|
|
std::string GetControlTextName(int nhotkeycode);
|
|
};
|
|
|
|
|
|
/*
|
|
//////////////////////////////////////////////////////////
|
|
////
|
|
//// SUISystemInterfaceChild
|
|
//// interface
|
|
////////////////////////////////////////////////////////////
|
|
class SUISystemInterfaceChild : public SUIWnd
|
|
{
|
|
public:
|
|
SUISystemInterfaceChild( SGameManager* pGameManager )
|
|
: SUIWnd( pGameManager ) { }
|
|
|
|
virtual void PumpUpMessage( LPCSTR lpszControlID, DWORD nMessage, DWORD lparam, DWORD wparam );
|
|
virtual bool InitControls( KPoint kPos );
|
|
|
|
public:
|
|
void UpdateOption();
|
|
// 게임에 요청
|
|
void ApplyOption();
|
|
void ApplyCancel();
|
|
private:
|
|
// 값 변경
|
|
void SetFaceCut( int nLevel );
|
|
void SetMinimap( int nLevel );
|
|
void SetZoom( int nLevel );
|
|
|
|
// 업뎃
|
|
void RefreshValue( int nMode, int nLevel );
|
|
|
|
void InitChattingChannel();
|
|
void InitUI();
|
|
|
|
private:
|
|
// 차후에 적용될 예정
|
|
int m_nFaceCut;
|
|
int m_nMinimap;
|
|
int m_nZoom;
|
|
};*/ |