Add keyboard overlay preset, keyboard submenu, and osk_toggle hotkey. Use overlay caching for osk_toggle.
For now, keyboard menu has only preset path, auto-scale toggle, and opacity.
Related fixes:
- input_keyboard_event: Don't check hotkey binds when device is RETRO_DEVICE_POINTER
- Add input_keymaps_translate_rk_to_ascii() for correct character input to input_keyboard_event
- input_overlay_poll: Delay clearing INPUT_OVERLAY_BLOCKED flag until there is no overlay input (Avoids stray input after osk_toggle)
- Send keyboard events for modifiers before other keys (for correct modifier+key input if hitboxes overlap)
Adds overlay_cache_ptr to keep a disabled overlay in memory when it's expected to be shown again.
Most input_overlay_deinit calls are replaced with input_overlay_unload, which caches the overlay unless initing/deiniting core or disabling overlays.
Loading a cached overlay is done as a swap, intended for osk_toggle.
Related updates:
- Fewer parameters for the overlay loading task. Use current settings when enabling an overlay
- Add input_overlay_check_mouse_cursor() to preserve show/hide mouse behavior
- Don't apply input_overlay_show_mouse_cursor in windowed mode (controlled by mouse grab only)
- Remove some dead code
Allows stretching hitboxes and handling their overlap
reach_up, reach_down, reach_left, reach_right:
- Stretches in one direction:
reach_x, reach_y
- Stretches symmetrically
exclusive:
- If true, blocks input from overlapped hitboxes
range_mod_exclusive:
- Similar, but only applies when this hitbox is extended by range_mod
- After range_mod takes effect, has priority over 'exclusive'
E.g. This creates a D-Pad area and extends its hitbox left & right 50%, up 15%, and down 30%. Then applies range_mod_exclusive:
overlay0_desc0 = "dpad_area,0.15,0.57,rect,0.166228,0.295516"
overlay0_desc0_reach_x = 1.5
overlay0_desc0_reach_up = 1.15
overlay0_desc0_reach_down = 1.3
overlay0_desc0_range_mod = 2.0
overlay0_desc0_range_mod_exclusive = true
- New descriptors: 'dpad_area' and 'abxy_area'
- Each has a diagonal sensitivity setting, 100% being 8-way symmetry
- Buttons can be redefined in the cfg file
E.g. This would create a d-pad area, then redefine it to use analog directions:
overlay0_desc0 = "dpad_area,0.85,0.57,rect,0.166228,0.295516"
overlay0_desc0_up = "r_y_minus"
overlay0_desc0_down = "r_y_plus"
overlay0_desc0_left = "r_x_minus"
overlay0_desc0_right = "r_x_plus"