1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2024-11-22 21:52:46 +00:00

Pause menu background dimming

This commit is contained in:
dawnDus 2022-01-25 19:35:41 -05:00
parent 698d694c43
commit b7f226b322
No known key found for this signature in database
GPG key ID: 972AABDE81848F21
2 changed files with 10 additions and 1 deletions

View file

@ -94,7 +94,12 @@ impl PauseMenu {
self.controller.update(state, ctx)?;
self.controller.update_trigger();
// Shortcut for quick restart
if ctx.keyboard_context.is_key_pressed(ScanCode::F2) {
state.sound_manager.stop_sfx(40);
state.sound_manager.stop_sfx(41);
state.sound_manager.stop_sfx(58);
state.sound_manager.play_song(0, &state.constants, &state.settings, ctx)?;
state.load_or_start_game(ctx)?;
}
@ -108,6 +113,10 @@ impl PauseMenu {
}
}
MenuSelectionResult::Selected(1, _) => {
state.sound_manager.stop_sfx(40);
state.sound_manager.stop_sfx(41);
state.sound_manager.stop_sfx(58);
state.sound_manager.play_song(0, &state.constants, &state.settings, ctx)?;
state.load_or_start_game(ctx)?;
}
MenuSelectionResult::Selected(2, _) => {

View file

@ -1748,7 +1748,7 @@ impl Scene for GameScene {
self.tilemap.set_prev()?;
self.inventory_dim += 0.1
* if state.textscript_vm.mode == ScriptMode::Inventory {
* if state.textscript_vm.mode == ScriptMode::Inventory || self.pause_menu.is_paused() {
state.frame_time as f32
} else {
-(state.frame_time as f32)