path: root/src/frontend/mame/ui/inputmap.h
Commit message (Collapse)AuthorAgeFilesLines
* Moved localised I/O port name lookup into I/O port manager. Vas Crabb7 hours1-1/+1
| | | | | | | | | | | | | | Added pseudo format specifiers to controller port names: %p for player and %% for literal percent symbol. This lets you get the localised player identifier in overridden input names (see NES and Neo-Geo for examples), and reduces the number of messages to translate. For translators, the new messages are mostly previously existing messages with wording adjusted for clarity (e.g. referring to "media" rather than "ROMs" in several places, as things like disk and tape images are included). It's also possible to localise the "???" dipslayed for an input without a valid name, but that should never actually appear in practice.
* -frontend: Refactored menu event handling and fixed a number of issues. (#8777) Vas Crabb2021-10-311-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Moved common code for drawing about box, info viewer, and other text box menus to a base class; removed the last of the info viewer logic and the multi-line item hack from the base menu class. * Added previous/next group navigation for general inputs and plugin input selection menus. * Moved message catalog logic to lib/util, allowing osd and emu to use localised messages. * Made the base menu class use the UI manager’s feature for holding session state rather than a static map and mutex. * Improved menu event handling model, and fixed many issues, particularly with menus behaving badly when hidden/shown. * Added better support for menus that don’t participate in the usual menu stack, like the menuless sliders and the save/load state menus. * Made a number of menus refresh state when being shown after being hidden (fixes MT08121 among other issues). * Fixed indication of mounted slot option in the slot option details menu. * Improved appearance of background menus when emulation isn't running - draw all menus in the stack, and darken the background menus to make the edges of the active menu clearer. * Fixed locale issues in -listxml. -debugger: Made GUI debuggers more uniform. * Added new memory view features to Win32 debugger. * Fixed spelling of hexadecimal in Cocoa debugger and added decimal address option. * Fixed duplicate keyboard shortcut in Cocoa debugger (Shift-Cmd-D was both new device window and 64-bit float format). * Made keyboard shortcuts slightly more consistent across debuggers. -plugins: Moved input selection menu and sequence polling code to a common library. Fixed the issue that prevented keyboard inputs being mapped with -steadykey on. -docs: Started adding some documentation for MAME's internal UI, and updated the list of example front-ends. -Regenerated message catalog sources. For translators, the new strings are mostly: * The names of the inputs provided by the OS-dependent layer for things like fullscreen and video features. These show up in the user interface inputs menu. * The names for automatically generated views. These show up in the video options menu - test with a system with a lot of screens to see more variants. * The input macro plugin UI. * A few format strings for analog input assignments. * A few strings for the about box header.
* Bug fixes and usablility enhancements: Vas Crabb2021-01-291-0/+2
| | | | | | * Declare intent when requesting virtual memory (for NetBSD, 7712) * Improve scrolling behaviour in Qt debugger (MT07795) * Added prompts to input mapping menu to make it less intimidating
* ui/inputmap: prevent race condition between ui_input().pressed() and poll() hap2021-01-271-0/+1
* -Lua cleanup and documentation migration checkpoint. Vas Crabb2020-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | * Cleaned up some more of the Lua inteface. Mostly replacing methods with properties, some consistency fixes, a few renames, some more exposed functionality, and a couple of properties that have no business being set from scripts made read-only. * Moved a lot more Lua documentation out of source comments into the documentation, and expanded on it in the process. * Got more UI code out of the input manager. * Changed input sequence poller to a polymorphic class where you specify your intention upfront. * Changed the cheat plugin to use UI Clear to clear hotkey assignments and leave them unchanged if the user starts assignment but doesn't press any switches. * Ported AJR's fix for over-eager double-click recognition from SDL to Windows OSD. -goldnpkr.cpp: Cleaned up inputs, using standard keyout and payout types and key assignments.
* -emu/natkeyboard.cpp: Allow keyboard devices to be enabled/disabled. Vas Crabb2020-10-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This fixes the "typing on all keyboards at once" issue. You can now enable and disable keyboard/keypad inputs per device in the Keyboard Mode menu. Default is to enable the first device with keyboard inputs, and all device with keypad inputs but no keyboard inputs. The settings are saved in the CFG file for the machine. Typing in natural keyboard mode only ever types on one keyboard at a time, but now you can control which keyboard it types on, as it will be the first enabled keyboard. You can easily try this out with something like: mame64d zorba -rs232 terminal cpm -ui/inputmap.cpp: Show device descriptions as well as tag paths. -mac128.cpp: Fixed mouse axis wrap compensation, cleaned up mouse code, eliminated static variables for mouse input state. You could see the issue with wrap detection easily enough just by running mac128k/mac512k/macplus and tapping the arrow keys to move the mouse one pixel at a time. As you moved past the point where the axis count wrapped, it would move one pixel in the opposite direction. There were two function static variables related to mouse input state, probably still lurking from when the code was initially made to use a driver state class. This obviously messes with save states and prevents multiple instances. - bus/a2bus/mouse.cpp: Fixed mouse axis wrap compensation. This device had the same bug with wrap compensation as mac128k.cpp.
* UI input menu: treat codes containing a postive and negative of the same ↵ Vas Crabb2019-11-211-1/+1
| | | | | | | | thing as invalid (e.g. A S not A) ioport.cpp: * better than 50% reduction in compile time, and better locality for static data * better encapsulation, const correctness and noexcept usage
* UI input mapping menu updates: Vas Crabb2019-11-211-6/+13
| | | | | | | | | | | | | | | | | | | | | | * When a switch-type input is selected, show feedback when it's pressed * If an invalid code is entered (e.g. only negatives) abandon the change rather than cycling default/none * If an invalid code is entered display a message until the user takes some other action input.cpp updates: * constexpr crusade on input_code and input_seq and some very slight optimisation to input_seq * seq_poll* is a frontend function and had no business being in the core, so it's a utility class now * seq_poll* now exposes a bit more detail, enabling improved interaction on the UI inputs menu * global state is reduced a little, but the poll_* functions are still members of the input manager with global state (nw) The Lua engine has been updated in a way that maintains source compatibility with existing Lua scripts. This is less than ideal, but it minimises impact. Ideally someone (possibly me) will be able to expose the input sequence poller helper properly. I tested the changes with the cheat and autofire plugins and I was able to assign sequences. However I found two issues: it's seems impossible to assign a more complex sequence than a single key/button in the autofire plugin (i.e. no AND or NOT conditions, I confirmed this is pre-existing, not a regression), and in both the cheat and autofire plugins I found it a bit unwieldy trying to enter a complex sequence without live feedback of the sequence as it's built (this was also applicable to MAME's own input mapping menu until I added the live display yesterday).
* UI: when modifying an input mapping, only cycle default/none if UI_CANCEL is ↵ Vas Crabb2019-11-201-0/+1
| | | | | | | | | | | | | | the first thing pressed (nw) It's annoying that if you accidentally start to change an input, there's no way to back out at all. You need to press something before it will do anything. Also, if you go to add an additional "or" combination and press the wrong thing, you can't back out just the change - hitting UI_CANCEL takes you back to the default. This at least partially addresses it: if you hit UI_SELECT to modify an input then hit UI_CANCEL immediately, it will cycle default/none; however if you press any other input first and then hit UI_CANCEL, it will just back out the change. The implementation is a bit whacky at the moment, but doing better would require another emu.h change which I don't want to do right now.
* UI show feedback when configuring an input to give the user more of an idea ↵ Vas Crabb2019-11-201-5/+6
| | | | of what's going on
* get rid of some pointless members of input mapping menu (nw) Vas Crabb2019-11-171-2/+0
* UI cleanup: Vas Crabb2019-11-171-14/+17
| | | | | * Make input mapping menus more efficient - most of the properties of a field won't change * Get rid of the pool allocator in base menu class - it was encouraging bad design
* UI updates: Vas Crabb2019-11-171-47/+0
| | | | | | * Made DIP switch display scale with UI font and improved layout * Improved analog control display giving an indication of neutral position * Fixed menu heading sizes not being recalculated after font is changed
* Display emulated analog input values on the anaolg controls menu screen Vas Crabb2019-11-161-29/+2
* Distinguish DIP switches that belong to different devices but have the same ↵ AJR2019-08-311-2/+3
| | | | name in UI menu. This is most likely to occur when multiple instances of the same device type are configured on bus slots.
* Improve sorting of items for machine input menu. Inputs of the same type are ↵ AJR2019-05-241-3/+3
| | | | sorted by name, and keyboard keys are sorted by their assigned character codes (if any).
* ui/inputmap.cpp: Eliminate qsort (nw) AJR2018-12-281-2/+0
* UI input map fixes AJR2017-03-311-1/+1
| | | | | - Fix a longstanding bug that prevented binding several ORed buttons to any input belonging to a non-root device. - Fix a visual glitch when assigning inputs to analog sequences.
* A round of spelling/typographical fixes to source comments (nw) Scott Stone2016-11-241-1/+1
* Encapsulate a bit more of the menu base class to control when layout changes ↵ Vas Crabb2016-11-231-7/+7
| | | | can happen
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-7/+7
| | | | | Use standard uint64_t, uint32_t, uint16_t or uint8_t instead of UINT64, UINT32, UINT16 or UINT8 also use standard int64_t, int32_t, int16_t or int8_t instead of INT64, INT32, INT16 or INT8
* Parenthesize optional items in input menus AJR2016-10-131-0/+1
* UI refactoring: [Vas Crabb] Vas Crabb2016-07-101-19/+27
| | | | | | | | | * std::bind - accept no substitutes * pointer -> reference conversion * make more menu members private or protected * don't play so fast and loose with integer types * reduce some vector copying * make more static constants const
* Revert "C++ comments for some parts." Vas Crabb2016-07-051-12/+12
| | | | This reverts commit 19c4764090d1c5131945d11737de8a3bb421b9aa.
* C++ comments for some parts. dankan18902016-07-041-12/+12
| | | | | Increased use of the specifier auto. Some code cleanups.
* Cleanup and version bumpmame0175 Miodrag Milanovic2016-06-291-1/+0
* ui refactoring [Vas Crabb] Vas Crabb2016-05-271-29/+46
| | | | | | | * move menu classes into ::ui namesapce * reduce scope of many symbols (first step in making UI code less rage-inducing so I can fix text input)
* Relieve UI menus and such from having to constantly fetch UI object from ↵ AJR2016-04-261-8/+8
| | | | global state (nw)
* Machine management cleanups AJR2016-04-251-2/+0
| | | | | | - Boolean parameter to running_machine::run is no longer firstrun (which is now a member variable of mame_machine_manager) but quiet, which disables logging and audio recording without explicitly checking the system name. - Sound recording is now turned on and off by explicit calls. The potential uses of this have not been explored. - Dependencies reduced on drivenum.h, where the declaration for GAME_NAME(___empty) has been moved to.
* Split UI and frontend part from core [Miodrag Milanovic] Miodrag Milanovic2016-04-231-0/+155