summaryrefslogtreecommitdiffstatshomepage
path: root/src/frontend/mame/ui/submenu.cpp
Commit message (Collapse)AuthorAgeFilesLines
* frontend: Cleaned up rendering of info views. Vas Crabb23 hours1-2/+2
| | | | | | | | | | | | | | | | | | | | | | Put the description for systems in the info box - it's useful for the fruit machines with very long names that are truncated in the list. Also stopped truncating manufactuer and parent name in the info box. Made the text layout class capable of handling lines containing combinatations of left/centre/right-justified text and got rid of the legacy UI manager text wrapping function. Made the system/software selection menus and the info viewer share the same code for formatting info text. This means the multi-column layout works properly in the info viewer now, and the code is a lot simpler. Also the system/software selection menus don't have to redo the text layout every frame now. Made the info viewer update the text layout if the output aspect ratio changes, and cleaned up more legacy code. The lines in the info viewer are no longer bogus "menu items", and there's a lot less special-case code to support it in the base menu class. This commit includes an update to the Chinese translations from YuiFAN.
* More user experience improvements: Vas Crabb4 days1-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | frontend: Allow clicking the adjuster arrows on menu items. This allows things like video options and DIP switches to be configured using a mouse only. Also fixed a bug preventing paging menus with a mouse if the first item scrolled off the bottom is not selectable. debugger: Allow wplist and bplist to accept a CPU argument to list breakpoints/watchpoints for a single CPU only. debugger: Fixed some corner cases in address space syntax in memory accesses, and allowed memory region accesses to use tags relative to the visible CPU. emu/softlist.cpp: Ignore notes elements when loading software lists. It's effectively a comment that isn't a comment syntactically, it's being used for things that are not useful to display in the internal UI, and it slows down startup. docs: Updated three more pages of debugger documentation. Also updated more of the built-in debugger help. minimaws: Fixed up schema for software list notes, made sofware list notes display initially collapsed.
* More UI enhancements/cleanup: Vas Crabb6 days1-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Made the headings in the info viewer clickable, so you can switch between DATs with a mouse or trackball (or maybe a lightgun if that's your thing). Made the UI red/yellow/green traffic light status colours less dirty-looking. The "yellow" is more of an amber-brown than a cat puke brown now, and red is brighter. The contrast with white text is definitely fine for red and green, but it's reduced a bit for yellow. However there's a limit to how dark you can make a yellow or orange colour before it looks muddy. Reduced the number of places the UI uses red for things that aren't errors. The error colour should be used sparingly, for actual errors. Improved the colour swatch display in the RGBA colour editor. It now has black/white underlay so alpha effects are move obvious. Also fixed a bug preventing the channels being run down to zero. Fixed double-clicking configure machine causing MAME to exit from the system selection menu. Also slightly adjusted the colours of the toolbar buttons again.
* Overdue internal UI enhancements (#8674) Vas Crabb9 days1-83/+83
| | | | | | | | | | | | | | | | * frontend: Added support for message context to localisations. * frontend: Added string_view versions of the message lookup functions. * frontend: Added a few more folder options to the internal UI. * emu/softlist.cpp: Use more appropriate containers. * Switched to Python 3 by default - this will become a requirement. * Updated msgfmt.py for message context support. * frontend: Show all software item info in the internal UI. * frontend: Search alternate titles in software selection menu. * 3rdparty/utf8proc: Updated to v2.6.1 (has several fixes). * frontend: Added software filters for common info fields. * frontend: Allow UI manager to hold onto persistent session data. * frontend: Cache software lists for eight machines. * frontend: Added support for loading localised system names. * frontend: Add UI for selecting localised system names.
* -ui: Added option to mute when unthrottled to advanced options menu. Vas Crabb2021-03-221-97/+109
| | | | * Also refactored slightly to avoid some initialisations before main.
* ui: Clean up slider callbacks AJR2021-01-271-0/+6
|
* C++17 string handling updates (without charconv so as not to break GCC 7) AJR2020-12-081-3/+3
| | | | | | - render.cpp, rendlay.cpp, ui/ui.cpp, ui/menu.cpp: Change argument types for text processing functions from const char * to std::string_view - ui/menu.cpp: Add overloads of item_append omitting the frequently empty subtext argument - cheat.cpp: Remove some c_str() calls that became unnecessary a while ago
* frontend: Added option to skip repeated imperfect emulation warnings. Vas Crabb2020-09-021-1/+2
| | | | | | | | | | | | | | | | The option is called skip_warnings, and it must be set in ui.ini (it can be set using the internal UI). Red warnings cannot be skipped; yellow warning can be skipped under certain circumstances. For a yellow warning to be skipped, the system must have been launched in a way that allows warnings to be displayed, in a configuration with the same set of devices flagged with unemulated/imperfect features, within the last seven days, and the warning must have been displayed within the past 14 days. Also fixed a bug with display of the MACHINE_NO_COCKTAIL flag in the internal UI, and increased the size of XML integer attributes to 64 bits.
* Revert "ui: allow to skip warning popup at start" Vas Crabb2020-07-101-67/+66
| | | | | | | | | | | | | | | This reverts commit 74f456df945cd1720dc4d6bc105f64c13e62ced8. I will allow the feature with the following conditions: * No skipping red warnings. * A key-value map of device shortnames and yellow warnings must be stored in the .cfg file, along with a timestamp of the last time the system was run and the last time a warning was shown. * On starting a system, the map of device shortnames and yellow warnings must be built and compared to the one loaded from the .cfg file. If it doesn't match, if the system hasn't been started in seven days, or a yellow warning hasn't been shown in 14 days, the warning is not to be skipped.
* ui: allow to skip warning popup at start hap2020-07-101-66/+67
|
* Add -lowlatency option to UI. Antonio Giner2019-12-021-0/+1
|
* Make layout format more flexible: Vas Crabb2019-07-061-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * There is no longer a concept of "layers" - there are only screens and elements. * Elements are now instantiated with <element ref="..."> * Screens and elements can have explicit blending mode specified with blend="..." * Default blending mode for screens is "add" and default for other elements is "alpha" * Other supported modes are "none" and "multiply" * This removes the options to enable/disable layers individually - use views instead * Legacy layouts can still be loaded, and support won't be removed for at least a year The current artwork model is over-stretched. It's based on a Space Invaders cabinet model, and isn't applicable to a lot of the systems MAME emulates now. The fact that MAME has to switch to an "alternate" mode to deal with games like Golly! Ghost! without requiring pre-matted bitmaps shows that the Space Invaders model wasn't even adequate for general arcade use. It shows in that for a lot of the systems that heavily depend on artwork, people just seem to randomly choose layers for elements until they get something that works. Also, the fact that MAME will switch to an alternate (Golly! Ghost!) mode depending on the combination of elements is a trap for people learning to make artwork. There are cases that the current approach of implying the blending mode from the layer doesn't work with. Examples include LEDs behind diffusers (requires additive blending for layout elements), and mutliple stacked LCD panels (requires RGB multiplication for screens). For configurability, it's now a lot easier to make multiple views using groups. For example, if you want to make it possible to hide the control panel section of your layout, you can put the control panel elements in a group and create views with and without it. I will gradually migrate the internal artwork to use the new approach. I have an XSLT stylesheet that helps with this, but I'm not comfortable adding it because it isn't a complete solution and it still requires manul steps. I wanted to get the re-worked pointer handling done sooner so I could push them both at the same time, but unfortunately various things have prevented me from progressing as quickly as I wanted to. Sorry guys, that stuff's going to have to wait.
* Refactored UI font metrics (#5291) npwoods2019-06-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Changed the various usages of UI_*COLOR to be calls to src/frontend/mame/ui/moptions.h The various UI_*COLOR macros were implemented as calls to decode_ui_color, which cached the values for the various options in a static array, which was obviously a gross hack. This refactoring is strategic because I am trying to confine awareness of mame_ui_manager to code in src/frontend/mame/ui, and the implementation of decode_ui_color() relied on the ability to access mame_ui_manager as a singleton from outside this code. * Created a ui_colors object, so that queries for UI RGB values would not always require parsing strings * Replaced UI_TARGET_FONT_[ROWS|HEIGHT] and UI_BOX_[LR|TD]_BORDER macros with property calls These macros were implemented with a call to a function (get_font_rows()) that opportunistically stashed the results of option accesses in static variables; in other words, a gross hack Because get_font_rows() attempted to access mame_ui_manager as a singleton, it was an obstactle to providing an alternative implementation of ui_manager * Remove stray debugging cruft that found a way into the other PR
* Changed the various usages of UI_*COLOR to be calls to ↵ npwoods2019-06-281-2/+2
| | | | | | | | | | | | | | | | | | | | | | | src/frontend/mame/ui/moptions.h (#5282) * Changed the various usages of UI_*COLOR to be calls to src/frontend/mame/ui/moptions.h The various UI_*COLOR macros were implemented as calls to decode_ui_color, which cached the values for the various options in a static array, which was obviously a gross hack. This refactoring is strategic because I am trying to confine awareness of mame_ui_manager to code in src/frontend/mame/ui, and the implementation of decode_ui_color() relied on the ability to access mame_ui_manager as a singleton from outside this code. * Created a ui_colors object, so that queries for UI RGB values would not always require parsing strings * Converted a few more options().zyx_color() to colors().zyx_color() * A few more misses from earlier
* Standardize "On"/"Off" items in UI menus. "On" is now consistently to the ↵ AJR2018-06-241-4/+3
| | | | right of "Off", as with DIP switches.
* Revert "Revert "Merge branch 'master' of https://github.com/mamedev/mame"" Firehawke2017-12-131-0/+2
| | | | This reverts commit 54155441e9ba9941e85d80c4834a66376a11e791.
* Revert "Merge branch 'master' of https://github.com/mamedev/mame" Firehawke2017-12-131-2/+0
| | | | | This reverts commit f537428e5a40ba6dde8ca9bf0fe9ae6b1f189ac4, reversing changes made to 0d70d798107d4e4e8fb9f230410aeb1e888d65c5.
* Rewind feature and RAM savestates. vadosnaprimer2017-12-061-0/+2
| | | | | | | | | | | | | | This starts the work requested in #2398. How RAM states work. Implemented using util::vectorstream. Instead of dumping m_save.m_entry_list to file, it writes them as binary to vectorstream. Compression is not used, as it would slow down the process. The header is written as usual, also in binary. When a state is loaded, the savestate data gets binary-read from vectorstream. How rewind works. Rewind is optional, it can be turned off through MAME GUI while not running. Rewind capacity is available there too. Rewind step hotkey is available from the standard hotkey menu. In the debugger you have the "rewind" command ("rw" shortcut) that works the same as the hotkey. Every time you advance a frame (pause step), rewinder captures a RAM savestate of the frame you were at. It does the same when you do step into/over/out in the debugger. Every time it captures a new state (and when you unpause), it marks as invalid all its states that go after the current machine time, because input might change, so they are not relevant anymore. It keeps their buffers allocated though, for future use. When rewinder runs out of allowed amount of savestates it can have, it invalidates the first state in the list and tosses its unique_ptr to the end of the list, then it uses its buffer to capture a new state. When you hit the rewind step key, or use "rewind" command in the debugger, it loads a state that is immediately before the current machine time. Invalid states between valid ones are not allowed to appear, as that breaks rewinder integrity and causes problems. Rewinder keeps its own set of ram states as a vector of unique_ptr's. All rewinder operations and errors get reported using machine().popmessage().
* internal UI improvements: Vas Crabb2017-08-071-51/+16
| | | | | | | * Greatly reduce copy/paste code for drawing menu header/footer boxes * Display full name of selected slot device below slots menu * Fix up spacing on dircetory configuration menu * Fix min/max for UI font rows per screen setting
* BIOS is an initialism, not a proper noun (nw) Vas Crabb2017-08-051-1/+1
|
* Overhaul to how MAME handles options, take two (#2341) npwoods2017-06-251-13/+13
|
* Add trailing newline to several frontend error messages (nw) AJR2017-05-081-2/+2
|
* Revert "Overhaul to how MAME handles options (#2260)" Vas Crabb2017-05-071-13/+13
| | | | | | | | | | | | This reverts commit 536990e77b49ccc50ef275bfbf1018cc29c16154. Conflicts: src/frontend/mame/mame.cpp Sorry, but this change was half-baked. It breaks a lot of existing functionality and clearly hasn't been tested in more than a tiny subset of use cases. Please play this work back onto your own branch, and test it before submitting another PR.
* Overhaul to how MAME handles options (#2260) npwoods2017-05-051-13/+13
| | | | | | | | | | | | This is an overhaul to how MAME handles options to provide a better foundation for what MAME is already doing in practice. Previously, core_options was designed to provide an input/output facility for reading options from the command line and INI files. However, the current needs (image/slot/get_default_card_software calculus and MewUI) go way beyond that. Broadly, this PR makes the following changes: * core_options now has an extensibility mechanism, so one can register options that behave dramatically differently * With that foundation, emu_options now encapsulates all of the funky image/slot/get_default_card_software calculus that were previously handled by static methods in mameopts.cpp. Changes to emu_options should not automatically cascade in such a way so that it stays in a consistent state * emu_options no longer provides direct access to the slot_options/image_options maps; there are simpler API functions that control these capabilities * Many core_options functions that expose internal data structures (e.g. - priority) that were only really needed because of previous (now obsolete) techniques have been removed. * core_options is now exception based (rather than dumping text to an std::string). The burden is on the caller to catch these, and discern between warnings and errors as needed. Obviously this is a risky change; that's why this is being submitted at the start of the dev cycle.
* Encapsulate a bit more of the menu base class to control when layout changes ↵ Vas Crabb2016-11-231-3/+3
| | | | can happen
* Improvements to rgb_t (nw) AJR2016-10-221-2/+2
| | | | | | | - Make most class methods constexpr - Make color constants (white, black, etc.) into constexpr factory methods, in order to fix a static initialization problem discussed on the MAMEWorld forums. (Note that while C++14 allows constexpr member variables to be initialized outside classes, current compilers' support for C++14 constexpr rules has proven to be lamentably deficient.) - Create bitmap_rgb32::erase to simplify syntax in update handlers
* NOTICE (TYPE NAME CONSOLIDATION) Miodrag Milanovic2016-10-221-1/+1
| | | | | 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
* removed enable_dats() option, no longer needed after the switch to lua ↵ dankan18902016-09-191-1/+0
| | | | | | plugin. (nw) fixed the failure to select the last used machine if quit with the focus in another part of the main menu. (nw)
* removed printf hap2016-08-131-1/+0
|
* Fix detection of auto option in submenu.cpp, nw therealmogminer@gmail.com2016-08-131-1/+8
|
* std::min and std:max instead of MIN and MAX, also some more macros converted ↵ Miodrag Milanovic2016-07-311-2/+2
| | | | to inline functions (nw)
* UI refactoring: [Vas Crabb] Vas Crabb2016-07-101-67/+73
| | | | | | | | | * 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-15/+22
| | | | This reverts commit 19c4764090d1c5131945d11737de8a3bb421b9aa.
* Added in "Miscellaneous Options" menu one item to hide ROMless machines from ↵ dankan18902016-07-041-0/+1
| | | | the availables list. [Maurizio Petrarota]
* C++ comments for some parts. dankan18902016-07-041-22/+15
| | | | | Increased use of the specifier auto. Some code cleanups.
* Added a move constructor and got rid of the 'const char *' overload. I had ↵ Nathan Woods2016-06-291-2/+2
| | | | | | to update a ton of call sites that relied on being able to pass nullptr. It is inevitable that there are more
* Cleanup and version bumpmame0175 Miodrag Milanovic2016-06-291-1/+0
|
* Use ui::text_layout::text_layout and ui::text_layout::word_wrapping enums Nathan Woods2016-06-181-8/+8
|
* ui refactoring [Vas Crabb] Vas Crabb2016-05-271-158/+264
| | | | | | | * 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)
* Move slider_state and ui_menu_item into src/frontend/mame, nw therealmogminer@gmail.com2016-05-161-0/+1
|
* Relieve UI menus and such from having to constantly fetch UI object from ↵ AJR2016-04-261-15/+14
| | | | global state (nw)
* Various cleanups suggested by static analyzer (nw) Miodrag Milanovic2016-04-241-3/+1
|
* Split UI and frontend part from core [Miodrag Milanovic] Miodrag Milanovic2016-04-231-0/+368