LRESULT CDuiFrameWnd::HandleMessage( UINT uMsg, WPARAM wParam, LPARAM lParam ) { LRESULT lRes = __super::HandleMessage(uMsg, wParam, lParam); switch (uMsg) { HANDLE_MSG (*this, WM_DROPFILES, OnDropFiles); HANDLE_MSG (*this, WM_DISPLAYCHANGE, OnDisplayChange); HANDLE_MSG (*this, WM_GETMINMAXINFO, OnGetMinMaxInfo); case WM_USER_PLAYING: return OnPlaying(*this, wParam, lParam); case WM_USER_POS_CHANGED: return OnPosChanged(*this, wParam, lParam); case WM_USER_END_REACHED: return OnEndReached(*this, wParam, lParam); } return lRes; }
void QmitkIGTPlayerWidget::CreateConnections() { if ( m_Controls ) { connect( (QObject*)(m_Controls->selectPushButton), SIGNAL(clicked()), this, SLOT(OnSelectPressed()) ); // open file dialog connect( (QObject*)(m_Controls->playPushButton), SIGNAL(clicked(bool)), this, SLOT(OnPlayButtonClicked(bool)) ); // play button connect( (QObject*)(m_PlayingTimer), SIGNAL(timeout()), this, SLOT(OnPlaying()) ); // update timer connect( (QObject*) (m_Controls->beginPushButton), SIGNAL(clicked()), this, SLOT(OnGoToBegin()) ); // reset player and go to begin connect( (QObject*) (m_Controls->stopPushButton), SIGNAL(clicked()), this, SLOT(OnGoToEnd()) ); // reset player // pass this widgets protected combobox signal to public signal connect( (QObject*) (m_Controls->trajectorySelectComboBox), SIGNAL(currentIndexChanged(int)), this, SIGNAL(SignalCurrentTrajectoryChanged(int)) ); // pass this widgets protected checkbox signal to public signal connect( m_Controls->splineModeCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(SignalSplineModeToggled(bool)) ); connect( m_Controls->sequencialModeCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnSequencialModeToggled(bool)) ); connect( m_Controls->samplePositionHorizontalSlider, SIGNAL(sliderPressed()), this, SLOT(OnSliderPressed()) ); connect( m_Controls->samplePositionHorizontalSlider, SIGNAL(sliderReleased()), this, SLOT(OnSliderReleased()) ); } }
m_Controls->samplePositionHorizontalSlider->setVisible(false); this->ResetLCDNumbers(); // reset lcd numbers at start } QmitkIGTPlayerWidget::~QmitkIGTPlayerWidget() { m_PlayingTimer->stop(); delete m_Controls; } void QmitkIGTPlayerWidget::CreateConnections() { connect( (QObject*)(m_Controls->playPushButton), SIGNAL(clicked(bool)), this, SLOT(OnPlayButtonClicked(bool)) ); // play button connect( (QObject*)(m_PlayingTimer), SIGNAL(timeout()), this, SLOT(OnPlaying()) ); // update timer connect( (QObject*) (m_Controls->beginPushButton), SIGNAL(clicked()), this, SLOT(OnGoToBegin()) ); // reset player and go to begin connect( (QObject*) (m_Controls->stopPushButton), SIGNAL(clicked()), this, SLOT(OnGoToEnd()) ); // reset player // pass this widgets protected combobox signal to public signal connect( (QObject*) (m_Controls->trajectorySelectComboBox), SIGNAL(currentIndexChanged(int)), this, SIGNAL(SignalCurrentTrajectoryChanged(int)) ); // pass this widgets protected checkbox signal to public signal connect( m_Controls->splineModeCheckBox, SIGNAL(toggled(bool)), this, SIGNAL(SignalSplineModeToggled(bool)) ); //connect( m_Controls->sequencialModeCheckBox, SIGNAL(toggled(bool)), this, SLOT(OnSequencialModeToggled(bool)) ); connect( m_Controls->samplePositionHorizontalSlider, SIGNAL(sliderPressed()), this, SLOT(OnSliderPressed()) ); connect( m_Controls->samplePositionHorizontalSlider, SIGNAL(sliderReleased()), this, SLOT(OnSliderReleased()) ); connect( m_Controls->m_OpenFileButton, SIGNAL(clicked()), this, SLOT(OnOpenFileButtonPressed()) ); } bool QmitkIGTPlayerWidget::IsTrajectoryInSplineMode()
void CGame::Update(int deltaTime) { TutCheckCondition(deltaTime); _Character->_CS=idle; UpdateInput(deltaTime); int btn_id=_UI->IsTouched(); bool btnYES=false; bool btnCancel=false; if(btn_id>=0) { std::cout<<"Touched"<<std::endl; _SE->Play(3); if(btn_id==BTN_PAUSE&&_GS==GS_Playing) _GS=GS_Pause; else if(btn_id==BTN_PAUSE&&_GS==GS_Pause) _GS=GS_Playing; else if(btn_id==BTN_P_RETURN) _GS=GS_Playing; else if(btn_id==BTN_P_RESTART) _GS=GS_Restart; else if(btn_id==BTN_E_RESTART) { _GS=GS_Restart; std::cout<<"E_RS"<<std::endl;} else if(btn_id==BTN_E_RETURN) _GS=GS_Playing; else if(btn_id==BTN_P_MUSIC) _GS=GS_Playing; else if(btn_id==BTN_P_QUIT) _GS=GS_QUIT; else if(btn_id==BTN_V_YES) btnYES=true; else if(btn_id==BTN_V_CANCEL) btnCancel=true; //current_States=S3E_POINTER_STATE_UP; } if(_GS==GS_QUIT)//quit to lobby { _timeLevelCost=0; _GS=GS_QU_VERIF; } if(_GS==GS_Restart)//restart cur level { _timeLevelCost=0; _setEndingText=false; _levelFinish=false; _GS=GS_RS_VERIF; } if(_GS==GS_QU_VERIF) { if(btnYES) { if(_MapLevel.size()>0&&_currentLevel!=0) { delete _MapLevel[_MapLevel.size()-1]; _MapLevel.pop_back(); } _currentLevel=0; currentMap=_MapLevel[_currentLevel]; _Character->Init(currentMap->_StartPos); currentMap->SetCharacterIndex(_Character->m_Position); currentMap->Init(); _GS=GS_Playing; //current_States=S3E_POINTER_STATE_UP; } else if(btnCancel) { _GS=GS_Playing; } } if(_GS==GS_RS_VERIF) { if(btnYES) { _Character->Init(currentMap->_StartPos); currentMap->SetCharacterIndex(_Character->m_Position); currentMap->Init(); _GS=GS_Playing; //current_States=S3E_POINTER_STATE_UP; } else if(btnCancel) { _GS=GS_Playing; } } if(_GS==GS_Playing) { OnPlaying(deltaTime); } _Character->Update(deltaTime); PlayAudio(); // Update Iw Sound Manager IwGetSoundManager()->Update(); }