void HallMainWidget::onPageButtonClicked(CCNode *node,void *data)
{
    SoundMgr::getInstance()->playEffect(SoundEnum::BTN_EFFECT_NORMAL);
    
    int page = *(int*)data;
    if(page == m_currPage)
        return;
    if(m_currPage == -1){
        m_currPage = page;
        enablePage(m_currPage);
        return;
    }
    BasNodeAction *moveOut = m_pages[m_currPage]->m_page->getMoveoutAction();
    BasNodeAction *moveIn = m_pages[page]->m_page->getMoveinAction();
    if(moveOut && moveIn){
        if(m_currPage <  page){
            moveOut->setMoveOutType(uilib::HorizontalLeftOut);
            moveIn->setMoveInType(uilib::HorizontalRightIn);
        }else{
            moveOut->setMoveOutType(uilib::HorizontalRightOut);
            moveIn->setMoveInType(uilib::HorizontalLeftIn);
        }
    }
    disablePage(m_currPage);
    m_currPage = page;
    enablePage(m_currPage);
}
Пример #2
0
void procEnableMem(int pid){
	int i;

	/* La memoria del init no se habilita */
	if(pid == INIT_PROCESS)
		return;

	for (i = 0 ; i < proc[pid%MAX_PROCESS].usedstackPages ; i++)
		enablePage((unsigned int)proc[pid%MAX_PROCESS].stackPages[i]);

	for (i = 0 ; i < proc[pid%MAX_PROCESS].usedheapPages ; i++)
		enablePage((unsigned int)proc[pid%MAX_PROCESS].heapPages[i]);

	return;
}
Пример #3
0
void KMPropertyPage::slotEnable(bool on)
{
	QWidget	*w = (QWidget*)(sender());
	if (on)
		enablePage(w);
	else
		disablePage(w);
}