예제 #1
0
파일: Menu.cpp 프로젝트: icebreaker/Gwen
void Menu::OnHoverItem( Gwen::Controls::Base* pControl )
{
	if ( !ShouldHoverOpenMenu() ) return;

	MenuItem* pItem = gwen_cast<MenuItem>(pControl);
	if (!pItem) return;
	if ( pItem->IsMenuOpen() ) return;

	CloseAll();
	pItem->OpenMenu();
}
예제 #2
0
파일: Menu.cpp 프로젝트: icebreaker/Gwen
bool Menu::IsMenuOpen()
{
	for ( Base::List::iterator it = m_InnerPanel->Children.begin(); it != m_InnerPanel->Children.end(); ++it )
	{
		Base* pChild = *it;
		MenuItem* pItem = gwen_cast<MenuItem>(pChild);
		if ( !pItem ) continue;

		if ( pItem->IsMenuOpen() )
			return true;
	}

	return false;
}