Repository navigation
Mac cheats: sections fold in the panel and become submenus in the menu - #2014
Open
UserDerezzed wants to merge 1 commit into
Open
UserDerezzed wants to merge 1 commit into
UserDerezzed wants to merge 1 commit into
Conversation
… a disclosure row with its name and how many cheats it has and how many are on, a click folds or opens it, a section of more than 10 rows starts folded, the choice is kept per build in user defaults (DmCheatsPanel.folded.<build ID>), and a search shows the matches inside folded sections; the Cheats menu puts each section's cheats in a submenu titled with its name
This was referenced Nov 9, 2026
Cheats: a code cheat can be a one-click action (once = true gives it the panel's Apply button)
#2023
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
A cheat file with many EdiZon sections (
[--SectionStart:Name--]…[--SectionEnd:Name--]) made the Mac cheats panel and menu one long list. The case that prompted it is the Ocarina of Time map select from #1963: its section has 49 rows (48 locations and the Instant warp switch), so the cheats after it were a long scroll away. With this change it starts folded, and in the menu it is one submenu. This PR doesn't depend on #1963, and either can merge first. This change makes the sections fold:DmCheatsPanel.folded.<build ID>, as {section name: folded}.Rows outside sections are unchanged. Labels, on/off pairs, "set" and "ask" cheats work as before. The header counts update in place as cheats are turned on and off.
The rebuild after a click is deferred to the next main-queue turn, because it removes the button whose action is still running.
docs/development.md(Cheats) describes the folders and the submenus.Checked
python3 -m unittest dm/tools/tests/test_docs.pypasses.make -C dm/host GAME=0400486024DEC000 dmhostbuilds.dm/tools/lint_c.py tidy dm/host/front_mac.m(LLVM 23.1.1) reports 0 findings.hle_cheats.candfront_mac.o, run on a copy of Ocarina of Time's cheat file and its.enabledfile. It checked:0400486024DEC000). The panel was built into the Mac app's host, but I have not yet played with it in the game.regress.py: none. The change is limited to the Cheats panel and menu infront_mac.m, with no graphics, timing or HLE code, so no game's route reaches it.Docs