From 4ddd26fe21edba8e7df65b12d721e9bed579e6e4 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Fri, 12 Apr 2024 02:49:15 +1000 Subject: Initial touch input support: * Feed mouse/pen/touch pointer events through UI input manager with Win32 and SDL. * Started migrating UI code to use new API and reworking mouse/touch interaction. * emu/render.cpp: Support pressing multiple clickable layout items simultaneously. * emu/render.cpp: Allow UI elements to be drawn in any window. * emu/rendlay.cpp, luaengine_render.cpp: Added layout view events for pointer input. * ui/ui.cpp: Allow the UI handler to control pointer display. * ui/analogipt.cpp: Added mouse/touch and more keys for navigating field state list. * ui/menu.cpp: Use vertical swipe to scroll and horizontal swipe to adjust. * ui/menu.cpp: Draw after processing input - greatly improves responsiveness. * ui/menu.cpp: Ignore keyboard/gamepad input during pointer actions. * ui/selmenu.cpp: Made left/right info pane arrows repeat when held. * ui/selmenu.cpp: Use middle click to move keyboard focus. * ui/selmenu.cpp: Let filter list scroll if it's too tall, and use a bit of horizontal padding. * ui/selmenu.cpp: Improved divider sizing. * ui/state.cpp: Don't allow clicks to pass through the confirm deletion prompt to the menu. * ui/simpleselgame.cpp: Fixed error message display and graphics/sound status not showing. * ui/simpleselgame.cpp: Allow tap/click to dismiss error message. * ui/utils.cpp: Show UI for choice filters when there are no choices - it's less confusing. * modules/input/input_sdl.cpp: Made scaling for mouse scroll better match RawInput and DirectInput. * modules/input/input_rawinput.cpp: Added support for horizontal scroll axis. * modules/input/input_win32.cpp: Added support for scroll axes and more buttons to mouse/lightgun. * modules/debugger/debugimgui.cpp: Don't fight over events with the UI manager - it breaks menus. * osd/windows/window.cpp: Translate mouse position to window cooridinates for scroll wheel events. * osd/sdl/window.cpp: Supply last mouse position for scroll wheel events if possible. * scripts/build/complay.py: Made zero input mask an error - it was only being used to block clicks. --- docs/source/usingmame/ui.rst | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) (limited to 'docs/source/usingmame/ui.rst') diff --git a/docs/source/usingmame/ui.rst b/docs/source/usingmame/ui.rst index 60bb55618a2..94c7eba413d 100644 --- a/docs/source/usingmame/ui.rst +++ b/docs/source/usingmame/ui.rst @@ -136,9 +136,9 @@ pointing device: * Click menu items to highlight them. * Double-click menu items to select them. * Click the left- or right-pointing triangle to adjust settings. -* For menus with too many items to fit on the screen, click the upward- or - downward-pointing triangle at the top or bottom to scroll up or down by one - screen at a time. +* For menus or text boxes with too many items or lines to fit on the screen, + press on the upward- or downward-pointing triangle at the top or bottom to + scroll up or down. * Use vertical scrolling gestures to scroll menus or text boxes with too many items or lines to fit on the screen. * Click toolbar items to select them, or hover over them to see a description. @@ -148,6 +148,28 @@ combinations to the **Show/Hide Menu**, **Pause**, **UI Back** and/or **UI Cancel** inputs to make it possible to use MAME without a keyboard. +.. _ui-menus-touch: + +Using a touch screen +~~~~~~~~~~~~~~~~~~~~ + +MAME has basic support for navigating menus using a touch screen: + +* Tap menu items to highlight them. +* Double-tap menu items to select them. +* Swipe left or right (horizontally) on the highlighted menu item to adjust the + setting if applicable. +* Swipe up or down (vertically) to scroll menus or text boxes with too many + items to fit on the screen. +* For menus or text boxes with too many items or lines to fit on the screen, + press on the upward- or downward-pointing triangle at the top or bottom to + scroll up or down. + +Note that for SDL-based MAME, the +:ref:`enable_touch ` option must be switched on +to use touch screen support. + + .. _ui-inptcfg: Configuring inputs @@ -493,6 +515,8 @@ or info source with left/right. When focus is on the info/image tabs, left/right switch between tabs. When focus is on the image/info tabs or source, you can scroll the info using up, down, page up, page down, home and end. +You can move focus to an area by clicking on it with the middle mouse button. + .. _ui-simpleselmenu: -- cgit v1.2.3-70-g09d2