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:
parent
698d694c43
commit
b7f226b322
|
@ -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, _) => {
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue