diff options
| author | 2024-04-12 02:49:15 +1000 | |
|---|---|---|
| committer | 2024-04-12 02:49:15 +1000 | |
| commit | 4ddd26fe21edba8e7df65b12d721e9bed579e6e4 (patch) | |
| tree | e1452c7d52a51fcefdf83a686f585c53ce10f5c0 /scripts | |
| parent | 78ef444ea6b639336b174e8e47d782a016ae6ae7 (diff) | |
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.
Diffstat (limited to 'scripts')
| -rwxr-xr-x | scripts/build/complay.py | 21 | ||||
| -rw-r--r-- | scripts/src/osd/modules.lua | 1 | ||||
| -rw-r--r-- | scripts/src/osd/windows_cfg.lua | 2 |
3 files changed, 17 insertions, 7 deletions
diff --git a/scripts/build/complay.py b/scripts/build/complay.py index 475806c0e65..f0e330240a1 100755 --- a/scripts/build/complay.py +++ b/scripts/build/complay.py @@ -174,6 +174,17 @@ class LayoutChecker(Minifyer): self.handle_error('Element %s attribute %s "%s" is not a number' % (name, key, val)) return None + def check_bool_attribute(self, name, attrs, key, default): + if key not in attrs: + return default + val = attrs[key] + if self.VARPATTERN.match(val): + return None + elif val in self.YESNO: + return 'yes' == val + self.handle_error('Element %s attribute %s "%s" is not "yes" or "no"' % (name, key, val)) + return None + def check_parameter(self, attrs): if 'name' not in attrs: self.handle_error('Element param missing attribute name') @@ -253,8 +264,7 @@ class LayoutChecker(Minifyer): if self.check_int_attribute('orientation', attrs, 'rotate', 0) not in self.ORIENTATIONS: self.handle_error('Element orientation attribute rotate "%s" is unsupported' % (attrs['rotate'], )) for name in ('swapxy', 'flipx', 'flipy'): - if (attrs.get(name, 'no') not in self.YESNO) and (not self.VARPATTERN.match(attrs[name])): - self.handle_error('Element orientation attribute %s "%s" is not "yes" or "no"' % (name, attrs[name])) + self.check_bool_attribute('orientation', attrs, name, None) def check_color(self, attrs): self.check_color_channel(attrs, 'red') @@ -324,8 +334,8 @@ class LayoutChecker(Minifyer): self.handle_error('Element %s has inputraw attribute without inputtag attribute' % (name, )) inputmask = self.check_int_attribute(name, attrs, 'inputmask', None) if (inputmask is not None) and (not inputmask): - if (inputraw is None) or (not inputraw): - self.handle_error('Element %s attribute inputmask "%s" is zero' % (name, attrs['inputmask'])) + self.handle_error('Element %s attribute inputmask "%s" is zero' % (name, attrs['inputmask'])) + self.check_bool_attribute(name, attrs, 'clickthrough', None) def startViewItem(self, name): self.handlers.append((self.viewItemStartHandler, self.viewItemEndHandler)) @@ -676,8 +686,7 @@ class LayoutChecker(Minifyer): else: have_scroll[-1] = self.format_location() self.check_float_attribute(name, attrs, 'size', 1.0) - if (attrs.get('wrap', 'no') not in self.YESNO) and (not self.VARPATTERN.match(attrs['wrap'])): - self.handle_error('Element %s attribute wrap "%s" is not "yes" or "no"' % (name, attrs['wrap'])) + self.check_bool_attribute(name, attrs, 'wrap', False) if 'inputtag' in attrs: if 'name' in attrs: self.handle_error('Element %s has both attribute inputtag and attribute name' % (name, )) diff --git a/scripts/src/osd/modules.lua b/scripts/src/osd/modules.lua index 43cb768704d..db5e57ea570 100644 --- a/scripts/src/osd/modules.lua +++ b/scripts/src/osd/modules.lua @@ -63,6 +63,7 @@ function osdmodulesbuild() MAME_DIR .. "src/osd/interface/midiport.h", MAME_DIR .. "src/osd/interface/nethandler.cpp", MAME_DIR .. "src/osd/interface/nethandler.h", + MAME_DIR .. "src/osd/interface/uievents.h", MAME_DIR .. "src/osd/modules/debugger/debug_module.h", MAME_DIR .. "src/osd/modules/debugger/debuggdbstub.cpp", MAME_DIR .. "src/osd/modules/debugger/debugimgui.cpp", diff --git a/scripts/src/osd/windows_cfg.lua b/scripts/src/osd/windows_cfg.lua index 01d441c2214..85b0cd810f3 100644 --- a/scripts/src/osd/windows_cfg.lua +++ b/scripts/src/osd/windows_cfg.lua @@ -33,7 +33,7 @@ if _OPTIONS["MODERN_WIN_API"]=="1" then } else defines { - "_WIN32_WINNT=0x0600", + "_WIN32_WINNT=0x0602", "NTDDI_VERSION=0x06000000", } end |
