コード例 #1
0
ファイル: creditsScene.cpp プロジェクト: sangdaekim/greetings
void CreditScene::update(float) {
  if (_buttons.empty())
      return;
  if(_trigged) {
      if (Graphics::getInstance()->isBlack()) {
	  (*_cursor)->GET_CMP(ButtonCmp)->execute();
      }
      return;
  }
  auto playerInputCmp = Scene::getPlayerInput()->GET_CMP(InputCmp);
  if (checkConfirmButton(playerInputCmp->_isJump)){
      Graphics::getInstance()->fadeOut(1.5f);
      _trigged = true;
  } else if (checkUpButton(playerInputCmp->_isUp)) {
	  _darker();
	  if (_cursor == _buttons.begin()) {
		  _cursor = --(_buttons.end());
	  } else {
		  --_cursor;
	  }
	  _brighter();
  } else if (checkDownButton(playerInputCmp->_isDown)) {
	  _darker();
	  ++_cursor;
	  if (_cursor == _buttons.end()) {
		  _cursor = _buttons.begin();
	  }
	  _brighter();
  }
}
コード例 #2
0
void FmFileDialogPrivate::_q_handlePathChanged( const QString &path )
{
    if( path.isEmpty() ) {
        mCurrentPathLabel->setPlainText( QString( FmPlaceholderString ) );
    } else {
        mCurrentPathLabel->setPlainText( path );
    }
    
    if( mFileNameLineEdit && mArgs.mDialogMode == GetFileMode ) {
        mFileNameLineEdit->setText( QString() );
    }

    checkUpButton();
    checkBottomFileWidget();
    checkActions();
}