379 lines
16 KiB
C++
379 lines
16 KiB
C++
|
|
#include "stdafx.h"
|
|
#include "SUITaskBarWnd.h"
|
|
#include "SGameManager.h"
|
|
//#include "SGameMessageUI.h"
|
|
#include "SGameMessage.h"
|
|
#include "SGame.h"
|
|
#include "KUIControlButton.h"
|
|
#include "SStringDB.h"
|
|
#include "SGameWorld.h"
|
|
#include "SPetMgr.h"
|
|
#include "SGameOption.h" //servantes 2010.11.02
|
|
#include "SGameSystem.h"
|
|
|
|
extern SGameSystem* g_pCurrentGameSystem;
|
|
|
|
|
|
SUITaskBarWnd::SUITaskBarWnd( SGameManager* gameManager, SUIDisplayInfo* pDisplayInfo )
|
|
: SUIWnd( gameManager ),
|
|
m_PrevProcessTime(0),
|
|
m_PrevProcessTime2(0),
|
|
m_InstanceTaskbarEntranceWnd(NULL),
|
|
m_pDisplayInfo( pDisplayInfo )
|
|
{
|
|
}
|
|
|
|
SUITaskBarWnd::~SUITaskBarWnd()
|
|
{
|
|
}
|
|
|
|
SUIWnd* SUITaskBarWnd::CreateWnd( const char* szFile, KUIWndManager* pWndManager, KPoint kPos, int nWindowID )
|
|
{
|
|
SUIWnd::CreateWnd( szFile, pWndManager, kPos, nWindowID );
|
|
m_PrevProcessTime2 = 0;
|
|
|
|
return this;
|
|
}
|
|
|
|
|
|
void SUITaskBarWnd::Process( DWORD time )
|
|
{
|
|
if(m_PrevProcessTime == 0)
|
|
{
|
|
|
|
//m_pGameManager->PostMsgAtDynamic( SMSG_WEATHER_INFO() );
|
|
SGame* pGame( m_pGameManager->GetActiveGame() );
|
|
|
|
if( pGame )
|
|
{
|
|
if(pGame->GetGameType() == GAME_TYPE_WORLD )
|
|
SetWeather(((SGameWorld*)pGame)->GetWeather());
|
|
}
|
|
}
|
|
|
|
if(m_PrevProcessTime==0 || time - m_PrevProcessTime> 30000) // 30초마다..
|
|
{
|
|
SYSTEMTIME stSystemTime;
|
|
GetLocalTime( &stSystemTime );
|
|
|
|
TCHAR szTime[ 50 ], szAMPM[ 50 ];
|
|
memset(szTime, NULL, 50);
|
|
memset(szAMPM, NULL, 50);
|
|
|
|
wsprintf(szAMPM, "<size:9><#736257><left><vcenter>%s", stSystemTime.wHour < 12 ? "AM" : "PM" );
|
|
|
|
wsprintf(szTime, "<size:9><#736257><right><vcenter>%d:%02d",
|
|
stSystemTime.wHour > 12 ? stSystemTime.wHour-12 : (stSystemTime.wHour==0 ? 12 : stSystemTime.wHour),
|
|
stSystemTime.wMinute );
|
|
|
|
SetChildCaption( "static_taskbar_ampm", szAMPM );
|
|
SetChildCaption( "static_taskbar_time", szTime );
|
|
|
|
m_PrevProcessTime = time;
|
|
}
|
|
|
|
//SGameAvatarEx* pLocalPlayer = GetLocalPlayer();
|
|
//pLocalPlayer->GetPosition();
|
|
//위치를 직접 얻을까 했지만 그냥 warp msg로 하자.
|
|
|
|
|
|
SUIWnd::Process( time );
|
|
}
|
|
|
|
bool SUITaskBarWnd::InitControls( KPoint pos )
|
|
{
|
|
KUIControl* cashShop = dynamicCast<KUIControl*>(GetChild( "button_common_quick_khroo" ));
|
|
KUIControl* petCommand = dynamicCast<KUIControl*>(GetChild( "button_common_quick_pet" ));
|
|
if( cashShop ) { cashShop->SetShow( false ); }
|
|
if( petCommand ) { petCommand->SetShow( false ); }
|
|
|
|
|
|
return SUIWnd::InitControls( pos );
|
|
}
|
|
|
|
void SUITaskBarWnd::SetChildToolTip()
|
|
{
|
|
|
|
KUIControl* cashShop = dynamicCast<KUIControl*>(GetChild( "button_common_quick_khroo" ));
|
|
KUIControl* petCommand = dynamicCast<KUIControl*>(GetChild( "button_common_quick_pet" ));
|
|
KUIControl* inventory = dynamicCast<KUIControl*>(GetChild( "button_common_quick_inventory" ));
|
|
KUIControl* skill = dynamicCast<KUIControl*>(GetChild( "button_common_quick_skill" ));
|
|
KUIControl* character = dynamicCast<KUIControl*>(GetChild( "button_common_quick_character" ));
|
|
KUIControl* creatureFormation = dynamicCast<KUIControl*>(GetChild( "button_common_quick_creature_edit" ));
|
|
KUIControl* creatureSkill = dynamicCast<KUIControl*>(GetChild( "button_common_quick_creature_skill" ));
|
|
KUIControl* creatureControl = dynamicCast<KUIControl*>(GetChild( "button_common_quick_creature" ));
|
|
KUIControl* guildControl = dynamicCast<KUIControl*>(GetChild( "button_common_quick_guild_01" )); // 길드.
|
|
KUIControl* messenger = dynamicCast<KUIControl*>(GetChild( "button_common_quick_messenger" ));
|
|
KUIControl* quest = dynamicCast<KUIControl*>(GetChild( "button_common_quick_quest" ));
|
|
KUIControl* handling = dynamicCast<KUIControl*>(GetChild( "button_common_quick_handling" ));
|
|
KUIControl* worldMap = dynamicCast<KUIControl*>(GetChild( "button_common_quick_worldmap" ));
|
|
KUIControl* help = dynamicCast<KUIControl*>(GetChild( "button_common_quick_help" ));
|
|
KUIControl* userkey = dynamicCast<KUIControl*>(GetChild( "button_common_quick_keymapping" ));
|
|
KUIControl* title = dynamicCast<KUIControl*>(GetChild( "button_common_quick_title_01" ));
|
|
|
|
//sz
|
|
//sz = GetGameKeymapping().GetHotKeyStringInfo2(HOTKEYCODE::CROWSHOP) + "";
|
|
std::string sz;
|
|
|
|
if( cashShop ) { sz = "<hcenter><#898989> "; sz += S(6673); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::CROWSHOP); cashShop->SetTooltip(sz.c_str()); }
|
|
if( petCommand ) { sz = "<hcenter><#898989> "; sz += S(6674);/* sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo2(HOTKEYCODE::); */petCommand->SetTooltip(sz.c_str());}
|
|
if( inventory ) { sz = "<hcenter><#898989> "; sz += S(6675); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::INVENTORY);inventory->SetTooltip(sz.c_str());}
|
|
if( skill ) { sz = "<hcenter><#898989> "; sz += S(6676); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::SKILL);skill->SetTooltip(sz.c_str()); }
|
|
if( character ) { sz = "<hcenter><#898989> "; sz += S(6677); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::CHARACTER);character->SetTooltip(sz.c_str()); }
|
|
if( creatureFormation ) { sz = "<hcenter><#898989> "; sz += S(6678); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::CREATUREFORMATION);creatureFormation->SetTooltip(sz.c_str()); }
|
|
if( creatureSkill ) { sz = "<hcenter><#898989> "; sz += S(6679); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::CREATURESKILL);creatureSkill->SetTooltip(sz.c_str()); }
|
|
if( creatureControl ) { sz = "<hcenter><#898989> "; sz += S(6680); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::CREATUREINFO);creatureControl->SetTooltip(sz.c_str()); }
|
|
if( guildControl ) { sz = "<hcenter><#898989> "; sz += S(6682); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::GUILD);guildControl->SetTooltip(sz.c_str()); }
|
|
if( messenger ) { sz = "<hcenter><#898989> "; sz += S(6681); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::MESSENGER);messenger->SetTooltip(sz.c_str()); }
|
|
if( quest ) { sz = "<hcenter><#898989> "; sz += S(6683); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::QUEST);quest->SetTooltip(sz.c_str()); }
|
|
if( handling ) { sz = "<hcenter><#898989> "; sz += S(6685); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::CONTROL);handling->SetTooltip(sz.c_str()); }
|
|
if( worldMap ) { sz = "<hcenter><#898989> "; sz += S(6684); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::WOLRDMAP);worldMap->SetTooltip(sz.c_str()); }
|
|
if( help ) { sz = "<hcenter><#898989> "; sz += S(6686); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::HELP);help->SetTooltip(sz.c_str()); }
|
|
if (userkey) { sz = "<hcenter><#898989>"; sz += S(2354); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::OPTION);userkey->SetTooltip(sz.c_str()); } /// 2012.05.09 - prodongi
|
|
if( title ) { sz = "<hcenter><#898989> "; sz += S(690000014); sz = sz + "<br>" + GetGameKeymapping().GetHotKeyStringInfo(HOTKEYCODE::TITLE);title->SetTooltip(sz.c_str()); } // 2012. 6. 7 - marine 호칭
|
|
|
|
}
|
|
|
|
bool SUITaskBarWnd::InitData( bool reload )
|
|
{
|
|
|
|
|
|
return SUIWnd::InitData( reload );
|
|
}
|
|
|
|
void* SUITaskBarWnd::Perform( KID id, KArg& msg )
|
|
{
|
|
return SUIWnd::Perform( id, msg );
|
|
}
|
|
|
|
void SUITaskBarWnd::PumpUpMessage( LPCTSTR controlID, DWORD msg, DWORD lparam, DWORD wparam )
|
|
{
|
|
switch( msg )
|
|
{
|
|
case KUI_MESSAGE::KBUTTON_CLICK:
|
|
{
|
|
m_pGameManager->StartSound( "ui_click_menu01.wav" );
|
|
|
|
if( 0 == ::_stricmp( "button_common_quick_character" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CHARINFO ) );
|
|
else if( 0 == ::_stricmp( "button_common_quick_help" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SMSG_SEND_DATA( "toggle_help" ) );
|
|
else if( 0 == ::_stricmp( "button_common_quick_skill" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SKILL ) );
|
|
else if( 0 == ::_stricmp( "button_common_quick_inventory" , controlID ) )
|
|
{
|
|
//servantes 2010.11.02
|
|
SUIWnd* pWnd = m_pGameManager->GetSUI( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY );
|
|
if(pWnd == NULL)
|
|
return ;
|
|
|
|
if(pWnd->IsShow() == false)
|
|
{
|
|
bool bOpenEquipWndFlag = GetGameOption().GetOpenEquipWnd();
|
|
if(bOpenEquipWndFlag)
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_EQUIPMENT, true ) ); // 장비창.
|
|
}
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, true ) ); // 인벤토리.
|
|
}
|
|
else
|
|
{
|
|
bool bOpenEquipWndFlag = GetGameOption().GetOpenEquipWnd();
|
|
if(bOpenEquipWndFlag)
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_EQUIPMENT, false ) ); // 장비창.
|
|
}
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY, false ) ); // 인벤토리.
|
|
}
|
|
|
|
// m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_EQUIPMENT ) ); // 장비창.
|
|
// m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY ) ); // 인벤토리.
|
|
}
|
|
else if( 0 == ::_stricmp( "button_common_quick_worldmap" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_WORLDMAP ) );
|
|
else if( 0 == ::_stricmp( "button_common_quick_creature" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATURE ) );
|
|
|
|
else if( 0 == ::_stricmp( "button_common_quick_guild_01" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_GUILD_MAINWND) ); // bintitle.
|
|
else if( 0 == ::_stricmp( "button_common_quick_title_01" , controlID ) )
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_TITLE_WND_OPEN() );
|
|
else if( 0 == ::_stricmp( "button_common_quick_handling" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_MOTION ) );
|
|
else if( 0 == ::_stricmp( "button_common_quick_keymapping" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_UI_SEND_DATA(SIMSG_TOGGLE_UIWINDOW::UIWINDOW_SYSTEM, "openWithKeyMapping"));
|
|
else if( 0 == ::_stricmp( "button_common_quick_creature_skill" , controlID ) )
|
|
{
|
|
if( !m_pGameManager->IsUIWindowOpened( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATURE_SKILL ) )
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATURE, true ) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATURE_PAGE, false ) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATURE_SKILL, true ) );
|
|
}
|
|
else
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATURE_PAGE, false ) );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATURE_SKILL, false ) );
|
|
}
|
|
}
|
|
else if( 0 == ::_stricmp( "button_common_quick_messenger" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_COMMUNITY ) );
|
|
else if( 0 == ::_stricmp( "button_common_quick_quest" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_QUEST_LIST ) );
|
|
else if( 0 == ::_stricmp( "button_common_quick_creature_edit" , controlID ) )
|
|
{
|
|
if( !m_pGameManager->IsUIWindowOpened( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATUREFORM ) ) // 크리처 편성창
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SMSG_SEND_DATA( "req_summon_formation" ) );
|
|
}
|
|
else
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CREATUREFORM, false ) ); // 크리처 편성창
|
|
}
|
|
}
|
|
else if( 0 == ::_stricmp( "button_common_quick_khroo" , controlID ) )
|
|
{
|
|
if( m_pGameManager )
|
|
{
|
|
//인벤토리
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_SHOW_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INVENTORY , true) );
|
|
|
|
if( ENV().IsExist( "commercial_shop" ) == true )
|
|
{
|
|
//캐쉬창고
|
|
m_pGameManager->PostMsgAtDynamic( new SMSG_CHAT_COMMAND(SMSG_CHAT_COMMAND::CHAT_CASHSTORAGE_OPEN) );
|
|
|
|
//쿠르샵 오픈
|
|
if( !m_pGameManager->IsShow( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_CASH_TITLE ) &&
|
|
!m_pGameManager->IsShow( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_GUILD_TITLE ) &&
|
|
!m_pGameManager->IsShow( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_HELP_TITLE ) &&
|
|
!m_pGameManager->IsShow( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_POPURL_TITLE ) )
|
|
{
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_REQ_OPEN_MSGBOX( SIMSG_REQ_OPEN_MSGBOX::MSGBOX_CASHSHOP_OPEN, S(944), true ) );
|
|
}
|
|
//한번에 열기
|
|
// m_pGameMng->PostMsgAtDynamic( new SMSG_CHAT_COMMAND( SMSG_CHAT_COMMAND::CHAT_CASHSHOP_OPEN ) );
|
|
}
|
|
}
|
|
}
|
|
else if( 0 == ::_stricmp( "button_common_quick_pet" , controlID ) ) m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_PET_COMMAND ) );
|
|
/// 2011.05.26 안쓰임 - prodongi
|
|
/*
|
|
else if( 0 == ::_stricmp( "button_quick_entrance_warrecord_01" , controlID ) )
|
|
{
|
|
//MSG_INSTANCE_GAME_SCORE_REQUEST
|
|
m_pGameManager->PostMsgAtDynamic( new SMSG_INSTANCE_GAME_SCORE_REQUEST() );
|
|
m_pGameManager->PostMsgAtDynamic( new SIMSG_TOGGLE_UIWINDOW( SIMSG_TOGGLE_UIWINDOW::UIWINDOW_INSTANCE_WARRECORD ) );
|
|
}
|
|
*/
|
|
}
|
|
break;
|
|
}
|
|
|
|
SUIWnd::PumpUpMessage( controlID, msg, lparam, wparam );
|
|
}
|
|
|
|
void SUITaskBarWnd::SetWeather(unsigned short u)
|
|
{
|
|
KUIWnd *wnd = GetChild("static_taskbar_pane_weather");
|
|
if(wnd)
|
|
{
|
|
switch(u)
|
|
{
|
|
case SMSG_WEATHER_INFO::CLEAR:
|
|
wnd->SetAniName("static_weather_fine");
|
|
break;
|
|
|
|
case SMSG_WEATHER_INFO::CLOUDY:
|
|
wnd->SetAniName("static_weather_cloudy");
|
|
break;
|
|
|
|
case SMSG_WEATHER_INFO::DRIZZLINGLY:
|
|
case SMSG_WEATHER_INFO::RAINY:
|
|
wnd->SetAniName("static_weather_rain");
|
|
break;
|
|
|
|
case SMSG_WEATHER_INFO::FOGGY:
|
|
wnd->SetAniName("static_weather_fog");
|
|
break;
|
|
|
|
case SMSG_WEATHER_INFO::SNOWY:
|
|
wnd->SetAniName("static_weather_snow");
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
|
|
void SUITaskBarWnd::ProcMsgAtStatic( SGameMessage* msg )
|
|
{
|
|
switch( msg->nType )
|
|
{
|
|
case IMSG_UI_SEND_DATA:
|
|
{
|
|
SIMSG_UI_SEND_DATA* pData = (SIMSG_UI_SEND_DATA*)msg;
|
|
if (pData->m_strString == "gold")
|
|
{
|
|
__int64 nGold = ((SIMSG_UI_SEND_DATA*)msg)->m_nNumber.getAmount();
|
|
|
|
std::string strString = "";
|
|
if (nGold >= 1000000000000) strString += "<#FF0000>"; //rouge
|
|
else if (nGold >= 100000000000) strString += "<#FF00F3>"; //violet
|
|
else if (nGold >= 10000000000) strString += "<#FF1493>"; //rose
|
|
else if (nGold >= 1000000000) strString += "<#00FFFC>"; //bleu
|
|
else if (nGold >= 100000000) strString += "<#FF8C00>"; //orange
|
|
else if (nGold >= 10000000) strString += "<#FFFF00>"; //jaune
|
|
else if (nGold >= 1000000) strString += "<#4AD55D>"; //vert
|
|
|
|
std::string strGold = "<size:9>";
|
|
strGold += strString;
|
|
strGold += "<right><vcenter>"; //strGold += S(6425);
|
|
strGold += CStringUtil::GetCommaNumberString(nGold);
|
|
SetChildCaption("static_money_value", strGold.c_str());
|
|
}
|
|
}
|
|
break;
|
|
|
|
case MSG_ADD_PET_INFO:
|
|
case MSG_REMOVE_PET_INFO:
|
|
{
|
|
KUIControlSimpleButton* petCommandButton = dynamicCast<KUIControlSimpleButton*>(GetChild( "button_common_quick_pet" ));
|
|
if( !petCommandButton )
|
|
break;
|
|
petCommandButton->SetShow( !m_PetMgr.IsEmpty() );
|
|
}
|
|
break;
|
|
case MSG_WEATHER_INFO:
|
|
{
|
|
SMSG_WEATHER_INFO* pWeatherInfo = (SMSG_WEATHER_INFO*)msg;
|
|
|
|
SGame* pGame( m_pGameManager->GetActiveGame() );
|
|
if( pGame )
|
|
{
|
|
if(pGame->GetGameType() == GAME_TYPE_WORLD )
|
|
{
|
|
if( pWeatherInfo->region_id == ((SGameWorld*)pGame)->GetWorldID())
|
|
SetWeather(pWeatherInfo->weather_id);
|
|
}
|
|
}
|
|
}
|
|
break;
|
|
case IMSG_SET_KEYMAPPING:
|
|
{
|
|
SetChildToolTip();
|
|
}
|
|
break;
|
|
}
|
|
}
|
|
|
|
void SUITaskBarWnd::OnNotifyUIWindowOpen( bool open, bool limitWnd )
|
|
{
|
|
if( open )
|
|
{
|
|
KUIControl* cashShop = dynamicCast<KUIControl*>(GetChild( "button_common_quick_khroo" ));
|
|
if( cashShop )
|
|
cashShop->SetShow( ENV().IsExist( "commercial_shop" ) );
|
|
}
|
|
}
|
|
|
|
DWORD SUITaskBarWnd::OnMouseMessage( DWORD msg, int x, int y )
|
|
{
|
|
DWORD ret = SUIWnd::OnMouseMessage( msg, x, y );
|
|
|
|
if( KMR_NO_GET & ret )
|
|
return ret;
|
|
|
|
// do something ...
|
|
|
|
return ret;
|
|
} |