From d6a591092b883da799ea3aff7d0258b8dd490d29 Mon Sep 17 00:00:00 2001 From: biroder <107300789+biroder@users.noreply.github.com> Date: Tue, 28 Mar 2023 10:46:47 +0300 Subject: [PATCH] Android changing volume fix and improvement --- src/menu/mod.rs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/menu/mod.rs b/src/menu/mod.rs index faf0c26..a15830b 100644 --- a/src/menu/mod.rs +++ b/src/menu/mod.rs @@ -594,6 +594,22 @@ impl Menu { graphics::draw_rect(ctx, bar_rect, Color::new(1.0, 1.0, 1.0, 1.0))?; } + + + state + .font + .builder() + .x(self.x as f32 - 25.0) + .y(y) + .shadow(true) + .draw("<", ctx, &state.constants, &mut state.texture_set)?; + state + .font + .builder() + .x((self.x + self.width as isize) as f32 + 15.0) + .y(y) + .shadow(true) + .draw(">", ctx, &state.constants, &mut state.texture_set)?; } MenuEntry::NewSave => { state.font.builder().position(self.x as f32 + 20.0, y).draw( @@ -829,6 +845,7 @@ impl Menu { || state.touch_controls.consume_click_in(left_entry_bounds) => { state.sound_manager.play_sfx(1); + self.selected = idx.clone(); return MenuSelectionResult::Left(self.selected.clone(), entry, -1); } MenuEntry::Options(_, _, _) | MenuEntry::OptionsBar(_, _) @@ -836,6 +853,7 @@ impl Menu { || state.touch_controls.consume_click_in(right_entry_bounds) => { state.sound_manager.play_sfx(1); + self.selected = idx.clone(); return MenuSelectionResult::Right(self.selected.clone(), entry, 1); } MenuEntry::DescriptiveOptions(_, _, _, _)