mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-11-30 16:18:00 +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(state, ctx)?;
|
||||||
self.controller.update_trigger();
|
self.controller.update_trigger();
|
||||||
|
|
||||||
|
// Shortcut for quick restart
|
||||||
if ctx.keyboard_context.is_key_pressed(ScanCode::F2) {
|
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)?;
|
state.load_or_start_game(ctx)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -108,6 +113,10 @@ impl PauseMenu {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MenuSelectionResult::Selected(1, _) => {
|
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)?;
|
state.load_or_start_game(ctx)?;
|
||||||
}
|
}
|
||||||
MenuSelectionResult::Selected(2, _) => {
|
MenuSelectionResult::Selected(2, _) => {
|
||||||
|
|
|
||||||
|
|
@ -1748,7 +1748,7 @@ impl Scene for GameScene {
|
||||||
self.tilemap.set_prev()?;
|
self.tilemap.set_prev()?;
|
||||||
|
|
||||||
self.inventory_dim += 0.1
|
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
|
state.frame_time as f32
|
||||||
} else {
|
} else {
|
||||||
-(state.frame_time as f32)
|
-(state.frame_time as f32)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue