void ModeMenuState::InjectKeyDown( const OIS::KeyEvent& evt ) { switch(evt.key) { case OIS::KC_W: case OIS::KC_UP: if (menuIndex>0) { menuIndex--; INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_MENU_MOVE,true); } break; case OIS::KC_S: case OIS::KC_DOWN: if (menuIndex<menuCount-1) { menuIndex++; INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_MENU_MOVE,true); } break; case OIS::KC_RETURN: if (menuArray[menuIndex].tag==GameMode::BOSSRUSH_MODE) { INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_MENU_INVALID_SELECTION_OR_ACTI,true); } else if (menuArray[menuIndex].tag==GameMode::RANK) { Removed(); INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_NEW_LINE_SHOWN,true); INSTANCE(GameStateManager)->menuState=MenuState::RANK_MENU_STATE; } else { Removed();//IMPORTANT: remove must before enter game. INSTANCE(AudioManager)->bgmMgr->stopAudio(AudioName::BGM_ORCHESTRAL_MENU); INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_MENUSTART,true); INSTANCE(GameStateManager)->ChangeGameState(GameState::GAME_PLAY_STATE,MenuState::PLAY_MENU_STATE,menuArray[menuIndex].tag); } break; case OIS::KC_ESCAPE: INSTANCE(GameStateManager)->menuState=MenuState::TITLE_MENU_STATE; INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_MENU_PREVIOUS_SCREEN,false); Removed(); default: break; } }
void SocialAccount::removeAccount() { //TODO: remove from storage layer StorageLayerInterface *storageLayer = (qobject_cast<SocialAccountsManager*> (parent()))->storageLayer(); if(storageLayer->removeAccount(m_id)) emit Removed(); }
void cceMaterialShaderEditorDialog::SetShader(cceMaterialShader *shader) { _shader = shader; connect (_shader, SIGNAL(Removed()), this, SLOT(ForceClose())); _proxyShader->SetCode(_shader->GetCode()); _proxyShader->UpdateBindings(); UpdateGUIFromShader(); }
SerialDevice::~SerialDevice() { Removed(); if (fDoneRead >= 0) delete_sem(fDoneRead); if (fDoneWrite >= 0) delete_sem(fDoneWrite); if (fBufferArea >= 0) delete_area(fBufferArea); }
void ModeMenuState::InjectButtonPressed( const OIS::JoyStickEvent &arg, int button ) { switch(button) { case 0: if (menuArray[menuIndex].tag==GameMode::BOSSRUSH_MODE) { INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_MENU_INVALID_SELECTION_OR_ACTI,true); } else if (menuArray[menuIndex].tag==GameMode::RANK) { Removed(); INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_NEW_LINE_SHOWN,true); INSTANCE(GameStateManager)->menuState=MenuState::RANK_MENU_STATE; } else { Removed(); INSTANCE(AudioManager)->bgmMgr->stopAudio(AudioName::BGM_ORCHESTRAL_MENU); INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_MENUSTART,true); INSTANCE(GameStateManager)->ChangeGameState(GameState::GAME_PLAY_STATE,MenuState::PLAY_MENU_STATE, menuArray[menuIndex].tag); } break; case 1: INSTANCE(GameStateManager)->menuState=MenuState::TITLE_MENU_STATE; INSTANCE(AudioManager)->soundMgr->playAudio(AudioName::SOUND_MENU_PREVIOUS_SCREEN,false); Removed(); default: break; } }
SerialDevice::~SerialDevice() { Removed(); if (fDoneRead >= B_OK) delete_sem(fDoneRead); if (fDoneWrite >= B_OK) delete_sem(fDoneWrite); if (fBufferArea >= B_OK) delete_area(fBufferArea); mutex_destroy(&fReadLock); mutex_destroy(&fWriteLock); }
NetworkManager::Connection::Connection(const QString &path, QObject *parent) : QObject(parent) , d_ptr(new ConnectionPrivate(path)) { Q_D(Connection); qDBusRegisterMetaType<NMVariantMapMap>(); QDBusReply<NMVariantMapMap> reply = d->iface.GetSettings(); if (reply.isValid()) { d->updateSettings(reply.value()); } else { d->updateSettings(); } d->path = path; //nmDebug() << m_connection; connect(&d->iface, SIGNAL(Updated()), this, SLOT(onConnectionUpdated())); connect(&d->iface, SIGNAL(Removed()), this, SLOT(onConnectionRemoved())); }
void EntitySystem::remove(Entity* e) { m_activities.remove(e); e->RemoveSystemBit(m_systemBit); Removed(e); };