Ejemplo n.º 1
0
int XSceneEquip::OnSelectItem(XWnd *pWnd, DWORD p1, DWORD p2)
{
	if (p2 == 100)
	{
		//여기는 아이템 탈착하는부분
		if (p1 == 0)
		{
			auto spParam = std::shared_ptr<xSPM_EQUIP>( new xSPM_EQUIP() );
			spParam->idxParts = m_BaseParam.idxParts;
			spParam->snHero = m_BaseParam.snHero;
			DoExit(XGAME::xSC_UNIT_ORG, spParam);
			return 1;
		}
		GAMESVR_SOCKET->SendReqEqiupItem(this, m_pHero->GetsnHero(), p1, 0);
		return 1;
	}
	if (m_pSelectItem)
		m_pSelectItem->SetbSelected( false );
	m_pSelectItem = SafeCast<XWndStoragyItemElem*, XWnd*>(pWnd->Find(p2));
	m_pSelectItem->SetbSelected( true );
	m_pSelectItem->SetbGlowAnimation( true );
	UpdateItemInfo();
	SetbUpdate( true );
	return 1;
}
void CMyTreeView::UpdateChildren(HTREEITEM hParent,LPITEMIDLIST pidlParent)
{
	HTREEITEM hChild;
	TVITEMEX tvItem;
	LPITEMIDLIST pidl = NULL;
	BOOL bRes;

	hChild = TreeView_GetChild(m_hTreeView,hParent);

	if(hChild != NULL)
	{
		tvItem.mask		= TVIF_PARAM;
		tvItem.hItem	= hChild;
		bRes = TreeView_GetItem(m_hTreeView,&tvItem);

		if(bRes)
		{
			pidl = UpdateItemInfo(pidlParent,(int)tvItem.lParam);

			UpdateChildren(hChild,pidl);

			while((hChild = TreeView_GetNextItem(m_hTreeView,hChild,TVGN_NEXT)) != NULL)
			{
				tvItem.mask		= TVIF_PARAM;
				tvItem.hItem	= hChild;
				bRes = TreeView_GetItem(m_hTreeView,&tvItem);

				if(bRes)
				{
					pidl = UpdateItemInfo(pidlParent,(int)tvItem.lParam);

					UpdateChildren(hChild,pidl);
				}
			}
		}
	}
}
Ejemplo n.º 3
0
void XSceneEquip::Update()
{
	UpdateItemInfo();
	XSceneBase::Update();
}