Commit b56f9074 authored by fallenstardust's avatar fallenstardust

添加设置、消息记录按钮事件

parent b3a07c20
...@@ -170,6 +170,7 @@ void DeckBuilder::Terminate() { ...@@ -170,6 +170,7 @@ void DeckBuilder::Terminate() {
mainGame->wInfos->setVisible(false); mainGame->wInfos->setVisible(false);
mainGame->btnLeaveGame->setVisible(false); mainGame->btnLeaveGame->setVisible(false);
mainGame->wPallet->setVisible(false); mainGame->wPallet->setVisible(false);
mainGame->wSettings->setVisible(false);
mainGame->PopupElement(mainGame->wMainMenu); mainGame->PopupElement(mainGame->wMainMenu);
mainGame->device->setEventReceiver(&mainGame->menuHandler); mainGame->device->setEventReceiver(&mainGame->menuHandler);
mainGame->wACMessage->setVisible(false); mainGame->wACMessage->setVisible(false);
...@@ -316,6 +317,21 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) { ...@@ -316,6 +317,21 @@ bool DeckBuilder::OnEvent(const irr::SEvent& event) {
mainGame->ShowElement(mainGame->wSettings); mainGame->ShowElement(mainGame->wSettings);
break; break;
} }
case BUTTON_CLOSE_SETTINGS: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
mainGame->HideElement(mainGame->wSettings);
break;
}
case BUTTON_SHOW_LOG: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
mainGame->ShowElement(mainGame->wLogs);
break;
}
case BUTTON_CLOSE_LOG: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
mainGame->HideElement(mainGame->wLogs);
break;
}
case BUTTON_EFFECT_FILTER: { case BUTTON_EFFECT_FILTER: {
mainGame->PopupElement(mainGame->wCategories); mainGame->PopupElement(mainGame->wCategories);
break; break;
......
...@@ -167,6 +167,21 @@ bool ClientField::OnEvent(const irr::SEvent& event) { ...@@ -167,6 +167,21 @@ bool ClientField::OnEvent(const irr::SEvent& event) {
mainGame->ShowElement(mainGame->wSettings); mainGame->ShowElement(mainGame->wSettings);
break; break;
} }
case BUTTON_CLOSE_SETTINGS: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
mainGame->HideElement(mainGame->wSettings);
break;
}
case BUTTON_SHOW_LOG: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
mainGame->ShowElement(mainGame->wLogs);
break;
}
case BUTTON_CLOSE_LOG: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
mainGame->HideElement(mainGame->wLogs);
break;
}
case BUTTON_BGM: { case BUTTON_BGM: {
mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON); mainGame->soundManager->PlaySoundEffect(SoundManager::SFX::BUTTON);
if (mainGame->gameConf.enable_music) { if (mainGame->gameConf.enable_music) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment