Repository: doukutsu-rs/doukutsu-rs (language: rust)

Issue:
Inventory with many items overflows on Android
When you have many items in your inventory, the inventory box overflows, and the message box will be drawn on top of it, ~~making it impossible to interact with the 4th row of the inventory~~ (you can actually interact with the items because of how we draw touch points).

![image](https://user-images.githubusercontent.com/20266711/215291438-f67f75fc-614d-4808-a6a7-3870ba892ca5.png)

Reported by Kirbmeistergeneral on Discord.
Can't change music and sound effect's volume
(Edit: Actually, i figured it out. I just need to press right or left, outside of the menu box. I wish there was some indication though, like an arrow or something.
I can't change the sound effevts volume though, since the cursor just refuses to go there. I can only change the Music's volume since it's the default option when entering the sound options)

I can't change the volume from both the music and sound effects in the sound options.

The cursor doesn't even go to the options, it's like it isn't there. 

I'm using the android port, version 0.99.0 beta 4



Discussion / hints:

Fix patch:
diff --git a/src/framework/backend_glutin.rs b/src/framework/backend_glutin.rs
index 80ab2c00..02ce4fbb 100644
--- a/src/framework/backend_glutin.rs
+++ b/src/framework/backend_glutin.rs
@@ -133,7 +133,11 @@ fn get_insets() -> GameResult<(f32, f32, f32, f32)> {
         vm_env.get_int_array_region(field, 0, &mut elements)?;
 
         vm_env.delete_local_ref(JObject::from_raw(field));
-
+        
+        //Game always runs with horizontal orientation so top and bottom cutouts not needed and only wastes piece of the screen
+        elements[1] = 0;
+        elements[3] = 0;
+        
         Ok((elements[0] as f32, elements[1] as f32, elements[2] as f32, elements[3] as f32))
     }
 }
diff --git a/src/menu/mod.rs b/src/menu/mod.rs
index faf0c265..0495ae9e 100644
--- a/src/menu/mod.rs
+++ b/src/menu/mod.rs
@@ -594,6 +594,24 @@ impl<T: std::cmp::PartialEq + std::default::Default + Clone> Menu<T> {
 
                         graphics::draw_rect(ctx, bar_rect, Color::new(1.0, 1.0, 1.0, 1.0))?;
                     }
+                    
+                    #[cfg(target_os = "android")]
+                    {
+                        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 +847,7 @@ impl<T: std::cmp::PartialEq + std::default::Default + Clone> Menu<T> {
                         || 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 +855,7 @@ impl<T: std::cmp::PartialEq + std::default::Default + Clone> Menu<T> {
                         || 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(_, _, _, _)


Test patch: