143 lines
3.7 KiB
C++
143 lines
3.7 KiB
C++
#include "SunClientPrecompiledHeader.h"
|
|
#ifdef _YJ_FISHING_SYSTEM_000933
|
|
#include "InterfaceManager.h"
|
|
#include "uiFishingShop/uiFishingShop.h"
|
|
|
|
#include "ShopDialog.h"
|
|
#include "uiFishingTrade/uiFishingTrade.h"
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
const DWORD c_FishingShopID = 63903;
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
WzID uiFishingShop::m_wzID[eDIALOG_FISHING_SHOP_MAX] =
|
|
{
|
|
StrToWzID("B001"), //eDIALOG_FISHING_SHOP_EXIT_BTN,
|
|
StrToWzID("BT00"), //eDIALOG_FISHING_SHOP_SHOP_BTN,
|
|
StrToWzID("B002"), //eDIALOG_FISHING_SHOP_TRADE_BTN,
|
|
};
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
uiFishingShop::uiFishingShop(InterfaceManager * pUIMan) : uiBase(pUIMan)
|
|
{
|
|
m_bShow = FALSE;
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
uiFishingShop::~uiFishingShop()
|
|
{
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
void uiFishingShop::Init(CDrawBase* pDrawBase)
|
|
{
|
|
uiBase::Init(pDrawBase);
|
|
m_bShow = FALSE;
|
|
|
|
InitControl();
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
void uiFishingShop::Release()
|
|
{
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
void uiFishingShop::OnUpdateSolarDialog()
|
|
{
|
|
if( ! m_bShow )
|
|
{
|
|
ShowDialog(FALSE);
|
|
}
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
void uiFishingShop::Process(DWORD dwTick)
|
|
{
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
void uiFishingShop::OnShowWindow(BOOL val)
|
|
{
|
|
if( val )
|
|
{
|
|
m_bShow = TRUE;
|
|
}
|
|
else
|
|
{
|
|
m_bShow = FALSE;
|
|
}
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
void uiFishingShop::MessageProc(SI_MESSAGE * pMessage)
|
|
{
|
|
switch ( pMessage->eResultMsg )
|
|
{
|
|
case RT_MSG_LBUTTONCLICK:
|
|
{
|
|
switch ( getControlIDToPos( pMessage->dwCtrlID ) )
|
|
{
|
|
case eDIALOG_FISHING_SHOP_EXIT_BTN:
|
|
{
|
|
OnShowWindow(FALSE);
|
|
}
|
|
break;
|
|
case eDIALOG_FISHING_SHOP_SHOP_BTN:
|
|
{
|
|
ShopDialog * pShopDlg = (ShopDialog *)g_InterfaceManager.GetDialog(InterfaceManager::DIALOG_SHOP);
|
|
if ( pShopDlg && !pShopDlg->IsVisibleWindow() )
|
|
{
|
|
pShopDlg->SetShopID( c_FishingShopID );
|
|
g_InterfaceManager.ShowDialog(InterfaceManager::DIALOG_SHOP, TRUE);
|
|
}
|
|
}
|
|
break;
|
|
case eDIALOG_FISHING_SHOP_TRADE_BTN:
|
|
{
|
|
uiFishingTrade* pFishingTrade = (uiFishingTrade*)g_InterfaceManager.GetDialog(InterfaceManager::DIALOG_FISHING_TRADE);
|
|
if(pFishingTrade)
|
|
{
|
|
pFishingTrade->ShowInterface(TRUE);
|
|
}
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
break;
|
|
|
|
}
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
void uiFishingShop::InitControl()
|
|
{
|
|
|
|
}
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
#endif //_YJ_FISHING_SYSTEM_000933
|