📄 partymemberdlg.cpp
字号:
// PartyMemberDlg.cpp: implementation of the CPartyMemberDlg class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "PartyMemberDlg.h"
#include "PartyManager.h"
#include "GameIn.h"
#include "WindowIDEnum.h"
#include "./Interface/cPushupButton.h"
#include "./ObjectGuagen.h"
#include "./Interface/cStatic.h"
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
DWORD PMD_LOGIN_BASICCOLOR = RGBA_MAKE(255,255,255,255);
DWORD PMD_LOGIN_OVERCOLOR = RGBA_MAKE(255,255,255,255);
DWORD PMD_LOGIN_PRESSCOLOR = RGBA_MAKE(255,234,0,255);
DWORD PMD_LOGOUT_BASICCOLOR = RGBA_MAKE(172,182,199,255);
DWORD PMD_LOGOUT_OVERCOLOR = RGBA_MAKE(172,182,199,255);
DWORD PMD_LOGOUT_PRESSCOLOR = RGBA_MAKE(255,234,0,255);
CPartyMemberDlg::CPartyMemberDlg()
{
m_MemberID = 0;
m_bRealActive = FALSE;
m_bSetTopOnActive = FALSE; //KES眠啊
}
CPartyMemberDlg::~CPartyMemberDlg()
{
}
void CPartyMemberDlg::SetActive(BOOL val)
{
if( m_bDisable ) return;
m_bRealActive = val;
if(m_MemberID == 0)
val = FALSE;
cDialog::SetActive(val);
}
void CPartyMemberDlg::Linking(int i)
{
m_pName = (cPushupButton *)GetWindowForID(PA_MEMBER1NAME+i);
m_pLife = (CObjectGuagen *)GetWindowForID(PA_GUAGEMEMBER1LIFE+i);
m_pNaeryuk = (CObjectGuagen *)GetWindowForID(PA_GUAGEMEMBER1NAERYUK+i);
m_pLevel = (cStatic *)GetWindowForID(PA_MEMBER1LEVEL+i);
}
void CPartyMemberDlg::SetMemberData(PARTY_MEMBER* pInfo)
{
if(pInfo == NULL)
{
m_MemberID = 0;
}
else
{
char buf[10];
sprintf(buf, "Lv.%d", pInfo->Level);
m_MemberID = pInfo->dwMemberID;
if(pInfo->bLogged)
{
m_pName->SetText(pInfo->Name, PMD_LOGIN_BASICCOLOR, PMD_LOGIN_OVERCOLOR, PMD_LOGIN_PRESSCOLOR);
m_pLife->SetValue(pInfo->LifePercent*0.01f, 0);
m_pNaeryuk->SetValue(pInfo->NaeRyukPercent*0.01f, 0);
m_pLevel->SetStaticText(buf);
}
else
{
m_pName->SetText(pInfo->Name, PMD_LOGOUT_BASICCOLOR, PMD_LOGOUT_OVERCOLOR, PMD_LOGOUT_PRESSCOLOR);
m_pLife->SetValue(0, 0);
m_pNaeryuk->SetValue(0, 0);
m_pLevel->SetStaticText("");
}
}
SetActive(m_bRealActive);
}
DWORD CPartyMemberDlg::ActionEvent(CMouse * mouseInfo)
{
DWORD we = WE_NULL;
if( !m_bActive ) return we;
we = cDialog::ActionEvent(mouseInfo);
if(we & WE_LBTNCLICK)
{
GAMEIN->GetPartyDialog()->SetClickedMemberID(m_MemberID);
}
return we;
}
void CPartyMemberDlg::SetNameBtnPushUp(BOOL val)
{
m_pName->SetPush(val);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -