void Cocos2dWidget::timerEvent(QTimerEvent *evt){ Q_UNUSED(evt); if(evt->timerId()==cocosTimerId) { updateDraw(); } }
/* * 修改触发报警位置 */ void CRuleRetrogradation::OnSelchangeRule8CmbTriggerpos() { // TODO: Add your control notification handler code here if (m_pRule) { m_pRule->nTriggerPosition = 1; m_pRule->bTriggerPosition[0] = m_cmbTriggerPos.GetCurSel(); updateDraw(); } }
void CAPageControl::updateCurrentPageDisplay() { for (int i=0; i<m_numberOfPages; i++) { CAImageView* view = m_pIndicators.at(i); if (i == m_currentPage) { view->setImage(m_pSelectPageImage); view->setColor(m_currentPageIndicatorTintColor); } else { view->setImage(m_pPageImage); view->setColor(m_pageIndicatorTintColor); } } updateDraw(); }
void stage::onIdle() { //Update body positions for(int i=0;i<numBodyTypes;i++) { myBodies.at(i)->updateMVP(myCamera->view, myCamera->projection); } m_mvp = (myCamera->projection)*(myCamera->view); //Bind shader program glUseProgram(shader_program); //Draw Again updateDraw(); //Unbind shader glUseProgram(0); }
//================================================// // //================================================// GameScene::GameScene(int width, int height, QGraphicsView *parent) :QGraphicsScene(parent) ,maxRenderLen(15) ,gView(parent) ,inSence(false) { setSceneRect(0,0,width,height); initGame(); lastTime=QTime::currentTime(); saveTime=lastTime; QTimer *timer=new QTimer; timer->setInterval(10); connect(timer,SIGNAL(timeout()),this,SLOT(update())); connect(timer,SIGNAL(timeout()),camera,SLOT(cMove())); connect(timer,SIGNAL(timeout()),world,SLOT(updateDraw()),Qt::DirectConnection); //在主线程中执行 connect(timer,SIGNAL(timeout()),this,SLOT(mouseMove())); connect(timer,SIGNAL(timeout()),this,SLOT(handleGameMessage())); connect(timer,SIGNAL(timeout()),this,SLOT(autoSave())); // timer->start(); }